doc: add decommissioning guide#1450
Conversation
|
@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
left a comment
There was a problem hiding this comment.
Thanks, left a few comments.
|
|
||
| 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`: |
There was a problem hiding this comment.
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 remoteThere was a problem hiding this comment.
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:
- I changed the command to
lxc profile device remove(rather thanrm), since that is what appears in the man pages. - 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.
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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:
defaultprofiles cannot be deleteddefaultprofiles may have disk devices that reference storage pools (and thedefaultprofile in thedefaultproject will definitely have thatrootdevice).- Disk devices reference storage pools and possibly custom volumes (in the case of the
rootdevice, it does not have a value forsourceas would be the case in a custom volume attached to the profile) - Hence: users must remove disk devices from the
defaultprofiles; if those reference custom volumes, the volumes will be deleted in the next section.
|
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." |
37a4cb1 to
5e24fbe
Compare
|
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". |
5e24fbe to
b67b793
Compare
Signed-off-by: Elijah Greenstein <elijah.greenstein@canonical.com>
Signed-off-by: Elijah Greenstein <elijah.greenstein@canonical.com>
b67b793 to
40aa374
Compare
|
Updated to address @roosterfish 's comments about the 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". |
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.
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:
--projectflag in order to delete project-scoped entities.microcloudcommands are used wherever possible, in place oflxccommands.monmapwhen reducing the cluster down to one member.Checklist