Harden VMM lifecycle consistency across update, reload, and removal
Mantenedores costumam responder em até 1 dia
Ninguém assumiu esta issue ainda.
Avaliação
- Dificuldade
- 5/5
- Tempo estimado
- Mais de uma semana
- Facilidade para iniciantes
- 30/100
- Tipo de issue
- Refatoração
- Clareza
- Precisa de esclarecimento
- Status de atividade
- Pouca atividade
- Stack de tecnologia
- rust
- Domínio
- backend, infrastructure
Direção de pesquisa
Comece localizando os pontos de entrada de UpdateVm, reload, removal, lifecycle serialization, manifest, disk-resize e CID-allocation descritos na issue. Primeiro, rastreie seus caminhos de mutação e recuperação; depois, defina o comportamento de consistência e adicione testes de injeção de falhas e de operações concorrentes que cubram gravações parciais, reutilização de CID, corridas entre reload/removal e recuperação após uma reinicialização.
Escrita pelo modelo de indexação a partir do texto da issue.
Descrição
Problem
VMM lifecycle operations update files, disk metadata, in-memory state, the CID pool, and supervisor processes across multiple steps. These steps are not consistently validated, serialized, or rolled back.
Review of #766 exposed the following independent issues. They are not part of the no-TEE feature and should be addressed separately.
Findings
UpdateVmwrites the compose file, encrypted environment, and user config before later resource and manifest operations complete. A later failure leaves a partial update.- Disk resize occurs before manifest persistence and VM reload. A later failure can leave the qcow2 virtual size inconsistent with the manifest.
- Manifest writes use a direct file write, so interruption can leave a truncated manifest.
storage_fsis derived from the image command line and app compose on each load. Changing either can change the expected filesystem for an existing disk.- Start, stop, update, reload, and removal are not serialized per VM. Concurrent operations can observe or overwrite intermediate state.
- Reload rebuilds CID occupancy from running supervisor processes but does not preserve CIDs owned by stopped in-memory VMs. A new VM can reuse an existing CID. Supervisor processes excluded by annotation parsing may also fail to reserve their CIDs.
- User removal awaits port-forward cleanup after writing
.removingbut before spawning background cleanup. Cancellation of the RPC future can leave removal marked but not progressing until reload or restart. - Orphan cleanup and reload can race: cleanup may finalize after reload has recreated state for the same VM and CID.
The existing .removing marker already provides restart recovery and should remain the durable source of removal intent.
Suggested direction
- Validate the complete update before the first mutation.
- Define transactional file and disk update behavior, including rollback or an ordering that cannot expose inconsistent state.
- Serialize lifecycle operations per VM and define lock ordering for reload and CID allocation.
- Rebuild CID ownership from both supervisor state and loaded stopped VMs, rejecting ownership conflicts.
- Spawn removal cleanup before the RPC can be cancelled, while preserving
.removingrecovery. - Add failure-injection and concurrent-operation tests for partial writes, disk resize failure, CID reuse, reload/removal races, and process restart.
Context
These findings came from review of #766. The experimental fixes were removed from that PR to keep it scoped to development-only no-TEE support.
- Linguagem predominante
- Rust
- Estrelas
- 555
- Forks
- 99
- Merge médio
- 1d 3h
- PRs com merge (30d)
- 195
Preparar o ambiente
- Sem Dockerfile nem arquivo Docker Compose
- Sem modelo de pull request
- Ler o guia de contribuição
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Mais de Dstack-TEE/dstack
-
Dificuldade 5/5 Mais de uma semana Facilidade para iniciantes 35/100
Dstack-TEE/dstack#1384 ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 5/5 Mais de uma semana Facilidade para iniciantes 30/100
Dstack-TEE/dstack#1301 ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 3/5 1-2 dias Facilidade para iniciantes 55/100
Dstack-TEE/dstack#1300 ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 4/5 3-5 dias Facilidade para iniciantes 48/100
Dstack-TEE/dstack#1299 ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 4/5 3-5 dias Facilidade para iniciantes 48/100
Dstack-TEE/dstack#1298 ·
Mantenedores costumam responder em até 1 dia
Todas as issues de Dstack-TEE/dstack
Issues semelhantes
-
[Bug]:设置的关于页面,“系统信息”部分排版异常Abertabug
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 63/100
metasequoiaime/msime#7328 ·
Mantenedores costumam responder em até 1 dia
-
bug
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 72/100
eclipse-opensovd/classic-diagnostic-adapter#616 ·
Mantenedores costumam responder em até 2 dias
-
documentation
Dificuldade 1/5 Menos de uma hora Facilidade para iniciantes 86/100
Mantenedores costumam responder em até 1 dia
-
track: content
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 72/100
0xAndersen/witness-log#10 ·
-
follow-up main-defect wave-A
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 72/100
carrick-sh/carrick#249 ·
Mantenedores costumam responder em até 1 dia