Deprecate `microcloud cluster remove` command

Aperta
#837 1 commento 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 3 giorni

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
35/100
Tipo di issue
Refactoring
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
go

Direzione di ricerca

Inizia dal punto di ingresso e dai test di microcloud cluster remove, quindi confrontane il comportamento con il workflow documentato di microcloud remove. Determina se il comando debba essere deprecato o modificato per supportare una successiva riaggiunta; il lavoro è completato quando il comportamento scelto è implementato e lo stato fuorviante del cluster e del servizio è coperto dai test.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Feature Jira

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

Lingua principale
Go
Stelle
552
Fork
96
Merge medio
4g 10h
PR unite (30g)
21

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di canonical/microcloud

Tutte le issue di canonical/microcloud

Issue simili

Altre issue su Go

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.