Skip to content

feat(ansible): BOXP-178 control-plane journal/watchdog verification - #12604

Open
boxp wants to merge 2 commits into
mainfrom
codex-task-board/BOXP-178-20260825T034056Z-c4a19622-29ff-4c6e-aeaa-368c1552a4c1
Open

feat(ansible): BOXP-178 control-plane journal/watchdog verification#12604
boxp wants to merge 2 commits into
mainfrom
codex-task-board/BOXP-178-20260825T034056Z-c4a19622-29ff-4c6e-aeaa-368c1552a4c1

Conversation

@boxp

@boxp boxp commented Aug 25, 2026

Copy link
Copy Markdown
Owner

Summary

BOXP-178: control-plane journaldの永続化とhardware watchdogの実効化・検証を実装。

  • node_resilience.yml: /dev/watchdog デバイスが実機上で存在しない場合に明示的にFAIL(watchdog configuredだが有効化不能をサイレント成功扱いにしない)
  • playbooks/verify-control-plane-resilience.yml: 新規post-apply read-only検証playbook
    • journald Storage実効値・前bootジャーナル存在・RuntimeWatchdogUSec > 0・/dev/watchdog存在・armbian-ramlogが/var/logをマウントしていないことをassert
    • ホストごとに機械可読JSONアーティファクトを出力(ansible/.verify-artifacts/control-plane-resilience-<host>.json
  • molecule/default/verify.yml: Docker環境ではwatchdog device checkがスキップされることをコメントで明示。drop-in書き込みはassertで確認

Acceptance Criteria 状態

  • Ansible role実装済み(journald.yml / node_resilience.yml)— 既存
  • StorageMode/armbian-ramlog競合回避はidempotent — 既存
  • RuntimeWatchdogSecのdrop-in明示 — 既存
  • watchdog device不在をfailにする検証 — 今回追加
  • post-apply read-only検証と機械可読artifact出力 — 今回追加(verify-control-plane-resilience.yml
  • ansible-lint/syntax通過(exit 0)
  • PRに実際のrole/playbook差分を含む

注意事項

  • reboot、watchdog発火試験、live applyはご主人さまの承認後に実施
  • 実稼働apply後にのみ「実効化済み」と報告可能

Test plan

  • CI: test-ansible.ymlのmolecule testがパスすることを確認(kubernetes_componentsのdefault/journald-disabled/journald-purgeシナリオ)
  • ansible-lint手動実行でexit 0を確認
  • 実機へのapply後、verify-control-plane-resilience.ymlを実行してJSONアーティファクトを確認

🤖 Generated with Claude Code

- node_resilience.yml: fail loudly when /dev/watchdog is absent on real
  hardware (watchdog configured but not activatable must not be silent)
- playbooks/verify-control-plane-resilience.yml: new read-only post-apply
  playbook that asserts effective journald Storage, previous-boot journal,
  RuntimeWatchdogUSec > 0, /dev/watchdog presence, and armbian-ramlog not
  mounting /var/log; outputs machine-readable JSON artifact per host
- molecule default verify.yml: document that watchdog device check is
  expected to be skipped in Docker; assert drop-in was written

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@github-actions

This comment has been minimized.

…esilience

- Fix armbian-ramlog mount check: use regex_search('ramlog|zram') instead of
  checking for empty stdout, which was wrong when /var/log has no dedicated
  mount (findmnt returns root fs source, not empty)
- Remove 'when: rc == 0' guards that silently skipped assertions on command
  failure; add explicit assert tasks that fail loudly when journalctl
  --list-boots or systemctl show RuntimeWatchdogUSec fail
- Replace unused journalctl --header with systemd-analyze cat-config to
  verify the effective merged Storage= value (catches cases where a drop-in
  is overridden by another drop-in or where journald has not been reloaded)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown
Contributor

Ansible Plan Results

Mode: --check --diff (dry run)

⚠️ Changes detected


golyat-4: worker-image

Host OK Changed Skipped Failed Unreachable
golyat-4 86 1 57 0 0

1 changed

Changed Tasks (1)
# Task Module
1 user_management : Update package cache unknown

shanghai-1: control-plane

Host OK Changed Skipped Failed Unreachable
shanghai-1 108 1 37 0 0

1 changed

Changed Tasks (1)
# Task Module
1 user_management : Update package cache unknown

shanghai-1: node-shanghai-1

Host OK Changed Skipped Failed Unreachable
shanghai-1 9 0 0 0 0

No changes

shanghai-2: control-plane

Host OK Changed Skipped Failed Unreachable
shanghai-2 108 1 37 0 0

1 changed

Changed Tasks (1)
# Task Module
1 user_management : Update package cache unknown

shanghai-2: node-shanghai-2

Host OK Changed Skipped Failed Unreachable
shanghai-2 9 0 0 0 0

No changes

shanghai-3: control-plane

Host OK Changed Skipped Failed Unreachable
shanghai-3 108 1 37 0 0

1 changed

Changed Tasks (1)
# Task Module
1 user_management : Update package cache unknown

shanghai-3: node-shanghai-3

Host OK Changed Skipped Failed Unreachable
shanghai-3 9 0 0 0 0

No changes


Plan executed on all nodes in parallel.

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.

1 participant