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

Can't log in after deployment #123

Closed
k-harutyunyan opened this issue Mar 12, 2021 · 9 comments
Closed

Can't log in after deployment #123

k-harutyunyan opened this issue Mar 12, 2021 · 9 comments

Comments

@k-harutyunyan
Copy link

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.

@jeffpascal
Copy link

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

@k-harutyunyan
Copy link
Author

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.

@OlhaTuranska
Copy link

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 <awx_pod_name> 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 :)

@k-harutyunyan
Copy link
Author

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.

@veekrum
Copy link

veekrum commented Mar 15, 2021

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

@Spredzy
Copy link
Collaborator

Spredzy commented Mar 15, 2021

Hello all,

My guess is that you might be affected by this #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,

@k-harutyunyan
Copy link
Author

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

@Spredzy Spredzy closed this as completed Mar 24, 2021
@kgoddarddev
Copy link

Yes! Thank you even the current version is glitched with this issue:

This command works: k exec -n awx -it $(k get pods -n awx -l app.kubernetes.io/component=awx -o name) -c awx-task -- awx-

@vivekshete9
Copy link

vivekshete9 commented May 3, 2024

Current version (v2.16.1 for operator and v24.3.1 for awx) is glitched with this issue as well. This helped on kubernetes cluster : kubectl exec pod/<awx_pod_name> --container awx-web -it awx-manage createsuperuser

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants