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

Aberta Para iniciantes
#14,900 0 comentários 0 reações 0 responsáveis Ver no GitHub

Mantenedores costumam responder em até 1 dia

Ninguém assumiu esta issue ainda.

Avaliação

Dificuldade
2/5
Tempo estimado
1-3 horas
Facilidade para iniciantes
82/100
Tipo de issue
Bug
Clareza
Claramente especificada
Status de atividade
Ativa
Stack de tecnologia
java

Direção de pesquisa

Comece pelas verificações em VolumeApiServiceImpl.isOperationSupported e SnapshotManagerImpl.createPolicy, comparando-as com a verificação de implantação em UserVmManagerImpl. A alteração necessária é combinar corretamente as exclusões de volumes de nós CKS e de Shared FileSystem VM, preservando as recusas para outros volumes SYSTEM-template. A conclusão significa que snapshots e políticas de snapshot funcionam para volumes de nós CKS e de Shared FileSystem VM, mas continuam bloqueados para VMs do sistema e roteadores.

Escrita pelo modelo de indexação a partir do texto da issue.

Descrição

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.

Linguagem predominante
Java
Estrelas
3.1k
Forks
1.4k
Merge médio
6d 1h
PRs com merge (30d)
16

Preparar o ambiente

Primeiros passos

  1. Leia a issue inteira e depois o guia de contribuição do projeto.
  2. Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
  3. Faça um fork do repositório e trabalhe em uma branch.
  4. Abra um pull request que referencie o número da issue.

Mais de apache/cloudstack

Todas as issues de apache/cloudstack

Issues semelhantes

Mais issues de Java

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.