zalf-rdm / geonode-k8s

A Kubernetes helm chart for the geospacial webapplication Geonode
https://geonode-k8s.readthedocs.io/en/latest/
GNU General Public License v2.0
12 stars 7 forks source link

Bug: running a later version than 4.1.3 breaks geonode container init process #87

Closed mwallschlaeger closed 9 months ago

mwallschlaeger commented 10 months ago

Bug Description

running an image build after geonode release 4.1.2 breaks the geonode container init process. This is related to changes in tasks.py and the deletion of some variables inside the default settings.py. This leads to a stop at entrypoint step to run set the geoserver admin password and further this breaks all furhter steps as they do not get executed.

Error output:

****************************geoserver********************************
GeoServer is available for HTTP calls!
waitforgeoserver tasks done
********************geoserver fixture********************************
Setting GeoServer Admin Password...
sentry enabled ...
https://b0e5d555768a4cae931db314b8ba6540@o1417711.ingest.sentry.io/4504473572016128
Traceback (most recent call last):
  File "/usr/local/bin/invoke", line 8, in <module>
    sys.exit(program.run())
  File "/usr/local/lib/python3.10/dist-packages/invoke/program.py", line 398, in run
    self.execute()
  File "/usr/local/lib/python3.10/dist-packages/invoke/program.py", line 583, in execute
    executor.execute(*self.tasks)
  File "/usr/local/lib/python3.10/dist-packages/invoke/executor.py", line 140, in execute
    result = call.task(*args, **call.kwargs)
  File "/usr/local/lib/python3.10/dist-packages/invoke/tasks.py", line 138, in __call__
    result = self.body(*args, **kwargs)
  File "/usr/src/geonode/tasks.py", line 388, in geoserverfixture
    _geoserver_info_provision(f"{os.environ['GEOSERVER_LOCATION']}rest/")
  File "/usr/src/geonode/tasks.py", line 499, in _geoserver_info_provision
    cat = Catalog(url, username=settings.OGC_SERVER_DEFAULT_USER, password=settings.OGC_SERVER_DEFAULT_PASSWORD)
  File "/usr/local/lib/python3.10/dist-packages/django/conf/__init__.py", line 83, in __getattr__
    val = getattr(self._wrapped, name)
AttributeError: 'Settings' object has no attribute 'OGC_SERVER_DEFAULT_USER'

Additional Information

Any additional information or context that may be helpful in resolving the bug.

ridoo commented 10 months ago

There is a lot of work going on regarding GeoNode bootstrap and configuration of GeoServer, memcached, monitoring, geoip, etc.

We would have to revise settings (new/changed/orphaned) once 4.2.0 is ready

AleMScof commented 10 months ago

Just for the records, I gave it a try few days ago with the master branch, apart from the variables OGC_SERVER_DEFAULT_PASSWORD and OGC_SERVER_DEFAULT_USER I had to tweak with the following function which retrieves the port exposed by container https://github.com/GeoNode/geonode/blob/80e2bbfef601ae3c209950f6c659c5976bd1c4f1/tasks.py#L481

The python docker SDK is failing in minikube context.

mwallschlaeger commented 10 months ago

Yeah, your right about the python docker SDK used in the tasks.py. This will make more problems in kubernetes environments running on other container engines. We need to think about this at some point in depth. I'm gonna open an issue for the docker SDK.

Thanks for your remarks, at this point. IF you have time feel free to open an PR on this Issue.