[PR #9] [MERGED] Phase 3: lxc_update → Python flow behind --use-lxc-flow #10

Closed
opened 2026-06-02 20:54:30 +08:00 by ivenator1 · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ivenator1/proxmox-management/pull/9
Author: @ivenator1
Created: 5/30/2026
Status: Merged
Merged: 5/30/2026
Merged by: @ivenator1

Base: mainHead: claude/phase-3-lxc-flow


📝 Commits (6)

  • eb79499 Phase 3: port lxc_update to Python flow behind --use-lxc-flow flag
  • 6a30716 Phase 3-wire: rework lxc_update molecule to drive Python flow
  • ee17b23 docs: update migration roadmap to Phase 3 wired state
  • 68f4c8d fix: align snapshot-failure warning to match verify.yml substring check
  • 2b6438a docs: update CLAUDE.md for Phase 3 (lxc_update Python flow)
  • d3edd2c docs: update migration roadmap with Phase 3 implementation notes

📊 Changes

34 files changed (+2746 additions, -241 deletions)

View changed files

📝 .github/workflows/ci.yml (+2 -2)
📝 CLAUDE.md (+42 -17)
ansible/primitives/discover_lxcs.yml (+29 -0)
ansible/primitives/lxc_app_update.yml (+64 -0)
ansible/primitives/lxc_os_update.yml (+31 -0)
ansible/primitives/pct_config.yml (+25 -0)
ansible/primitives/pct_pull.yml (+28 -0)
ansible/primitives/pct_start.yml (+24 -0)
ansible/primitives/pct_status.yml (+25 -0)
ansible/primitives/pct_stop.yml (+24 -0)
ansible/primitives/rollback.yml (+26 -0)
ansible/primitives/snapshot.yml (+35 -0)
ansible/primitives/vzdump.yml (+31 -0)
📝 docs/migration-roadmap.md (+106 -45)
📝 fleet-update.yml (+47 -20)
📝 proxmox_fleet/changes.py (+33 -0)
📝 proxmox_fleet/cli.py (+37 -13)
📝 proxmox_fleet/driver.py (+87 -1)
📝 proxmox_fleet/executor.py (+47 -0)
proxmox_fleet/flows/lxc.py (+462 -0)

...and 14 more files

📄 Description

Summary

  • Ports roles/lxc_update/tasks/ to proxmox_fleet/flows/lxc.py — full try/except/finally mirroring block/rescue/always, with snapshot-only rollback, resource scaling, dpkg hash change detection, and Kuma health gating
  • Adds 11 Ansible execution primitives (snapshot.yml, rollback.yml, pct_*.yml, vzdump.yml, lxc_{os,app}_update.yml, discover_lxcs.yml) — single-action, no decisions
  • Adds 90 Python parity tests (test_status_lxc.py) mirroring the 6 existing Jinja tests case-for-case, and 14 flow integration tests (test_flow_lxc.py) with a ScriptedLxcExecutor
  • Wires --use-lxc-flow CLI flag: Python driver runs Phase 1 then passes skip_phase_1=true + fleet_lxc_state_path to the playbook; a new merge play seeds fleet_lxc_data before Phase 1b
  • Reworks 3 CI molecule scenarios (normal, rollback, snapfail) to drive flows/lxc.py via mol_run_flow.py with a MolLxcExecutor stub for snapshot (no PVE needed)

Test plan

  • pytest tests/unit/ -v — 442 tests pass (338 original + 104 new)
  • python -m mypy proxmox_fleet/ — clean
  • yamllint . — no errors
  • ansible-lint fleet-update.yml — warnings only (line length, pre-existing)
  • ansible-playbook fleet-update.yml --syntax-check — passes
  • molecule test -s lxc_update_normal (CI will run)
  • molecule test -s lxc_update_rollback (CI will run)
  • molecule test -s lxc_update_snapfail (CI will run)
  • Real --check run on live infra to confirm parity before retire step

Retire step (after real-run parity confirmed): delete roles/lxc_update/tasks/, roles/lxc_update/defaults/, and 6 Jinja test files; flip --use-lxc-flow to the unconditional default.

🤖 Generated with Claude Code


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/ivenator1/proxmox-management/pull/9 **Author:** [@ivenator1](https://github.com/ivenator1) **Created:** 5/30/2026 **Status:** ✅ Merged **Merged:** 5/30/2026 **Merged by:** [@ivenator1](https://github.com/ivenator1) **Base:** `main` ← **Head:** `claude/phase-3-lxc-flow` --- ### 📝 Commits (6) - [`eb79499`](https://github.com/ivenator1/proxmox-management/commit/eb794991025053192fd612aa360cb4acce7fdbe5) Phase 3: port lxc_update to Python flow behind --use-lxc-flow flag - [`6a30716`](https://github.com/ivenator1/proxmox-management/commit/6a30716d12192f72bba6465d2ca5a249a70a4b22) Phase 3-wire: rework lxc_update molecule to drive Python flow - [`ee17b23`](https://github.com/ivenator1/proxmox-management/commit/ee17b2347a4239fc9f7a2a043cb769da6e42d183) docs: update migration roadmap to Phase 3 wired state - [`68f4c8d`](https://github.com/ivenator1/proxmox-management/commit/68f4c8d56456c523b3286f7009001954a828742f) fix: align snapshot-failure warning to match verify.yml substring check - [`2b6438a`](https://github.com/ivenator1/proxmox-management/commit/2b6438a1865b06ad638262fdeeafff37d77f1fc2) docs: update CLAUDE.md for Phase 3 (lxc_update Python flow) - [`d3edd2c`](https://github.com/ivenator1/proxmox-management/commit/d3edd2cbc14687229dfa1dd8f441461e0b4b1d1d) docs: update migration roadmap with Phase 3 implementation notes ### 📊 Changes **34 files changed** (+2746 additions, -241 deletions) <details> <summary>View changed files</summary> 📝 `.github/workflows/ci.yml` (+2 -2) 📝 `CLAUDE.md` (+42 -17) ➕ `ansible/primitives/discover_lxcs.yml` (+29 -0) ➕ `ansible/primitives/lxc_app_update.yml` (+64 -0) ➕ `ansible/primitives/lxc_os_update.yml` (+31 -0) ➕ `ansible/primitives/pct_config.yml` (+25 -0) ➕ `ansible/primitives/pct_pull.yml` (+28 -0) ➕ `ansible/primitives/pct_start.yml` (+24 -0) ➕ `ansible/primitives/pct_status.yml` (+25 -0) ➕ `ansible/primitives/pct_stop.yml` (+24 -0) ➕ `ansible/primitives/rollback.yml` (+26 -0) ➕ `ansible/primitives/snapshot.yml` (+35 -0) ➕ `ansible/primitives/vzdump.yml` (+31 -0) 📝 `docs/migration-roadmap.md` (+106 -45) 📝 `fleet-update.yml` (+47 -20) 📝 `proxmox_fleet/changes.py` (+33 -0) 📝 `proxmox_fleet/cli.py` (+37 -13) 📝 `proxmox_fleet/driver.py` (+87 -1) 📝 `proxmox_fleet/executor.py` (+47 -0) ➕ `proxmox_fleet/flows/lxc.py` (+462 -0) _...and 14 more files_ </details> ### 📄 Description ## Summary - Ports `roles/lxc_update/tasks/` to `proxmox_fleet/flows/lxc.py` — full `try/except/finally` mirroring `block/rescue/always`, with snapshot-only rollback, resource scaling, dpkg hash change detection, and Kuma health gating - Adds 11 Ansible execution primitives (`snapshot.yml`, `rollback.yml`, `pct_*.yml`, `vzdump.yml`, `lxc_{os,app}_update.yml`, `discover_lxcs.yml`) — single-action, no decisions - Adds 90 Python parity tests (`test_status_lxc.py`) mirroring the 6 existing Jinja tests case-for-case, and 14 flow integration tests (`test_flow_lxc.py`) with a `ScriptedLxcExecutor` - Wires `--use-lxc-flow` CLI flag: Python driver runs Phase 1 then passes `skip_phase_1=true` + `fleet_lxc_state_path` to the playbook; a new merge play seeds `fleet_lxc_data` before Phase 1b - Reworks 3 CI molecule scenarios (`normal`, `rollback`, `snapfail`) to drive `flows/lxc.py` via `mol_run_flow.py` with a `MolLxcExecutor` stub for snapshot (no PVE needed) ## Test plan - [x] `pytest tests/unit/ -v` — 442 tests pass (338 original + 104 new) - [x] `python -m mypy proxmox_fleet/` — clean - [x] `yamllint .` — no errors - [x] `ansible-lint fleet-update.yml` — warnings only (line length, pre-existing) - [x] `ansible-playbook fleet-update.yml --syntax-check` — passes - [ ] `molecule test -s lxc_update_normal` (CI will run) - [ ] `molecule test -s lxc_update_rollback` (CI will run) - [ ] `molecule test -s lxc_update_snapfail` (CI will run) - [ ] Real `--check` run on live infra to confirm parity before retire step **Retire step** (after real-run parity confirmed): delete `roles/lxc_update/tasks/`, `roles/lxc_update/defaults/`, and 6 Jinja test files; flip `--use-lxc-flow` to the unconditional default. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
ivenator1 2026-06-02 20:54:30 +08:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
ivenator1/proxmox-management#10
No description provided.