Skip to content

doc: add decommissioning guide#1450

Merged
roosterfish merged 2 commits into
canonical:mainfrom
elijahgreenstein:decommission
Jul 14, 2026
Merged

doc: add decommissioning guide#1450
roosterfish merged 2 commits into
canonical:mainfrom
elijahgreenstein:decommission

Conversation

@elijahgreenstein

@elijahgreenstein elijahgreenstein commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

This PR adds a decommissioning guide to comply with SSDLC requirements.

This guide is based off of the guide to LXD introduced in canonical/lxd#18507, but with several changes:

  1. The structure is reorganized: this guide is largely organized around decommissioning an entire cluster. A paragraph at the beginning of the guide instructs user wishing to decommission a single cluster member to first remove the cluster, and provides cross references to relevant pages in the LXD documentation. This paragraph then directs users to proceed to destroy the data on the removed member after removing the cluster.
  2. Deleting replicators and cluster links is moved into the "Delete data" section, in order to follow the note about projects and the need to use the --project flag in order to delete project-scoped entities.
  3. microcloud commands are used wherever possible, in place of lxc commands.
  4. References to MicroCeph logging is included.
  5. Details about removing MicroCeph OSDs is included.
  6. Instructions about removing storage buckets is removed from this guide, on the assumption that MicroCloud users would not use Ceph Object buckets.
  7. Cluster removal includes details about removing the Ceph monmap when reducing the cluster down to one member.
  8. Snap removal covers MicroCloud, LXD, MicroCeph, and MicroOVN.
  9. A note about ACME services is included, alongside the note about OIDC providers, in the final section.

Checklist

@github-actions github-actions Bot added the Documentation Documentation needs updating label Jul 9, 2026
@elijahgreenstein

elijahgreenstein commented Jul 9, 2026

Copy link
Copy Markdown
Contributor Author

@mseralessandri , @roosterfish -- I added the section on MicroCeph OSDs based on my reading of the MicroCloud guide to removing cluster members, which included a reference to the MicroCeph guide to removing disks. However, would these steps be necessary when decommissioning an entire cluster?

@roosterfish roosterfish 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.

Thanks, left a few comments.

Comment thread doc/how-to/decommission.md
Comment thread doc/how-to/decommission.md Outdated

Storage pools cannot be deleted if they are used by an instance, profile, or custom volume.
The `default` profile cannot be deleted; therefore, the storage pool used by the `default` profile cannot be deleted.
To identify this storage pool, view information about the `default` profile and find the pool listed under `devices` > `root` > `pool`:

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.

This is not true. LXD blocks the pool deletion because the default profile has a disk device which references the pool. You can remove this device which will then allow you to remove the pool:

root@micro01:~# lxc storage rm remote
Error: The storage pool is currently in use
root@micro01:~# lxc profile show default
name: default
description: Default LXD profile
config: {}
devices:
  eth0:
    name: eth0
    network: default
    type: nic
  root:
    path: /
    pool: remote
    type: disk
used_by: []
project: default
root@micro01:~# lxc profile device rm default root
root@micro01:~# lxc storage rm remote

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Nice, it was bothering me to leave that profile and its associated storage pool untouched. I've updated the section with the instructions to remove the device.

Two notes:

  1. I changed the command to lxc profile device remove (rather than rm), since that is what appears in the man pages.
  2. It seems like the device is always named root. Is that correct? I've used that term in the instructions, but, if necessary, I can update the instructions to instruct users to find the device name.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Another note: it seems as if the default profile is always associated with the default project. Is that correct? I've added a flag with the goal of making the command work regardless of the currently active project:

lxc profile show default --project default

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.

Profiles belong to projects. When you create a new project, it also creates a new profile default. So it could happen that you have multiple projects, and each has their own default profile.

It seems like the device is always named root. Is that correct?

