Volume snapshots of CKS node and Shared FileSystem VM volumes are always refused

Aperta Adatta ai principianti
#14,900 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
82/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
java

Direzione di ricerca

Inizia con i controlli in VolumeApiServiceImpl.isOperationSupported e SnapshotManagerImpl.createPolicy, confrontandoli con il controllo del deploy in UserVmManagerImpl. La modifica richiesta consiste nel combinare correttamente le volumi esclusi relativi ai nodi CKS e a Shared FileSystem VM, preservando al tempo stesso i rifiuti per gli altri volumi SYSTEM-template. Il risultato è completo quando gli snapshot e le snapshot policy funzionano per i volumi dei nodi CKS e di Shared FileSystem VM, ma restano bloccati per le VM di sistema e i router.

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

Descrizione

problem

Volume snapshots of CKS node volumes are always refused when the cluster was deployed from the SYSTEM-type system VM template, which is the default:

Volume: ... is for System VM , Creating snapshot against System VM volumes is not supported

The same happens for snapshot policies, and for the root volume of a Shared FileSystem VM.

The guard in VolumeApiServiceImpl.isOperationSupported and in SnapshotManagerImpl.createPolicy reads:

template.getTemplateType() == SYSTEM &&
    (userVm == null || !CKS_NODE.equals(type) || !SHAREDFSVM.equals(type))

No VM has both types, so the right-hand side is always true and every volume from a SYSTEM template is refused. Before #9208 the guard was (userVm == null || !CKS_NODE.equals(type)), which allowed CKS nodes. #9208 meant to add Shared FileSystem VMs to the exemption (the deploy check it changed in UserVmManagerImpl reads !CKS_NODE.equals(vmType) && !SHAREDFSVM.equals(vmType)), but the || removed the CKS exemption instead.

The same code is on main.

versions

4.20 and later (since #9208), including 4.22 and main. KVM, Ceph RBD primary storage. Any hypervisor and storage is affected; the check runs before the storage layer.

The steps to reproduce the bug
  1. Create a CKS cluster without a custom node template (nodes use the system VM template).
  2. Take a volume snapshot of a node's ROOT volume: create snapshot volumeid=<node root volume>.
  3. The call fails with "Creating snapshot against System VM volumes is not supported". create snapshotpolicy on the same volume fails the same way.
What to do about it?

Change || to && in both guards, so CKS node and Shared FileSystem VM volumes are allowed and other SYSTEM template volumes (system VMs, routers) are still refused.

Lingua principale
Java
Stelle
3.1k
Fork
1.4k
Merge medio
6g 1h
PR unite (30g)
16

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 apache/cloudstack

Tutte le issue di apache/cloudstack

Issue simili

Altre issue su Java

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.