Awx-operator: Can't log in after deployment

Created on 12 Mar 2021  ·  7Comments  ·  Source: ansible/awx-operator

After deploying AWX (using awx-operator) there is no secret awx-admin-password, there is a secret awx-secret-key which is not accepted for the password. I tried to give tower_admin_password_secret variable, but the secret isn't created either.
So the AWX is deployed, the login page is opened, but there is no way to login.

Most helpful comment

Hi, I faced the same issue and found out a solution after several hours inspecting awx-web and awx-task containers :)

It seems that the current version of awx from the devel branch is not stable and doesn't create the admin user at all.

Therefore, this command from Installition Guidline with AWX Operator and Minikube doesn't work:
minikube kubectl -- get secret awx-admin-password -o jsonpath='{.data.password}' | base64 --decode

To fix this issue you can run:
minikube kubectl get pods
and then replace with your awx pod name:
minikube kubectl exec pod/<awx_pod_name> -- --container awx-web -it awx-manage createsuperuser

I created user with default awx name and it works perfectly.
Hope, it will help :)

All 7 comments

Hey, I reset the password for my installation using:

http://vcloud-lab.com/entries/devops/reset-ansible-awx-tower-admin-password

awx-manage changepassword admin

If the user does not exist, you need to:

awx-manage createsuperuser --user admin

To ssh into the awx_task container you can install lens, and get your kubeconfig from:

kubectl config view

I tried this way to create a superuser not with name admin, but it doesn't work, will try with admin. Thanks.
Anyway the documentation doesn't reflect the reality.

Hi, I faced the same issue and found out a solution after several hours inspecting awx-web and awx-task containers :)

It seems that the current version of awx from the devel branch is not stable and doesn't create the admin user at all.

Therefore, this command from Installition Guidline with AWX Operator and Minikube doesn't work:
minikube kubectl -- get secret awx-admin-password -o jsonpath='{.data.password}' | base64 --decode

To fix this issue you can run:
minikube kubectl get pods
and then replace with your awx pod name:
minikube kubectl exec pod/<awx_pod_name> -- --container awx-web -it awx-manage createsuperuser

I created user with default awx name and it works perfectly.
Hope, it will help :)

Thank you all, I already created the admin superuser from inside the awx-web.
Just let this open, as there is a bug with admin user creating.

Thanks it works,
on kubernetes cluster : kubectl exec pod/<awx_pod_name> --container awx-web -it awx-manage createsuperuser
on minikube : minikube kubectl exec pod/<awx_pod_name> -- --container awx-web -it awx-manage createsuperuser

Hello all,

My guess is that you might be affected by this https://github.com/ansible/awx-operator/issues/124

TL;DR: Current devel of the CRDs and logic does not necessarily work with 0.6.0. If you want to fix this now while the above issue is addressed, follow this pattern:

  1. Download and install operator-sdk==0.19.4 https://v0-19-x.sdk.operatorframework.io/docs/install-operator-sdk/
  2. Build the operator container operator-sdk build <url>:<tag> (at the root of this repo)
  3. Push the container docker push <url>:<tag>
  4. Retrieve locally https://raw.githubusercontent.com/ansible/awx-operator/devel/deploy/awx-operator.yaml and update the url to the operator container
  5. Deploy.

Hope this helps,

Hi @Spredzy, thanks. I built and replaced the image and it works.
I hope this inconsistency will be fixed shortly.

Was this page helpful?
0 / 5 - 0 ratings