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

respect home directory symlinks for BASE_VENV_PATH #6152

Merged

Conversation

ryanpetrello
Copy link
Contributor

@ryanpetrello ryanpetrello commented Mar 3, 2020

@@ -44,7 +44,7 @@
SCHEDULE_METADATA_LOCATION = '/var/lib/awx/.tower_cycle'

# Ansible base virtualenv paths and enablement
BASE_VENV_PATH = "/var/lib/awx/venv"
BASE_VENV_PATH = os.path.realpath("/var/lib/awx/venv")
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

bwrap won't follow symlinks

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why here instead of where it's used later?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

@ryanpetrello ryanpetrello Mar 5, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But really, there's a few other places where this setting is utilized (like in the code where we look for custom venvs).

Also, this patch comes from the field; @gamuniz had a user complaining about this issue apply this patch to production.py and it resolved their issue.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yep safest place is top level, unless you're saying we should change it everywhere? The user I helped with this setting has reported it fixed their issue

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just saying, this only works if /var/lib/awx or /var/lib/awx/venv is a symlink. If there are symlinks in that dir, it will still fail.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ahh. Yeah i think if the use-case is to use another directory for venvs we could use the custom_venv_paths, this fix is for those who have their home directory symlinked

@ryanpetrello ryanpetrello changed the title respect symlinks the inventory import venv_path respect home directory symlinks for BASE_VENV_PATH Mar 3, 2020
@softwarefactory-project-zuul
Copy link
Contributor

Build succeeded.

@softwarefactory-project-zuul
Copy link
Contributor

Build succeeded (gate pipeline).

@softwarefactory-project-zuul softwarefactory-project-zuul bot merged commit e34e885 into ansible:devel Mar 5, 2020
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

Successfully merging this pull request may close these issues.

4 participants