[agent] Add blue/green host daemon binary rollout with systemd recovery fallback#53
Draft
[agent] Add blue/green host daemon binary rollout with systemd recovery fallback#53
Conversation
Agent-Logs-Url: https://github.com/Azure/unbounded-kube/sessions/2a287b33-55c1-4c9a-8974-cdb46aa6b443 Co-authored-by: bcho <1975118+bcho@users.noreply.github.com>
Agent-Logs-Url: https://github.com/Azure/unbounded-kube/sessions/2a287b33-55c1-4c9a-8974-cdb46aa6b443 Co-authored-by: bcho <1975118+bcho@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Implement blue-green update for host daemon systemd unit
[agent] Add blue/green host daemon binary rollout with systemd recovery fallback
Apr 17, 2026
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.
This change adds a resilient host-agent upgrade path: keep a last-known-good binary on-host and recover automatically if the daemon fails after an update. The daemon now runs through stable symlinks so rollout and rollback are atomic.
Blue/green host binary slots + stable pointers
unbounded-agent-install.shnow alternates installs between:/usr/local/bin/unbounded-agent-blue/usr/local/bin/unbounded-agent-green/usr/local/bin/unbounded-agent-current(active target)/usr/local/bin/unbounded-agent-last-good(rollback target)Daemon unit switched to indirection + failure hook
unbounded-agent-daemon.servicenow executes:/usr/local/bin/unbounded-agent-current daemonOnFailure=unbounded-agent-daemon-recovery.serviceSystemd recovery path for self-healing rollback
unbounded-agent-daemon-recovery.serviceunbounded-agent-daemon-recovery.shunbounded-agent-currenttounbounded-agent-last-goodsystemctl reset-failed unbounded-agent-daemon.serviceLifecycle cleanup alignment
Script contract updates