Skip to content

Service: Remove already used disks from selection - #853

Merged
roosterfish merged 7 commits into
canonical:mainfrom
roosterfish:fix_disk_reuse
Jul 10, 2025
Merged

Service: Remove already used disks from selection#853
roosterfish merged 7 commits into
canonical:mainfrom
roosterfish:fix_disk_reuse

Conversation

@roosterfish

@roosterfish roosterfish commented Jul 7, 2025

Copy link
Copy Markdown
Contributor

Fixes #847

Ensure that when collecting system information during bootstrap/join of MicroCloud clusters, disks which are already used for either MicroCeph OSDs (remote storage) or zfs (local storage) are filtered out.

This also positively influences some of the findings of #812.

@roosterfish
roosterfish marked this pull request as draft July 8, 2025 07:26
Allow passing a certificate which allows reaching out to the remote MicroCeph (through MicroCloud) using the
temporary trust store to fetch the list of already used disks.

Signed-off-by: Julian Pelizäus <julian.pelizaeus@canonical.com>
Pass nil as the certificate as the cluster is already formed at this stage and we don't anymore
need to rely on the temporary trust store but can instead communicate with the local MicroCeph directly.

Signed-off-by: Julian Pelizäus <julian.pelizaeus@canonical.com>
Pass nil as the certificate as the cluster is already formed at this stage and we don't anymore
need to rely on the temporary trust store but can instead communicate with the local MicroCeph directly.

Signed-off-by: Julian Pelizäus <julian.pelizaeus@canonical.com>
This allows a more wider use of the disk path formatting across the code base.

Signed-off-by: Julian Pelizäus <julian.pelizaeus@canonical.com>
Signed-off-by: Julian Pelizäus <julian.pelizaeus@canonical.com>
@roosterfish
roosterfish force-pushed the fix_disk_reuse branch 2 times, most recently from cdc5e29 to 801a8a4 Compare July 8, 2025 08:30
Ensure that when collecting a system's information we don't return any disks which are already
used by MicroCloud for either local or remote storage.

Signed-off-by: Julian Pelizäus <julian.pelizaeus@canonical.com>
…e contribution

When growing a cluster (microcloud add), it might be that the already existing members don't anymore have any left over disks.
In this case they aren't marked to contribute disks to the local storage when adding new cluster members.

Therefore we can skip those and only ever exit in case a member which should contribute local storage doesn't have any disks.
That is the case when creating a new cluster or when adding a cluster member which cannot fulfill the requirement of the
already existing cluster.

Signed-off-by: Julian Pelizäus <julian.pelizaeus@canonical.com>
@roosterfish
roosterfish marked this pull request as ready for review July 8, 2025 12:19
@roosterfish
roosterfish requested a review from markylaing July 8, 2025 13:00

@markylaing markylaing left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Again - all makes sense and well structured, thank you.

@roosterfish
roosterfish merged commit 670d31d into canonical:main Jul 10, 2025
27 checks passed
@roosterfish
roosterfish deleted the fix_disk_reuse branch July 10, 2025 07:15
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.

microcloud add shows already used disks when adding new systems

2 participants