Hi Team,
I have 2 AWX instances:
1.) AWX 17.1.0 running as a docker container
2.) AWX 22.2.0 running on kubernetes
We are trying to perform the migration from AWX 17 to AWX 22.The issue is that the migration has completed successfully i,e able to load inventores,projects,jobs_templates etc,but when I run any AWX job from the new AWX it is giving me this error
Traceback (most recent call last):
File "/var/lib/awx/venv/awx/lib64/python3.9/site-packages/cryptography/fernet.py", line 133, in _verify_signature
h.verify(data[-32:])
File "/var/lib/awx/venv/awx/lib64/python3.9/site-packages/cryptography/hazmat/primitives/hmac.py", line 72, in verify
ctx.verify(signature)
File "/var/lib/awx/venv/awx/lib64/python3.9/site-packages/cryptography/hazmat/backends/openssl/hmac.py", line 85, in verify
raise InvalidSignature("Signature did not match digest.")
cryptography.exceptions.InvalidSignature: Signature did not match digest.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/var/lib/awx/venv/awx/lib64/python3.9/site-packages/awx/main/tasks/jobs.py", line 516, in run
passwords = self.build_passwords(self.instance, kwargs)
File "/var/lib/awx/venv/awx/lib64/python3.9/site-packages/awx/main/tasks/jobs.py", line 1163, in build_passwords
passwords['scm_password'] = project_update.credential.get_input('password', default='')
File "/var/lib/awx/venv/awx/lib64/python3.9/site-packages/awx/main/models/credential/__init__.py", line 278, in get_input
return decrypt_field(self, field_name)
File "/var/lib/awx/venv/awx/lib64/python3.9/site-packages/awx/main/utils/encryption.py", line 159, in decrypt_field
return smart_str(decrypt_value(key, value))
File "/var/lib/awx/venv/awx/lib64/python3.9/site-packages/awx/main/utils/encryption.py", line 136, in decrypt_value
value = f.decrypt(encrypted)
File "/var/lib/awx/venv/awx/lib64/python3.9/site-packages/cryptography/fernet.py", line 90, in decrypt
return self._decrypt_data(data, timestamp, time_info)
File "/var/lib/awx/venv/awx/lib64/python3.9/site-packages/cryptography/fernet.py", line 151, in _decrypt_data
self._verify_signature(data)
File "/var/lib/awx/venv/awx/lib64/python3.9/site-packages/cryptography/fernet.py", line 135, in _verify_signature
raise InvalidToken
cryptography.fernet.InvalidTokentype or paste code here
On investigating I came to know that there can be a SECRET key mismatch between the old awx and the new one.
So the old AWX secret key value inside /etc/tower/SECRET_KEY is awxsecret and on encoding this in base64 it is giving me YXd4c2VjcmV0.
Whereas the new AWX contains this value ZjczbU5CbmtzdVNRcXd1MFpDNnQ5S25VdVBmbDRtU0Y=
On decoding this value I am getting f73mNBnksuSQqwu0ZC6t9KnUuPfl4mSF which is currently set in /etc/tower/SECRET in awx-container inside the awx_task pod awx-task-6777c747b8-lwb5t.
So in order to make the new AWX work should I set the value to awxsecret or YXd4c2VjcmV0 inside /etc/tower/SECRET inside the awx-task container inside the pod ?
Or is there something else that I need to follow ?
Please help as AWX on k8s is something new for me