#832 Cancelled image-build can leave running VM
Closed: Dropped by tkopecek. Opened by tkopecek.

It seems, that in some points of task, when image-build is cancelled, cancellation is not properly conveyed to image-factory/oz and vm can stay in libvirt forever.

Needs to be tested and some more cleanup added, image-factory probably has some hook for such case.


Could have some interaction with #825

There is a fairly thin one-way line of communication with the main process (which kills the task). Have a look at cleanupTask in koji.daemon (and the functions it calls, like _doKill).

We always send a SIGINT first "to let mock mock try to clean up." This could be caught by the child, and it could take better cleanup actions. Perhaps we need to selectively extend the timeout here.

Also, we might not be finding all the children in the main kojid process, perhaps that is part of the task-side cleanup too.

Possibly we could allow task handlers to declare a cleanup method that is run in the main process before the killing occurs. We'd still have to figure out how trigger things (perhaps a different signal, or perhaps same with a longer timeout and/or deeper monitoring).

@mikem Any update on this?

@breilly do you recall the details on this?

Brendan is out for a couple of weeks. @mohanboddu are you running into this problem in Fedora?

@dgregor I just want to leave a note of what we talked:

Brendan is out for a couple of weeks. @mohanboddu are you running into this problem in Fedora?

Yes, we are hitting it in Fedora. So, either Kevin or I manually go and clean up the vm's when something like this happens.

I guess its to much to ask for to get this fixed with in a month (by F30 GA) with Brendan not around. But let us know :smile:

Metadata Update from @dgregor:
- Custom field Size adjusted to None
- Issue set to the milestone: 1.20

Metadata Update from @tkopecek:
- Issue tagged with: no_qe

Will be fixed on imagefactory side. On koji side it means only raising required imagefactory version in spec after it will be merged/released.

https://github.com/redhat-imaging/imagefactory/pull/431

Let's close it here and leave it on image-factory.

Metadata Update from @tkopecek:
- Issue close_status updated to: Dropped
- Issue status updated to: Closed (was: Open)

Metadata Update from @tkopecek:
- Issue set to the milestone: None (was: 1.20)

This issue has been migrated to Fedora Forge:
https://forge.fedoraproject.org/koji/koji/issues/832

Please continue any further discussion there.

Metadata