Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unquoted .Values.ldap.basedn in bitnami/airflow:22.2.0 causing fatal error during startup #30619

Open
viesturseihentals-saf opened this issue Nov 25, 2024 · 1 comment
Assignees
Labels
airflow tech-issues The user has a technical issue about an application triage Triage is needed

Comments

@viesturseihentals-saf
Copy link

viesturseihentals-saf commented Nov 25, 2024

Name and Version

bitnami/airflow:22.2.0

What architecture are you using?

None

What steps will reproduce the bug?

  1. Deploy bitnami/airflow:22.2.0 chart.
  2. Configure LDAP settings in values.yaml especially ldap.basedn.
  3. Start the airflow-web container.

What is the expected behavior?

Successful web container startup

What do you see instead?

/opt/bitnami/airflow/venv/lib/python3.12/site-packages/airflow/configuration.py:859 FutureWarning: section/key [core/sql_alchemy_conn] has been deprecated, you should use[database/sql_alchemy_conn] instead. Please update your `conf.get*` call to use the new name
Traceback (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "/opt/bitnami/airflow/venv/lib/python3.12/site-packages/gunicorn/__main__.py", line 10, in <module>
    run(prog="gunicorn")
  File "/opt/bitnami/airflow/venv/lib/python3.12/site-packages/gunicorn/app/wsgiapp.py", line 66, in run
    WSGIApplication("%(prog)s [OPTIONS] [APP_MODULE]", prog=prog).run()
  File "/opt/bitnami/airflow/venv/lib/python3.12/site-packages/gunicorn/app/base.py", line 235, in run
    super().run()
  File "/opt/bitnami/airflow/venv/lib/python3.12/site-packages/gunicorn/app/base.py", line 71, in run
    Arbiter(self).run()
    ^^^^^^^^^^^^^
  File "/opt/bitnami/airflow/venv/lib/python3.12/site-packages/gunicorn/arbiter.py", line 57, in __init__
    self.setup(app)
  File "/opt/bitnami/airflow/venv/lib/python3.12/site-packages/gunicorn/arbiter.py", line 117, in setup
    self.app.wsgi()
  File "/opt/bitnami/airflow/venv/lib/python3.12/site-packages/gunicorn/app/base.py", line 66, in wsgi
    self.callable = self.load()
                    ^^^^^^^^^^^
  File "/opt/bitnami/airflow/venv/lib/python3.12/site-packages/gunicorn/app/wsgiapp.py", line 57, in load
    return self.load_wsgiapp()
           ^^^^^^^^^^^^^^^^^^^
  File "/opt/bitnami/airflow/venv/lib/python3.12/site-packages/gunicorn/app/wsgiapp.py", line 47, in load_wsgiapp
    return util.import_app(self.app_uri)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/bitnami/airflow/venv/lib/python3.12/site-packages/gunicorn/util.py", line 423, in import_app
    app = app(*args, **kwargs)
          ^^^^^^^^^^^^^^^^^^^^
  File "/opt/bitnami/airflow/venv/lib/python3.12/site-packages/airflow/www/app.py", line 196, in cached_app
    app = create_app(config=config, testing=testing)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/bitnami/airflow/venv/lib/python3.12/site-packages/airflow/www/app.py", line 85, in create_app
    flask_app.config.from_pyfile(webserver_config, silent=True)
  File "/opt/bitnami/airflow/venv/lib/python3.12/site-packages/flask/config.py", line 185, in from_pyfile
    exec(compile(config_file.read(), filename, "exec"), d.__dict__)
  File "/opt/bitnami/airflow/webserver_config.py", line 10, in <module>
    AUTH_LDAP_SEARCH = DC=saf,DC=lan
                                 ^^^
NameError: name 'lan' is not defined. Did you mean: 'len'?

Additional information

Suggested Fix:
In the bitnami/airflow/templates/web/configmap.yaml file, quote the .Values.ldap.basedn as follows:

[..]
AUTH_TYPE = AUTH_LDAP
AUTH_LDAP_SERVER = {{ .Values.ldap.uri | squote }}
AUTH_LDAP_SEARCH = {{ .Values.ldap.basedn | squote }}
AUTH_LDAP_UID_FIELD = {{ .Values.ldap.searchAttribute | squote }}
AUTH_LDAP_BIND_USER = {{ .Values.ldap.binddn | squote }}
[..]
@viesturseihentals-saf viesturseihentals-saf added the tech-issues The user has a technical issue about an application label Nov 25, 2024
@github-actions github-actions bot added the triage Triage is needed label Nov 25, 2024
@carrodher
Copy link
Member

Thank you for bringing this issue to our attention. We appreciate your involvement! If you're interested in contributing a solution, we welcome you to create a pull request. The Bitnami team is excited to review your submission and offer feedback. You can find the contributing guidelines here.

Your contribution will greatly benefit the community. Feel free to reach out if you have any questions or need assistance.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
airflow tech-issues The user has a technical issue about an application triage Triage is needed
Projects
None yet
Development

No branches or pull requests

2 participants