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 installation with default values breaks at lockdown #114

Closed mwallschlaeger closed 8 months ago

mwallschlaeger commented 8 months ago

Bug Description

when deploying geonode-k8s with default values.yaml, I run into the following issue on the geonode init process:

  File "/usr/src/geonode/./geonode/wsgi.py", line 29, in <module>
    application = get_wsgi_application()
  File "/usr/local/lib/python3.10/dist-packages/django/core/wsgi.py", line 12, in get_wsgi_application
    django.setup(set_prefix=False)
  File "/usr/local/lib/python3.10/dist-packages/django/__init__.py", line 19, in setup
    configure_logging(settings.LOGGING_CONFIG, settings.LOGGING)
  File "/usr/local/lib/python3.10/dist-packages/django/conf/__init__.py", line 82, in __getattr__
    self._setup(name)
  File "/usr/local/lib/python3.10/dist-packages/django/conf/__init__.py", line 69, in _setup
    self._wrapped = Settings(settings_module)
  File "/usr/local/lib/python3.10/dist-packages/django/conf/__init__.py", line 170, in __init__
    mod = importlib.import_module(self.SETTINGS_MODULE)
  File "/usr/lib/python3.10/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "/usr/src/geonode/./geonode/settings.py", line 899, in <module>
    LOCKDOWN_GEONODE = ast.literal_eval(os.getenv("LOCKDOWN_GEONODE", "False"))
  File "/usr/lib/python3.10/ast.py", line 110, in literal_eval
    return _convert(node_or_string)
  File "/usr/lib/python3.10/ast.py", line 109, in _convert
    return _convert_signed_num(node)
  File "/usr/lib/python3.10/ast.py", line 83, in _convert_signed_num
    return _convert_num(node)
  File "/usr/lib/python3.10/ast.py", line 74, in _convert_num
    _raise_malformed_node(node)
  File "/usr/lib/python3.10/ast.py", line 71, in _raise_malformed_node
    raise ValueError(msg + f': {node!r}')
ValueError: malformed node or string on line 1: <ast.Name object at 0x7fbb80f962f0>
unable to load app 0 (mountpoint='') (callable not found or import error)
*** no app loaded. GAME OVER ***

The variable must be provided as String not Bool.Solution:

  accesscontrol:
    # -- Enable/Disable lockdown mode of GeoNode
    lockdown: " False"

Additional Information

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