cncf-infra / coder-templates

3 stars 4 forks source link

The problem of spinning down and persistence. #3

Closed BobyMCbobs closed 1 year ago

BobyMCbobs commented 1 year ago

On Coder, there is a default of spinning the instances down after 8h. When this happens, terraform destroy is run. So it doesn't matter where the persistent volume (claim) is living, to allow it to truly persist. The template as it is currently uses a deterministic name based on the name of the VM; the VM name different on each launch. So upon stop the restart of the workspace, it will not claim the same name and therefore not using the same data. It might be possible to create with a deterministic name but it will still be removed by Coder, even with the policy set for reclaiming.

TLDR;:

hh commented 1 year ago

There are two types of persistence here, the pvc for the qcow2 image backing kubevirt, and the home folder of the user.

I suspect we'll need a ticket for them both, please update this one to reflect specifically qcow2, and create a second one for backing the home folder.

BobyMCbobs commented 1 year ago

There are two types of persistence here, the pvc for the qcow2 image backing kubevirt, and the home folder of the user.

I suspect we'll need a ticket for them both, please update this one to reflect specifically qcow2, and create a second one for backing the home folder.

@hh, this ticket isn't about persistent volumes / qcow2 images; it's about Coder's behaviour with tear down. I'm not sure that the architecture for Coder template supports it or makes it easy to work with the way that Kubevirt and persistent volumes work