Skip to content

Restore a reinstallable direct agent binary on reset - #313

Draft
hbc (bcho) with Copilot wants to merge 2 commits into
mainfrom
copilot/make-reset-restore-reinstallable-binary
Draft

hbc (bcho) with Copilot wants to merge 2 commits into
mainfrom
copilot/make-reset-restore-reinstallable-binary

Conversation

Copilot AI commented Sep 18, 2026

Copy link
Copy Markdown
Contributor

Reset retained the managed blue/green symlink layout, forcing the installer to special-case post-reset hosts. This change moves binary restoration into reset while preserving a callable agent command.

  • Reset lifecycle

    • Stop the agent and recovery services.
    • Verify inactivity under the shared activation lock.
    • Atomically replace /usr/local/bin/aks-flex-node with the active executable before removing managed slots and links.
  • Safe cleanup

    • Reject unexpected symlinks and invalid executables.
    • Remove only known layout entries, preserving unexpected contents.
    • Support direct installations, repeated reset, and interrupted-cleanup retries.
  • Installer boundary

    • Remove installer-side managed-layout cleanup.
    • Reinstall through the normal direct-binary path after reset; retain AgentUpgrade for managed installations.

Co-authored-by: bcho <1975118+bcho@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix reset to correctly restore reinstallable direct agent binary Restore a reinstallable direct agent binary on reset Sep 18, 2026
Copilot AI requested a review from hbc (bcho) September 18, 2026 20:25

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Make reset restore a reinstallable direct agent binary

2 participants