config: install varlock as agent user, not root#33
Merged
Conversation
setup.sh was running 'curl | sh' as root, which installed varlock to root's home. start.sh expects it at ~/.varlock/bin/varlock under the agent user. Now runs the installer as baudbot_agent via sudo -u so it lands in the right place.
Greptile SummaryFixed varlock installation to run as the
Confidence Score: 5/5
Important Files Changed
Last reviewed commit: 29e106a |
CI never actually ran start.sh or tested that varlock was installed for the agent user. This is why the varlock install bug (installed as root instead of baudbot_agent) wasn't caught. Now verifies: - varlock binary exists at /home/baudbot_agent/.varlock/bin/varlock - varlock load succeeds as the agent user (validates schema + .env)
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.
Problem
setup.shrunscurl | shas root to install varlock. This installs varlock to root's home directory (e.g./root/.varlock/bin/varlock). Butstart.shruns asbaudbot_agentand expects varlock at~/.varlock/bin/varlockunder the agent's home. Result:varlock: command not foundand the agent crash-loops.Fix
Run the varlock installer as
baudbot_agentviasudo -u, so it installs to/home/baudbot_agent/.varlock/bin/varlock.Also checks
$BAUDBOT_HOME/.varlock/bin/varlockbefore installing (idempotent).