Skip to content

doc: add decommissioning guide#1450

Open
elijahgreenstein wants to merge 1 commit into
canonical:mainfrom
elijahgreenstein:decommission
Open

doc: add decommissioning guide#1450
elijahgreenstein wants to merge 1 commit 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

Signed-off-by: Elijah Greenstein <elijah.greenstein@canonical.com>
@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.

This guide walks you through the steps to decommission an entire MicroCloud cluster.

If you only need to decommission a single cluster member, first {ref}`remove the member from the cluster <howto-member-remove>`.
After removing the member, {ref}`update the certificate <lxd:cluster-manage-update-certificate>` on the cluster remaining in production.

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.

If we recommend updating the cluster certificate in the reamining cluster for LXD, likely we should also propose doing this for MicroCloud, MicroCeph and MicroOVN (Microclusters).

@mseralessandri I wonder if we should grow support in MicroCloud to generally trigger this across LXD and Micro* from a single MicroCloud command like microcloud cluster update-certificate

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.

It seems MicroCeph has a microceph certificates command used to set RGW cert. Also MicroOVN comes with a microovn certificates command but it also seems to be used solely for OVN services, not Microcluster.

So it seems this is a general gap currently in all Micro* products to be able to rotate the underlying Microcluster certificate with straightforward commands. This is supported by Microcluster but not directly exposed.
In case a user would hit this today, we can instruct using curl against the Microcluster API though.

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.

I have added #1453 with a note to update this guide.


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

Run this command to view the Ceph OSD tree:

```
ceph osd tree

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.

Any reason for not using a MicroCeph command directly?

root@micro01:~# microceph disk list
Disks configured in MicroCeph:
+-----+----------+----------------------------------------------------+
| OSD | LOCATION |                        PATH                        |
+-----+----------+----------------------------------------------------+
| 1   | micro01  | /dev/disk/by-id/scsi-0QEMU_QEMU_HARDDISK_lxd_disk2 |
+-----+----------+----------------------------------------------------+

There is also a --host-only flag to return only OSDs configured on this member (requires running the command on the to be decommissioned member).

To {ref}`reduce the cluster down to one member <howto-member-remove-reduce-cluster>`, you must first clean up the Ceph monitor map (`monmap`) while there are still two cluster members:

```bash
sudo microceph.ceph mon remove <name>

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.

Should we instead link to the doc page where those commands are already listed? Just to prevent duplicating this.

To securely decommission MicroCloud, you must {ref}`destroy and sanitize your data <howto-decommission-destroy-data>`.
```

Remove the MicroCloud, LXD, MicroCeph, and MicroOVN snaps.

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.

Worth adding a command that MicroCeph and MicroOVN might not be installed if the user chose to deploy a MicroCloud without those components?

The following commands should report that none of these snaps are installed and that the `/var/snap/microcloud/`, `/var/snap/lxd/`, `/var/snap/microceph/`, and `/var/snap/microovn` directories do not exist:

```bash
snap list microcloud lxd microceph microovn

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.

Worth running microcloud status on any of the remaining members to verify everything got cleaned up and the member is gone?

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.

2 participants