canonical / canonical/microcloud

Deprecate `microcloud cluster remove` command

Open
#837 1 comment 0 reactions 0 assignees View on GitHub
Feature Jira
Dominant language
Go
Stars
532
Forks
83
Avg merge
1d 14h
Merged PRs (30d)
36

Description

I have a MicroCloud cluster composed by three members:

```
root@micro1:~# sudo snap list
Name Version Rev Tracking Publisher Notes
core22 20250528 2010 latest/stable canonical✓ base
core24 20250526 1006 latest/stable canonical✓ base
lxd 5.21.3-c5ae129 33110 5.21/stable canonical✓ -
microceph 19.2.0+snapab139d4a1f 1393 squid/stable canonical✓ -
microcloud 2.1.0-3e8b183 1144 2/stable canonical✓ -
microovn 24.03.2+snapa2c59c105b 667 24.03/stable canonical✓ -
snapd 2.68.5 24718 latest/stable canonical✓ snapd
```

```
+--------+---------+-------------------------+-------------------------------------------------+-----------------+-----------+
| micro1 | RUNNING | 10.42.254.82 (enp8s0) | fd42:ef1:5443:4cdb:216:3eff:fe63:3559 (enp8s0) | VIRTUAL-MACHINE | 0 |
| | | 10.11.176.119 (enp5s0) | fd42:db37:d07f:c4ff:216:3eff:fe75:dd9f (enp5s0) | | |
| | | 10.108.7.211 (enp7s0) | fd42:3a75:556c:98ad:216:3eff:fe58:1367 (enp7s0) | | |
+--------+---------+-------------------------+-------------------------------------------------+-----------------+-----------+
| micro2 | RUNNING | 10.42.254.112 (enp8s0) | fd42:ef1:5443:4cdb:216:3eff:fe9e:f1ee (enp8s0) | VIRTUAL-MACHINE | 0 |
| | | 10.11.176.194 (enp5s0) | fd42:db37:d07f:c4ff:216:3eff:fe9a:68ec (enp5s0) | | |
| | | 10.108.7.234 (enp7s0) | fd42:3a75:556c:98ad:216:3eff:fe6b:6437 (enp7s0) | | |
+--------+---------+-------------------------+-------------------------------------------------+-----------------+-----------+
| micro3 | RUNNING | 10.42.254.219 (enp8s0) | fd42:ef1:5443:4cdb:216:3eff:fe2e:8f49 (enp8s0) | VIRTUAL-MACHINE | 0 |
| | | 10.11.176.133 (enp5s0) | fd42:db37:d07f:c4ff:216:3eff:fecd:2f3e (enp5s0) | | |
| | | 10.108.7.215 (enp7s0) | fd42:3a75:556c:98ad:216:3eff:fef0:701f (enp7s0) | | |
+--------+---------+-------------------------+-------------------------------------------------+-----------------+-----------+

```
I removed a member with `microcloud cluster remove`

```
$ lxc shell micro1
root@micro1:~# microcloud status

Status: HEALTHY

┌────────┬───────────────┬──────┬─────────────────┬────────────────────────┬────────┐
│ Name │ Address │ OSDs │ MicroCeph Units │ MicroOVN Units │ Status │
├────────┼───────────────┼──────┼─────────────────┼────────────────────────┼────────┤
│ micro1 │ 10.11.176.119 │ 1 │ mds,mgr,mon │ central,chassis,switch │ ONLINE │
│ micro2 │ 10.11.176.194 │ 1 │ mds,mgr,mon │ central,chassis,switch │ ONLINE │
│ micro3 │ 10.11.176.133 │ 1 │ mds,mgr,mon │ central,chassis,switch │ ONLINE │
└────────┴───────────────┴──────┴─────────────────┴────────────────────────┴────────┘
root@micro1:~# microcloud cluster remove micro3
root@micro1:~# microcloud status

Status: WARNING

┃ ! Reliability risk: 3 systems are required for effective fault tolerance
┃ ! Data loss risk: MicroCeph OSD replication recommends at least 3 disks across 3 systems
┃ ! Found LXD systems not managed by MicroCloud: micro3
┃ ! Found MicroCeph systems not managed by MicroCloud: micro3
┃ ! Found MicroOVN systems not managed by MicroCloud: micro3

┌────────┬───────────────┬──────┬─────────────────┬────────────────────────┬────────┐
│ Name │ Address │ OSDs │ MicroCeph Units │ MicroOVN Units │ Status │
├────────┼───────────────┼──────┼─────────────────┼────────────────────────┼────────┤
│ micro1 │ 10.11.176.119 │ 1 │ mds,mgr,mon │ central,chassis,switch │ ONLINE │
│ micro2 │ 10.11.176.194 │ 1 │ mds,mgr,mon │ central,chassis,switch │ ONLINE │
└────────┴───────────────┴──────┴─────────────────┴────────

```

The command removes the node from the MicroCloud cluster, but not from the other services clusters.

```
root@micro1:~# microcloud service list
MicroCeph:
+--------+--------------------+-------+--------+
| NAME | ADDRESS | ROLE | STATUS |
+--------+--------------------+-------+--------+
| micro1 | 10.11.176.119:7443 | voter | ONLINE |
+--------+--------------------+-------+--------+
| micro2 | 10.11.176.194:7443 | voter | ONLINE |
+--------+--------------------+-------+--------+
| micro3 | 10.11.176.133:7443 | voter | ONLINE |
+--------+--------------------+-------+--------+
MicroOVN:
+--------+--------------------+-------+--------+
| NAME | ADDRESS | ROLE | STATUS |
+--------+--------------------+-------+--------+
| micro1 | 10.11.176.119:6443 | voter | ONLINE |
+--------+--------------------+-------+--------+
| micro2 | 10.11.176.194:6443 | voter | ONLINE |
+--------+--------------------+-------+--------+
| micro3 | 10.11.176.133:6443 | voter | ONLINE |
+--------+--------------------+-------+--------+
LXD:
+--------+----------------------------+-----------------+--------+
| NAME | ADDRESS | ROLE | STATUS |
+--------+----------------------------+-----------------+--------+
| micro1 | https://10.11.176.119:8443 | database-leader | Online |
| | | database | |
+--------+----------------------------+-----------------+--------+
| micro2 | https://10.11.176.194:8443 | database | Online |
+--------+----------------------------+-----------------+--------+
| micro3 | https://10.11.176.133:8443 | database | Online |
+--------+----------------------------+-----------------+--------+
MicroCloud:
+--------+--------------------+-------+--------+
| NAME | ADDRESS | ROLE | STATUS |
+--------+--------------------+-------+--------+
| micro1 | 10.11.176.119:9443 | voter | ONLINE |
+--------+--------------------+-------+--------+
| micro2 | 10.11.176.194:9443 | spare | ONLINE |
+--------+--------------------+-------+--------+
```

After removing the member, there is no way to re-add it to the cluster, unless a more disruptive [`microcloud remove`](https://documentation.ubuntu.com/microcloud/latest/microcloud/how-to/remove_machine/#how-to-remove-a-machine) is used. This can be misleading for the users. Either the `microcloud cluster remove` is deprecated or refactored to be used to temporarily put offline a member in a way that can be re-added later.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.