Repository navigation
fix(installer): treat the venv as ready only after pip has finished - #80
Open
burgulvedant wants to merge 1 commit into
Open
burgulvedant wants to merge 1 commit into
burgulvedant wants to merge 1 commit into
Conversation
The installer reported .venv as done whenever ansible-playbook existed. If pip was interrupted partway, for example on an unstable network, the partly built venv was reused and the cluster install failed on a later step. Write a marker file once pip has installed requirements.txt, and rebuild the venv when the marker is missing. A venv created before this change has no marker, so it runs pip once more, which does nothing when everything is already installed. Closes intel#36 Signed-off-by: Vedant Burgul <[email protected]>
burgulvedant
requested review from
AhmedSeemalK,
Mushtaq-BGA,
aalbersk,
amberjain1,
jpiaseck,
mik-now,
mzyczyns and
vhpintel
as code owners
October 31, 2026 12:22
Author
|
@amberjain1 @Mushtaq-BGA @AhmedSeemalK could one of you approve the workflows for this PR so CI can run, and take a look when you have time? It makes the installer treat the venv as ready only after pip has finished, so an interrupted install no longer leaves a broken .venv. Happy to change anything. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why?
The installer reported .venv as done whenever ansible-playbook existed. If pip was interrupted partway, for example on an unstable network, the partly built venv was reused and the cluster install failed on a later step.
What?
After pip installs requirements.txt, the installer writes a marker file in .venv. _ensure_venv treats the venv as ready only when both ansible-playbook and the marker exist, and rebuilds it otherwise. A venv created before this change has no marker, so it runs pip once more, which does nothing when everything is already installed.
I did not use a temporary folder and a rename, as the issue suggests, because a venv's scripts contain the venv's absolute path and stop working once the folder is moved.
Test Plan
Checked the script syntax with bash -n. To reproduce, run ./es_auto_installer.sh configure, interrupt it during the pip step, and run it again. It should install the Python dependencies again instead of reporting an existing venv.
Issue
Closes #36