Skip to content

Conversation

@keyingliu
Copy link
Contributor

@keyingliu keyingliu commented Jan 31, 2019

It is not a good option to remove container if start container failed. The comments:
// FIXME: we do this here because kubelet may attempt new `CreateContainer()` // calls for this VM after failed `StartContainer()` without first removing it.

Even kubelet may attempt new CreateContainer(), the virtlet will do nothing as the container has already been in db: https://github.com/Mirantis/virtlet/blob/master/pkg/manager/runtime.go#L305

To remove container, the domain and VM will be removed too, it will impact running VMs, all data of running VM may be lost. For example, if the disk is full, the VM will get into paused state, and you cannot start the domain, but we should not remove the VM to workaround the problem.


This change is Reviewable

Copy link
Contributor

@jellonek jellonek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That was very old part done before we even had beginnings of garbage collection so in fact these remains were now unnecessary.

:lgtm:

Reviewed 1 of 1 files at r1.
Reviewable status: 0 of 1 approvals obtained

@ivan4th ivan4th merged commit 3be49a1 into Mirantis:master Feb 4, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants