Skip to content

fix(cleanup): preserve attached block devices - #295

Draft
Q-Dub wants to merge 17 commits into
mainfrom
EAI-7797_virtio_scsi_disk_detach
Draft

fix(cleanup): preserve attached block devices#295
Q-Dub wants to merge 17 commits into
mainfrom
EAI-7797_virtio_scsi_disk_detach

Conversation

@Q-Dub

@Q-Dub Q-Dub commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

Remove the legacy disk hot-removal sweep so cleanup cannot detach virtio-SCSI cloud volumes after wiping them.

lauri-amd
lauri-amd previously approved these changes Aug 7, 2026
Q-Dub and others added 6 commits August 10, 2026 08:33
Remove the legacy disk hot-removal sweep so cleanup cannot detach virtio-SCSI cloud volumes after wiping them.

Co-authored-by: Cursor <cursoragent@cursor.com>
Resolve canonical block-device identities, protect system dependency chains, strictly parse Bloom fstab records, and compare configured storage with live state before destructive cleanup.

Co-authored-by: Cursor <cursoragent@cursor.com>
Guard every wipe against protected and mounted device trees, restrict fstab mutations to validated entries, preserve untagged Rancher storage, revalidate premounted sources, and make Longhorn iSCSI parsing field-position independent. Add regression coverage for strict tags, root-device rejection, explicit empty configs, and parser edge cases.

Co-authored-by: Cursor <cursoragent@cursor.com>
Add cleanup --preflight-only, fail on unreadable configs, lock resolved disk scope before confirmation, and rerun validation immediately before both standalone cleanup and --destroy-data teardown.

Co-authored-by: Cursor <cursoragent@cursor.com>
Describe preflight-only usage, config/fstab/live-state checks, protected device chains, strict Rancher ownership, repeated validation, and the corrected wipe-and-reformat cleanup behavior.

Co-authored-by: Cursor <cursoragent@cursor.com>
@Q-Dub
Q-Dub force-pushed the EAI-7797_virtio_scsi_disk_detach branch from 8edbe23 to 89ec209 Compare August 10, 2026 05:36
Q-Dub and others added 11 commits August 10, 2026 12:34
Stop the preview from independently adding live legacy Rancher mounts after preflight, and explicitly report when no strictly managed storage will be wiped.

Co-authored-by: Cursor <cursoragent@cursor.com>
Allow bloom.yaml RANCHER_DISK to authorize untagged /var/lib/rancher
mounts when live and fstab device identities match, while configless
cleanup still requires strict Bloom fstab tags.

Co-authored-by: Cursor <cursoragent@cursor.com>
Point configless preflight at rerunning cleanup with an explicit
RANCHER_DISK entry instead of implying only manual fstab tagging works.

Co-authored-by: Cursor <cursoragent@cursor.com>
Detect when CLUSTER_DISKS points at /var/lib/rancher storage and suggest
moving the device to RANCHER_DISK, with generic guidance when no specific
misconfiguration is found.

Co-authored-by: Cursor <cursoragent@cursor.com>
Validate CLUSTER_DISKS and RANCHER_DISK against protected root, boot,
swap, and other critical mounts before fstab agreement checks so stale
configs surface a clear safety error with remediation hints.

Co-authored-by: Cursor <cursoragent@cursor.com>
Use exact findmnt mount points instead of path targets so directories
like /srv on root are ignored, and accumulate mount reasons so whole-disk
errors list /, /boot, and /boot/efi instead of a misleading last entry.

Co-authored-by: Cursor <cursoragent@cursor.com>
Clarify generic CLUSTER_DISKS remediation covers both Bloom fstab tags,
including rancher-disk for RANCHER_DISK entries.

Co-authored-by: Cursor <cursoragent@cursor.com>
When a Bloom tag is used on the wrong mount point, especially
# managed by cluster-bloom on /var/lib/rancher, preflight now
explains the expected comment format for each disk role.

Co-authored-by: Cursor <cursoragent@cursor.com>
Move cleanup fstab snapshots out of /etc into
/var/backups/cluster-bloom/fstab and retain only the five newest copies.

Co-authored-by: Cursor <cursoragent@cursor.com>
Align deployment validation with cleanup by allowing full
/dev/disk/by-id aliases for CLUSTER_DISKS and RANCHER_DISK while
rejecting bare aliases and path traversal.

Co-authored-by: Cursor <cursoragent@cursor.com>
Use short Longhorn disk names instead of encoded device paths and add regression coverage for stable by-id devices.

Co-authored-by: Cursor <cursoragent@cursor.com>
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.

3 participants