Repository navigation
Conversation
|
@roosterfish this follows #1034 for the storage half of #862: when the cluster already has the local pool, |
There was a problem hiding this comment.
Copilot review overview
🔵 Needs a closer look
Storage setup behavior warrants final human review.
Review effort: Lite
Findings: None
What changed in this PR
Updates microcloud add to require local-storage disks when joining a cluster with an existing local pool.
Changes:
- Enforces disk availability for all new members.
- Skips the redundant storage prompt during applicable joins.
- Updates test helpers and integration scenarios.
| File | Description |
|---|---|
test/suites/basic.sh |
Updates cluster-growth scenarios. |
test/suites/add.sh |
Updates add-session coverage. |
test/includes/microcloud.sh |
Supports implicit ZFS disk selection. |
cmd/microcloud/ask.go |
Enforces mandatory local disk selection for joins. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
roosterfish
left a comment
There was a problem hiding this comment.
I was giving it a try and this already looks good. But after removing the question whether or not to configure local storage, it should be clear for the user what the table is about when getting prompted to select a disk:
Gathering system information...
Select exactly one disk from each cluster member:
Filter | <type to filter rows>
┌──────────┬───────────────┬──────────┬──────┬────────────────────────────────────────────────────┐
│ LOCATION │ MODEL │ CAPACITY │ TYPE │ PATH │
├──────────┼───────────────┼──────────┼──────┼────────────────────────────────────────────────────┤
> │ micro02 │ QEMU HARDDISK │ 10.00GiB │ scsi │ /dev/disk/by-id/scsi-0QEMU_QEMU_HARDDISK_lxd_disk1 │
│ micro02 │ QEMU HARDDISK │ 10.00GiB │ scsi │ /dev/disk/by-id/scsi-0QEMU_QEMU_HARDDISK_lxd_disk2 │
└──────────┴───────────────┴──────────┴──────┴────────────────────────────────────────────────────┘
space to select; enter to confirm
↑/↓ to move; → to select all; ← to select none
So what about changing the sentence Select exactly one disk from each cluster member: to Select exactly one disk from each cluster member for local storage:?
|
@roosterfish thanks, good point. The prompt now reads |
roosterfish
left a comment
There was a problem hiding this comment.
Thanks, looks good to me. I'll merge once we are done cutting the branch for the upcoming release cycle.
|
You can rebase with |
c06b1a3 to
bfabfb8
Compare
|
@roosterfish I rebased onto |
roosterfish
left a comment
There was a problem hiding this comment.
Please also squash the two new commits with the existing ones that add the new error message/tests so that you don't add and remove changes in the same PR.
In case the existing cluster already has the local storage pool, new members cannot skip the disk selection as the pool is required on every cluster member. Fail early if any of the new members does not have an available disk. Signed-off-by: Waleed Khalid <wak327@gmail.com>
Signed-off-by: Waleed Khalid <wak327@gmail.com>
bfabfb8 to
c41ae07
Compare
|
@roosterfish I switched the test to |
roosterfish
left a comment
There was a problem hiding this comment.
One more comment after reviewing the added test.
Signed-off-by: Waleed Khalid <wak327@gmail.com>
Signed-off-by: Waleed Khalid <wak327@gmail.com>
Signed-off-by: Waleed Khalid <wak327@gmail.com>
c41ae07 to
af11802
Compare
|
@roosterfish I've removed the unnecessary snap toggling for micro04 in the new test and squashed it into the existing test commit. Could you take another look? |
Fixes #862
#1034 covered the networking half of this issue. This PR covers the storage half, using the same approach.
If the existing cluster already has the local storage pool, the new members must also be set up with a disk for it. Right now
microcloud addstill asksWould you like to set up local storage?, and answeringnocauses errors later in the setup. With this change:microcloud addnow fails right away withCannot set up the existing local storage pool on all new systems. Some systems do not have an available disk. Before, it printed a warning and skipped the pool.Nothing changes for
microcloud init. Nothing changes formicrocloud service addeither, since it runs withbootstrap: true. Adding to a cluster that doesn't have the local pool still asks the question as before.Test suite: following the
SETUP_OVN_EXPLICIT/SETUP_OVN_IMPLICITsplit from #1034, this addsSETUP_ZFS_IMPLICIT, which skips the yes/no answer but still selects the disks. Theaddsessions that join a cluster which already has the local pool now use it: two intest/suites/add.shand two intest/suites/basic.sh. I checked thatmicrocloud_interactiveproduces the same input as before forSETUP_ZFS=yes, and the same input minus theyesline forSETUP_ZFS_IMPLICIT=yes. I couldn't run the LXD-based system suites locally, so CI will be the first full run.Checklist