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

AWX 17.0.0 Fresh Install fails on creation of .awx/awxcompose directory #9140

Closed
jpronans opened this issue Jan 22, 2021 · 5 comments
Closed
Labels

Comments

@jpronans
Copy link

ISSUE TYPE
  • Installation fails.
SUMMARY

Running ansible-playbook -i inventory install.yml with defaults fails.

User:
awx@ubuntu:~/awx/installer$ id
uid=1001(awx) gid=1001(awx) groups=1001(awx),27(sudo),117(docker)

ENVIRONMENT
  • AWX version: 17.0.0
  • AWX install method: docker on linux
  • Ansible version: 2.9.6
  • Operating System: Ubuntu 20.04.1
  • Web Browser: N/A
STEPS TO REPRODUCE

Add a password to inventory (no other changes).
Attempt installation as unprivileged user (that is in the docker group)

ansible-playbook -i inventory install.yml

EXPECTED RESULTS

Installation to complete.

ACTUAL RESULTS

TASK [local_docker : Create ~/.awx/awxcompose directory] ***********************
fatal: [localhost]: FAILED! => {"changed": false, "msg": "There was an issue creating /home/awx/.awx/awxcompose as requested: [Errno 13] Permission denied: b'/home/awx/.awx/awxcompose'", "path": "/home/awx/.awx/awxcompose"}

ADDITIONAL INFORMATION

Simple fix (for me) was to put postgres_data_dir and docker_compose_dir to two separate locations.

~/.awx becomes owned by root which prevents the installer from creating the awxcompose directory with awx:awx ownership.

@sean-m-sullivan
Copy link
Contributor

I am also experiencing this issue, using github runner to standup an awx for collection testing, and get the following

fatal: [localhost]: FAILED! => {"changed": false, "msg": "There was an issue creating /home/runner/.awx/awxcompose as requested: [Errno 13] Permission denied: b'/home/runner/.awx/awxcompose'", "path": "/home/runner/.awx/awxcompose"}

when installer run as sudo

failed: [localhost] (item={u'mode': u'0600', u'file': u'environment.sh'}) => {"ansible_loop_var": "item", "changed": false, "checksum": "18957af76126a0769a3d66e4e5a62ff17144eed2", "item": {"file": "environment.sh", "mode": "0600"}, "msg": "Destination directory /root/.awx/awxcompose does not exist"}

@shanemcd
Copy link
Member

@rooftopcellist Can you take a look at this on Monday? It seems fresh installs may be broken after one of your recent PRs.

@rooftopcellist
Copy link
Member

As mentioned, the issue is that the .awx directory's permissions get restricted to root at some point. @sean-m-sullivan @jpronans As a work-around, you can chown the .awx directory (default path is ~/.awx) to be owned by the non-root user that you run the playbook as.

I will figure out a more permanent fix for this, but that will make the installer run to completion and install AWX 17.0.0.

@rooftopcellist
Copy link
Member

The fix for this is merged and will be in AWX 17.0.1.

@sean-m-sullivan
Copy link
Contributor

Wanted to follow up, was able to test this and has solved the problem, thanks for getting it done!

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

No branches or pull requests

5 participants