When it comes to MicroCloud, we configure the default profile in the default project to with two devices. One called eth0 (network) and the other called root. On top of this the user can ofc create additional entities we are not aware of when it comes to decommissioning.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Thanks for the clarification. I've updated the guide as follows to address this by adding a subsection on removing disk devices from default profiles --- I am assuming here that the issue centers on disk devices. If there are other devices that would be of concern, let me know, but I currently understand the issue as:

  • default profiles cannot be deleted
  • default profiles may have disk devices that reference storage pools (and the default profile in the default project will definitely have that root device).
  • Disk devices reference storage pools and possibly custom volumes (in the case of the root device, it does not have a value for source as would be the case in a custom volume attached to the profile)
  • Hence: users must remove disk devices from the default profiles; if those reference custom volumes, the volumes will be deleted in the next section.

Comment thread doc/how-to/decommission.md Outdated
Comment thread doc/how-to/decommission.md Outdated
Comment thread doc/how-to/decommission.md
Comment thread doc/how-to/decommission.md
@elijahgreenstein

Copy link
Copy Markdown
Contributor Author

Updated based on @roosterfish 's comments. I've also changed the title that appears in the navigation menu from "Decommission MicroCloud" to "Decommission a MicroCloud." Wondering what your thoughts on this are. I've also tried out "Decommission a cluster or cluster member."

@elijahgreenstein
elijahgreenstein force-pushed the decommission branch 3 times, most recently from 37a4cb1 to 5e24fbe Compare July 10, 2026 22:16
@elijahgreenstein

Copy link
Copy Markdown
Contributor Author

Made an additional update to direct users decommissioning a single cluster member to proceed to the "Remove the snaps" section after removing the member, rather than skipping all the way to "Destroy and sanitize data".

Signed-off-by: Elijah Greenstein <elijah.greenstein@canonical.com>
Signed-off-by: Elijah Greenstein <elijah.greenstein@canonical.com>
@elijahgreenstein

Copy link
Copy Markdown
Contributor Author

Updated to address @roosterfish 's comments about the default profiles and the root device.

Also reorganized following a conversation with @mseralessandri to pull the "List projects" and the "Delete replicators and cluster links" subsections out of the "Delete data" section, and reorganize them above "Delete data".

@roosterfish roosterfish 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.

LGTM thanks!

@mseralessandri mseralessandri 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.

LGTM, thanks!

@roosterfish
roosterfish merged commit 0a5067f into canonical:main Jul 14, 2026
19 checks passed
@elijahgreenstein
elijahgreenstein deleted the decommission branch July 15, 2026 16:46
roosterfish added a commit that referenced this pull request Jul 17, 2026
Backports PRs #1430, #1449, and #1450 to update the security explanation
and add a decommissioning guide to MicroCloud 2.

The security guide was amended as follows:

- Removed references to replicators and cluster links (only valid for
LXD 6 and, hence, MicroCloud 3).
- Updated cross references as necessary. For example, the original guide
referenced the MicroCeph [Best practices for secure
deployment](https://canonical.com/microcloud/docs/latest/microceph/snap/explanation/security/secure-deployment/)
guide, but this guide is only in the MicroCloud 3 integrated docs, not
MicroCloud 2. In place, a reference to the MicroCeph [Security
overview](https://canonical.com/microcloud/docs/default/microceph/explanation/security/security-overview/)
was used.

## Checklist

- [x] I have read the [contributing
guidelines](https://github.com/canonical/microcloud/blob/main/CONTRIBUTING.md)
and attest that all commits in this PR are [signed
off](https://github.com/canonical/microcloud/blob/main/CONTRIBUTING.md#including-a-signed-off-by-line-in-your-commits),
[cryptographically
signed](https://github.com/canonical/microcloud/blob/main/CONTRIBUTING.md#commit-signature-verification),
and follow this project's [commit
structure](https://github.com/canonical/microcloud/blob/main/CONTRIBUTING.md#commit-structure).
- [x] I have checked and added or updated relevant documentation.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Documentation Documentation needs updating

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants