ansible / awx-operator

An Ansible AWX operator for Kubernetes built with Operator SDK and Ansible. 🤖
https://www.github.com/ansible/awx
Apache License 2.0
1.24k stars 628 forks source link

syntax error on extra_setting in spec causes the AWX installation to loop on the migration #773

Open JSGUYOT opened 2 years ago

JSGUYOT commented 2 years ago

Please confirm the following

Summary

Hello,

I don't know if a really bug, but it's not visible immediatly ...

When I deploy AWX with awx-operator (0.15.0), and when they are a syntaxe error on one of extra_settings variables, AWX deployment stay in Migration mode, without error message. Containers restarting always and retry migration ...

I see problem by awx-manage check on container :

File "/etc/tower/settings.py", line 75
    AUTH_LDAP_SERVER_URI = ldap://....
                               ^
SyntaxError: invalid syntax_

But no error displaying on deployment or direct log on container ...

Is not simple to see this error ...

Regards,

AWX version

19.5.0

Installation method

kubernetes

Modifications

no

Ansible version

No response

Operating system

No response

Web browser

Chrome

Steps to reproduce

Deploy AWX by awx-operator and make syntaxe error on extra_settings variable. Exemple :

extra_settings:

Expected results

Deployment container is OK, but it's loop on Migration, and restart and retry migration.

Actual results

On Container task, command awx-manage check display this :

File "/etc/tower/settings.py", line 75 AUTH_LDAP_SERVERURI = ldap://.... ^ SyntaxError: invalid syntax

Additional information

No response

JSGUYOT commented 2 years ago

special character "@ or: or!" gives an error, same when I protect the variable with ' or "

merickso commented 2 years ago

I'm seeing this too with my ldap settings. My values in yaml are in quotes but they get stripped when set within /etc/tower/settings.py which is causing the error

AlanCoding commented 2 years ago

@merickso could you give the YAML you tried to use?

Here's an example of wrapping in quotes https://github.com/ansible/awx/issues/11222#issuecomment-939782609