-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
respect home directory symlinks for BASE_VENV_PATH #6152
Conversation
0ac7d10
to
fbf3bd6
Compare
fbf3bd6
to
b5e5fea
Compare
@@ -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") |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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
Build succeeded.
|
Build succeeded (gate pipeline).
|
cc @gamuniz