Repository navigation
Conversation
…unit systemd-run starts the unit with systemd's environment, so ORB_DEPLOY_CANARY=warn orb-deploy --detach ... silently ran the canaries in block mode (and ORB_DEPLOY_BUILD/SELFTEST etc. were dropped too). Every set ORB_DEPLOY_* variable is now passed with --setenv, except ORB_DEPLOY_LOCK_FD (a descriptor of the calling process).
This branch has not been deployed
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.
What and why
orb-deploy --detachre-execs itself throughsystemd-run, whose transient unit starts with systemd's environment rather than the caller's. SoORB_DEPLOY_CANARY=warn orb-deploy --detach …silently ran the canaries in block mode, andORB_DEPLOY_BUILD,ORB_DEPLOY_SELFTESTand the aarch64 knobs were dropped the same way. Found on the first canary deploy of #2368.Every
ORB_DEPLOY_*variable that is set is now forwarded with--setenv.ORB_DEPLOY_LOCK_FDis excluded, because it names a file descriptor of the calling process.How it was tested
python3 scripts/test_orb_dev_autodeploy.py: 31 tests OK. The new testtest_detach_forwards_orb_deploy_knobs_to_the_transient_unitruns--detachwith stubsystemd-run/systemctlon PATH. It checks thatORB_DEPLOY_CANARY=warnandORB_DEPLOY_BUILD=1are forwarded, thatORB_DEPLOY_LOCK_FDand unrelated variables are not, and that the arguments are passed on unchanged. The new test fails against master'sorb-deploy.Not verified live
canaries FAILED; ORB_DEPLOY_CANARY=warn(rather than stopping) when a canary fails. Closed by: the nextORB_DEPLOY_CANARY=warn orb-deploy --detachrun (lead session).