[GeoNode-users] Info about updatelayers command?

francesco bartoli xbartolone at gmail.com
Sun Oct 28 07:01:32 PDT 2018


Ana,

if you run

git checkout -- <file>

for each changed file then you don't need to remove them. Can you try
again? What is the error from the container that doesn't start?

Il giorno dom 28 ott 2018 alle ore 12:54 Ana Boljevic <ana.boljevic at cedis.me>
ha scritto:

>
> Dear Francesco and Alessio,
>
> We have moved all changed files in /tmp folder of the host, git pull, put
> moved files back in thair original path and than
> docker-compose stop
> docker-compose up --no-build -d
> but now django container can't bring up
>
>
>
> root at 5058e8a1637f:/usr/src/app# git
> checkout
>
> M       docker-compose.yml
> M       entrypoint.sh
> M       geonode/settings.py
> M       scripts/docker/env/production/celery.env
> M       scripts/docker/env/production/django.env
> M       scripts/docker/env/production/geoserver.env
>
> geonode at testgis:/tmp$ docker cp 5058e8a1637f:/usr/src/app/entrypoint.sh
> /tmp
> geonode at testgis:/tmp$ docker cp 5058e8a1637f:/usr/src/app/geonode/
> settings.py /tmp
> geonode at testgis:/tmp$ docker cp
> 5058e8a1637f:/usr/src/app/scripts/docker/env/production/celery.env /tmp
> geonode at testgis:/tmp$ docker cp
> 5058e8a1637f:/usr/src/app/scripts/docker/env/production/django.env /tmp
> geonode at testgis:/tmp$ docker cp
> 5058e8a1637f:/usr/src/app/scripts/docker/env/production/geoserver.env /tmp
>
> rm docker-compose.yml entrypoint.sh geonode/settings.py
> scripts/docker/env/production/celery.env
> scripts/docker/env/production/django.env
> scripts/docker/env/production/geoserver.env
>
> git pull
>
> geonode at testgis:~/geonode$ docker cp /tmp/docker-compose.yml
> 5058e8a1637f:/usr/src/app/docker-compose.yml
> geonode at testgis:~/geonode$ docker cp /tmp/entrypoint.sh
> 5058e8a1637f:/usr/src/app/entrypoint.sh
> geonode at testgis:~/geonode$ docker cp /tmp/settings.py
> 5058e8a1637f:/usr/src/app/geonode/settings.py
> geonode at testgis:~/geonode$ docker cp /tmp/celery.env
> 5058e8a1637f:/usr/src/app/scripts/docker/env/production/celery.env
> geonode at testgis:~/geonode$ docker cp /tmp/django.env
> 5058e8a1637f:/usr/src/app/scripts/docker/env/production/django.env
> geonode at testgis:~/geonode$ docker cp /tmp/geoserver.env
> 5058e8a1637f:/usr/src/app/scripts/docker/env/production/geoserver.env
>
> docker-compose stop
> docker-compose up --no-build -d
>
>
> Regards,
>
> Ana
>
>
> -------- Original message --------
> From: francesco bartoli <xbartolone at gmail.com>
> Date: 10/27/18 00:36 (GMT+01:00)
> To: Ana Boljevic <ana.boljevic at cedis.me>
> Cc: Alessio Fabiani <alessio.fabiani at geo-solutions.it>,
> geonode-users-bounces at lists.osgeo.org, geonode-users <
> geonode-users at lists.osgeo.org>
> Subject: Re: [GeoNode-users] Info about updatelayers command?
>
> Yes Alessio but I guessed Ana would be ended up with a merge issue. One
> easy solution if settings.py is the only file edited would be to copy it
> somewhere else then run
>
> *git checkout*
>
> before
>
> *git pull*
>
> finally overwrite settings.py with the copied one.
>
> Il giorno ven 26 ott 2018 alle ore 20:00 Ana Boljevic <
> ana.boljevic at cedis.me> ha scritto:
>
>> Sorry,
>> we have error, I didn't notice at first:
>> geonode at testgis:~/geonode$ docker exec -i -t django4geonode bash
>> root at 5058e8a1637f:/usr/src/app# git pull
>> remote: Enumerating objects: 321, done.
>> remote: Counting objects: 100% (321/321), done.
>> remote: Compressing objects: 100% (20/20), done.
>> remote: Total 620 (delta 308), reused 307 (delta 301), pack-reused 299
>> Receiving objects: 100% (620/620), 3.66 MiB | 812.00 KiB/s, done.
>> Resolving deltas: 100% (441/441), completed with 126 local objects.
>> From https://github.com/GeoNode/geonode
>>    33aa3e6..34ac634  master     -> origin/master
>>    2ea8bc6..89efc19  2.8.x      -> origin/2.8.x
>>  * [new branch]      ISSUE_4025 -> origin/ISSUE_4025
>> Updating 33aa3e6..34ac634
>> error: Your local changes to the following files would be overwritten by
>> merge:
>>         geonode/settings.py
>> Please, commit your changes or stash them before you can merge.
>> Aborting
>>
>> Regards,
>>
>> Ana
>>
>>
>> -------- Original message --------
>> From: Ana Boljevic <ana.boljevic at cedis.me>
>> Date: 10/26/18 19:50 (GMT+01:00)
>> To: Alessio Fabiani <alessio.fabiani at geo-solutions.it>
>> Cc: geonode-users-bounces at lists.osgeo.org, geonode-users <
>> geonode-users at lists.osgeo.org>
>> Subject: Re: [GeoNode-users] Info about updatelayers command?
>>
>>
>> Dear Alessio,
>>
>> We have done:
>> docker exec -i -t django4geonode bash
>> git pull
>> exit
>> docker-compose stop
>> docker-compose up --no-build -d
>>
>> and after that, from django4geonode container error still remains:
>>
>> root at 5058e8a1637f:/usr/src/app# python manage.py updatelayers
>> Inspecting the available layers in GeoServer ...
>> Found 6 layers, starting processing
>> Stopping process because --ignore-errors was not set and an error was
>> found.
>> Traceback (most recent call last):
>>   File "manage.py", line 29, in <module>
>>     execute_from_command_line(sys.argv)
>>   File
>> "/usr/local/lib/python2.7/site-packages/django/core/management/__init__.py",
>> line 364, in execute_from_command_line
>>     utility.execute()
>>   File
>> "/usr/local/lib/python2.7/site-packages/django/core/management/__init__.py",
>> line 356, in execute
>>     self.fetch_command(subcommand).run_from_argv(self.argv)
>>   File "/usr/local/lib/python2.7/site-packages/django/core/management/
>> base.py", line 283, in run_from_argv
>>     self.execute(*args, **cmd_options)
>>   File "/usr/local/lib/python2.7/site-packages/django/core/management/
>> base.py", line 330, in execute
>>     output = self.handle(*args, **options)
>>   File "/usr/src/app/geonode/geoserver/management/commands/
>> updatelayers.py", line 124, in handle
>>     execute_signals=True)
>>   File "/usr/src/app/geonode/geoserver/helpers.py", line 637, in gs_slurp
>>     layer.set_permissions(perm_spec)
>>   File "/usr/src/app/geonode/security/models.py", line 216, in
>> set_permissions
>>     sync_geofence_with_guardian(self.layer, perms, group=group)
>>   File "/usr/src/app/geonode/decorators.py", line 44, in wrapper
>>     return func(*args, **kwargs)
>>   File "/usr/src/app/geonode/security/utils.py", line 392, in
>> sync_geofence_with_guardian
>>     _update_geofence_rule(layer.name, layer.workspace, service)
>>   File "/usr/src/app/geonode/security/utils.py", line 563, in
>> _update_geofence_rule
>>     raise RuntimeError(msg)
>> Exception: ('Failed to process OPSTINE', RuntimeError("Could not ADD
>> GeoServer User None Rule for Layer u'OPSTINE'",))
>>
>> Regards,
>>
>> Ana
>>
>>
>>
>>
>> -------- Original message --------
>> From: Alessio Fabiani <alessio.fabiani at geo-solutions.it>
>> Date: 10/26/18 15:51 (GMT+01:00)
>> To: Ana Boljevic <ana.boljevic at cedis.me>
>> Cc: Francesco Bartoli <xbartolone at gmail.com>,
>> geonode-users-bounces at lists.osgeo.org, geonode-users <
>> geonode-users at lists.osgeo.org>
>> Subject: Re: [GeoNode-users] Info about updatelayers command?
>>
>> Hi Ana,
>> In order to update the GeoNode on your GeoNode instance, I guess you can
>> try something like
>>
>> docker exec -i -t django4geonode bash
>> git pull
>> exit
>> docker-compose stop
>> docker-compose up --no-build -d
>>
>> @Francesco Bartoli <xbartolone at gmail.com> can you confirm?
>>
>>
>> Il giorno ven 26 ott 2018 alle ore 15:45 Ana Boljevic <
>> ana.boljevic at cedis.me> ha scritto:
>>
>>> Sorry, but my docker experience is weak. I don't know how to solve the
>>> problem.
>>> I want to apply fix from github without loosing my data. Is it possible?
>>>
>>> Can you please write commands?
>>>
>>> Regards,
>>>
>>> Ana
>>>
>>>
>>> -------- Original message --------
>>> From: Francesco Bartoli <xbartolone at gmail.com>
>>> Date: 10/26/18 14:25 (GMT+01:00)
>>> To: Ana Boljevic <ana.boljevic at cedis.me>
>>> Cc: geonode-users <geonode-users at lists.osgeo.org>,
>>> geonode-users-bounces at lists.osgeo.org
>>> Subject: RE: [GeoNode-users] Info about updatelayers command?
>>>
>>> If you already cloned it then you can just execute
>>>
>>> *git pull origin master*
>>>
>>> Rebuilding all the containers is not terrible until you don’t remove the
>>> volumes.
>>>
>>> Hope this helps
>>>
>>> Francesco
>>> On 26 Oct 2018, 12:54 +0200, Ana Boljevic <ana.boljevic at cedis.me>,
>>> wrote:
>>>
>>> Dear Francesco,
>>>
>>> Can you please be more specific.
>>> Should we pull latest code with this command:
>>> git clone https://github.com/GeoNode/geonode.git
>>>
>>> Do I have to rebuild all containers or can I rebuild only django4geonode
>>> ?
>>> Will I lose all of my settings and data by doing this ?
>>>
>>> Regards,
>>>
>>> *Ana Boljević*
>>>
>>> Direkcija za razvoj, pristup mreži i ICT
>>>
>>> Sektor za ICT
>>>
>>> Služba za GIS i tehničku bazu podataka
>>>
>>> *[image: CEDIS]*
>>>
>>> *DOO „Crnogorski elektrodistributivni sistem“ Podgorica*
>>>
>>> Ivana Milutinovića br.12, Podgorica
>>>
>>> Tel: +382 20 408 473
>>>
>>> *www.cedis.me <http://www.cedis.me/>*
>>>
>>> [image: jelkica]Please do not print this e-mail unless you really need
>>> to
>>>
>>>
>>>
>>> *From:* francesco bartoli [mailto:xbartolone at gmail.com]
>>> *Sent:* Friday, October 26, 2018 11:12 AM
>>> *To:* Ana Boljevic <ana.boljevic at cedis.me>
>>> *Cc:* Michael Fedak <mikefedak at gmail.com>; geonode-users <
>>> geonode-users at lists.osgeo.org>; geonode-users-bounces at lists.osgeo.org
>>> *Subject:* Re: [GeoNode-users] Info about updatelayers command?
>>>
>>>
>>>
>>> If you apply changes or you have got new updates from the repo then you
>>> have to rebuild the image so please try to add and use the option "--build"
>>> that I mentioned above.
>>>
>>>
>>>
>>> However if you are going to modify geonode and don't want to contribute
>>> back with pull requests then the suggested method would be to use a
>>> geonode-project.
>>>
>>>
>>>
>>> Il giorno ven 26 ott 2018 alle ore 09:46 Ana Boljevic <
>>> ana.boljevic at cedis.me> ha scritto:
>>>
>>> Dear Francesco,
>>>
>>>
>>> We did the following 15 days ago:
>>> git clone https://github.com/GeoNode/geonode.git
>>> cd /home/geonode/geonode
>>> docker-compose up -d
>>>
>>>
>>> In meantime, we make changes on containers and then commit those changes.
>>> Can you please explain in details how to apply fix from github ?
>>>
>>>
>>> Regards
>>>
>>>
>>>
>>> Ana
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>> -------- Original message --------
>>> From: francesco bartoli <xbartolone at gmail.com>
>>> Date: 10/26/18 08:50 (GMT+01:00)
>>> To: Ana Boljevic <ana.boljevic at cedis.me>
>>> Cc: Michael Fedak <mikefedak at gmail.com>, geonode-users <
>>> geonode-users at lists.osgeo.org>, geonode-users-bounces at lists.osgeo.org
>>> Subject: Re: [GeoNode-users] Info about updatelayers command?
>>>
>>> Hi Ana,
>>>
>>>
>>>
>>> can you please explain what did you do? The better to try is to pull the
>>> latest code from github and then run "docker-compose up --build" regardless
>>> of the version. The fix is for sure also in master.
>>>
>>>
>>>
>>> Hope this helps,
>>>
>>> Francesco
>>>
>>>
>>>
>>> Il giorno ven 26 ott 2018 alle ore 07:16 Ana Boljevic <
>>> ana.boljevic at cedis.me> ha scritto:
>>>
>>> Dears,
>>>
>>>
>>>
>>> We have tried to implement solution by Mr. Fabiani:
>>>
>>> https://github.com/GeoNode/geonode/pull/3986/files
>>>
>>> but after we have manually changed those 4 files django4geonode
>>> containers can't bring up anymore.
>>>
>>> Does this solution apply also for GeoNode version 2.10rc4 ?
>>>
>>>
>>>
>>> Thanks in advance.
>>>
>>>
>>>
>>> Regards,
>>>
>>>
>>>
>>> *Ana Boljević*
>>>
>>> Direkcija za razvoj, pristup mreži i ICT
>>>
>>> Sektor za ICT
>>>
>>> Služba za GIS i tehničku bazu podataka
>>>
>>> *DOO „Crnogorski elektrodistributivni sistem“ Podgorica*
>>>
>>> Ivana Milutinovića br.12, Podgorica
>>>
>>> Tel: +382 20 408 473
>>>
>>> *www.cedis.me <http://www.cedis.me/>*
>>>
>>> Please do not print this e-mail unless you really need to
>>>
>>>
>>>
>>> *From:* Michael Fedak [mailto:mikefedak at gmail.com]
>>> *Sent:* Monday, October 22, 2018 3:20 PM
>>> *To:* Ana Boljevic <ana.boljevic at cedis.me>
>>> *Cc:* geonode-users-bounces at lists.osgeo.org; geonode-users <
>>> geonode-users at lists.osgeo.org>
>>> *Subject:* Re: [GeoNode-users] Info about updatelayers command?
>>>
>>>
>>>
>>>  I had a similar issue on 2.8 last week. See here for the
>>> discussion/fix: https://github.com/GeoNode/geonode/issues/3984
>>>
>>>
>>>
>>> On Mon, Oct 22, 2018 at 7:25 AM Ana Boljevic <ana.boljevic at cedis.me>
>>> wrote:
>>>
>>> Dear Geonode community,
>>>
>>>
>>>
>>> If someone knows little bit more about this, we would appreciate your
>>> help J Explanation below:
>>>
>>>
>>> We have installed Geonode on docker (version 2.10rc4). We imported first
>>> kml layer but updatelayers (from inside of django4geonode container) report
>>> problem "Could not ADD GeoServer User None Rule for Layer":
>>>
>>> root at 5058e8a1637f:/usr/src/app# ./manage.py updatelayers
>>> Inspecting the available layers in GeoServer ...
>>> Found 1 layers, starting processing
>>> Stopping process because --ignore-errors was not set and an error was
>>> found.
>>> Traceback (most recent call last):
>>>   File "./manage.py", line 29, in <module>
>>>     execute_from_command_line(sys.argv)
>>>   File
>>> "/usr/local/lib/python2.7/site-packages/django/core/management/__init__.py",
>>> line 364, in execute_from_command_line
>>>     utility.execute()
>>>   File
>>> "/usr/local/lib/python2.7/site-packages/django/core/management/__init__.py",
>>> line 356, in execute
>>>     self.fetch_command(subcommand).run_from_argv(self.argv)
>>>   File
>>> "/usr/local/lib/python2.7/site-packages/django/core/management/base.py",
>>> line 283, in run_from_argv
>>>     self.execute(*args, **cmd_options)
>>>   File
>>> "/usr/local/lib/python2.7/site-packages/django/core/management/base.py",
>>> line 330, in execute
>>>     output = self.handle(*args, **options)
>>>   File
>>> "/usr/src/app/geonode/geoserver/management/commands/updatelayers.py", line
>>> 124, in handle
>>>     execute_signals=True)
>>>   File "/usr/src/app/geonode/geoserver/helpers.py", line 637, in gs_slurp
>>>     layer.set_permissions(perm_spec)
>>>   File "/usr/src/app/geonode/security/models.py", line 216, in
>>> set_permissions
>>>     sync_geofence_with_guardian(self.layer, perms, group=group)
>>>   File "/usr/src/app/geonode/decorators.py", line 44, in wrapper
>>>     return func(*args, **kwargs)
>>>   File "/usr/src/app/geonode/security/utils.py", line 392, in
>>> sync_geofence_with_guardian
>>>     _update_geofence_rule(layer.name, layer.workspace, service)
>>>   File "/usr/src/app/geonode/security/utils.py", line 563, in
>>> _update_geofence_rule
>>>     raise RuntimeError(msg)
>>> Exception: ('Failed to process novi_r6_Slijepac_most_10kV',
>>> RuntimeError("Could not ADD GeoServer User None Rule for Layer
>>> u'novi_r6_Slijepac_most_10kV'",))
>>>
>>> But the same command from celery4geonode container has different output:
>>>
>>> root at bca672a5673d:/usr/src/app# ./manage.py updatelayers
>>> Inspecting the available layers in GeoServer ...
>>> Found 6 layers, starting processing
>>> /usr/local/lib/python2.7/site-packages/owslib/iso.py:117: FutureWarning:
>>> the .identification and .serviceidentification properties will merge into
>>> .identification being a list of properties.  This is currently implemented
>>> in .identificationinfo.  Please see
>>> https://github.com/geopython/OWSLib/issues/38 for more information
>>>   FutureWarning)
>>> /usr/local/lib/python2.7/site-packages/owslib/iso.py:482: FutureWarning:
>>> The .keywords and .keywords2 properties will merge into the .keywords
>>> property in the future, with .keywords becoming a list of MD_Keywords
>>> instances. This is currently implemented in .keywords2. Please see
>>> https://github.com/geopython/OWSLib/issues/301 for more information
>>>   FutureWarning)
>>> /usr/local/lib/python2.7/site-packages/geoserver/style.py:73:
>>> FutureWarning: The behavior of this method will change in future versions.
>>> Use specific 'len(elem)' or 'elem is not None' test instead.
>>>   if not user_style:
>>> /usr/local/lib/python2.7/site-packages/geoserver/style.py:77:
>>> FutureWarning: The behavior of this method will change in future versions.
>>> Use specific 'len(elem)' or 'elem is not None' test instead.
>>>   if user_style:
>>> ... Creating Thumbnail for Layer [geonode:OPSTINE]
>>> [updated] Layer OPSTINE (1/6)
>>> ... Creating Thumbnail for Layer
>>> [geonode:novi_novi_r6_Pavino_Polje_10kV_izmijenjen]
>>> [updated] Layer novi_novi_r6_Pavino_Polje_10kV_izmijenjen (2/6)
>>> ... Creating Thumbnail for Layer [geonode:novi_r6_Ambarine_Przista_10kV]
>>> ... Creating Thumbnail for Layer [geonode:novi_r6_Ambarine_Przista_10kV]
>>> [created] Layer novi_r6_Ambarine_Przista_10kV (3/6)
>>> ... Creating Thumbnail for Layer [geonode:novi_r6_Gimnazija_10_kV]
>>> [updated] Layer novi_r6_Gimnazija_10_kV (4/6)
>>> ... Creating Thumbnail for Layer [geonode:novi_r6_Planinica_10_kV]
>>> [updated] Layer novi_r6_Planinica_10_kV (5/6)
>>> ... Creating Thumbnail for Layer [geonode:novi_r6_Rasovo_10kV]
>>> [updated] Layer novi_r6_Rasovo_10kV (6/6)
>>>
>>>
>>> Finished processing 6 layers in 53.0 seconds.
>>>
>>> 1 Created layers
>>> 5 Updated layers
>>> 0 Failed layers
>>> 8.830000 seconds per layer
>>>
>>> *Is such behavior normal ?*
>>>
>>> Thanks in advance.
>>>
>>>
>>>
>>> Kind regards,
>>>
>>>
>>>
>>> *Ana Boljević*
>>>
>>> Direkcija za razvoj, pristup mreži i ICT
>>>
>>> Sektor za ICT
>>>
>>> Služba za GIS i tehničku bazu podataka
>>>
>>> *DOO „Crnogorski elektrodistributivni sistem“ Podgorica*
>>>
>>> Ivana Milutinovića br.12, Podgorica
>>>
>>> Tel: +382 20 408 473
>>>
>>> *www.cedis.me <http://www.cedis.me/>*
>>>
>>> Please do not print this e-mail unless you really need to
>>>
>>>
>>>
>>> _______________________________________________
>>> geonode-users mailing list
>>> geonode-users at lists.osgeo.org
>>> https://lists.osgeo.org/mailman/listinfo/geonode-users
>>>
>>> _______________________________________________
>>> geonode-users mailing list
>>> geonode-users at lists.osgeo.org
>>> https://lists.osgeo.org/mailman/listinfo/geonode-users
>>>
>>> _______________________________________________
>>> geonode-users mailing list
>>> geonode-users at lists.osgeo.org
>>> https://lists.osgeo.org/mailman/listinfo/geonode-users
>>>
>>
>>
>> --
>>
>> ==
>>
>> GeoServer Professional Services from the experts! Visit
>> http://goo.gl/it488V for more information.
>> ==
>> Ing. Alessio Fabiani
>>
>> @alfa7691
>> Founder/Technical Lead
>>
>>
>> GeoSolutions S.A.S.
>> Via di Montramito 3/A - 55054  Massarosa (LU) - Italy
>> phone: +39 0584 962313
>> fax:     +39 0584 1660272
>> mob:   +39 331 6233686
>>
>>
>> http://www.geo-solutions.it
>> http://twitter.com/geosolutions_it
>> -------------------------------------------------------
>>
>> Con riferimento alla normativa sul trattamento dei dati personali (Reg.
>> UE 2016/679 - Regolamento generale sulla protezione dei dati “GDPR”), si
>> precisa che ogni circostanza inerente alla presente email (il suo
>> contenuto, gli eventuali allegati, etc.) è un dato la cui conoscenza è
>> riservata al/i solo/i destinatario/i indicati dallo scrivente. Se il
>> messaggio Le è giunto per errore, è tenuta/o a cancellarlo, ogni altra
>> operazione è illecita. Le sarei comunque grato se potesse darmene notizia.
>>
>>
>> This email is intended only for the person or entity to which it is
>> addressed and may contain information that is privileged, confidential or
>> otherwise protected from disclosure. We remind that - as provided by
>> European Regulation 2016/679 “GDPR” - copying, dissemination or use of this
>> e-mail or the information herein by anyone other than the intended
>> recipient is prohibited. If you have received this email by mistake, please
>> notify us immediately by telephone or e-mail.
>> _______________________________________________
>> geonode-users mailing list
>> geonode-users at lists.osgeo.org
>> https://lists.osgeo.org/mailman/listinfo/geonode-users
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/geonode-users/attachments/20181028/e9e2833b/attachment-0001.html>


More information about the geonode-users mailing list