Skip to content

Commit

Permalink
[Developer Documentation] Add details of Upgrade Watcher interactions…
Browse files Browse the repository at this point in the history
… with Agent and upgrade marker file (elastic#3189)

* Add details of Upgrade Watcher interactions with Agent and upgrade marker file

* Use clearer wording
  • Loading branch information
ycombinator authored Aug 4, 2023
1 parent ebf2fe7 commit dfd9554
Showing 1 changed file with 17 additions and 10 deletions.
27 changes: 17 additions & 10 deletions docs/upgrades.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,21 +36,28 @@ sequenceDiagram
end
A->>A: Download new Agent artifact
A->>A: Extract new Agent artifact
A->>A: Replace current Agent artifact with new one
A->>A: Change symlink from current Agent binary to new one
A->>UM: Create
A->>A: Update active commit file
A->>UW: Start
A->>A: Rexec to start new Agent artifact
A->>FS: Ack successful upgrade
UW->>UM: Remove
FS->>ES: Write successful ack in `.fleet-actions-results`
FS->>ES: Update Agent doc in `.fleet-agents`<br />set `upgrade_status` = null<br />`upgraded_at` = <now><br />`upgrade_started_at` = null
UI->>UI: Show Agent status as "healthy"
end
opt Rollback
UW->>A: Start
A->>FS: Ack failed upgrade
FS->>ES: Update Agent doc in `.fleet-agents`<br />set `upgrade_status` = null<br />`upgraded_at = <now>
UI->>UI: Show Agent status as "healthy"
UW->>UM: Remove
end
UW->>UW: Start watching new Agent
alt New Agent is OK
UW->>UM: Remove
UW->>UW: Cleanup old Agent files
else Rollback
UW->>UW: Change symlink from current Agent binary to new one
UW->>UW: Update active commit file
UW->>A: Rexec to start old Agent artifact
A->>FS: Ack failed upgrade
FS->>ES: Update Agent doc in `.fleet-agents`<br />set `upgrade_status` = null<br />`upgraded_at = <now>
UI->>UI: Show Agent status as "healthy"
UW->>UM: Remove
UW->>UW: Cleanup new Agent files
end
end
```

0 comments on commit dfd9554

Please sign in to comment.