Comment 17 for bug 1387543

Revision history for this message
Abhishek Kekane (abhishek-kekane) wrote : Re: Resize/delete combo allows to overload nova-compute

Hi,

I have attached patches which will kill the rsync/scp processes if instance is deleted while resizing.

1. oslo_concurrency patch, to store the pid of the process - 0001-Store-pid-of-processes.patch
2. nova patch, to pass a callback handler to store/remove the pid and kill the process - 0001-Kill-rsync-scp-processes-before-deleting-instance.patch

To run this patch successfully on master you need to apply following patches to avoid the nova-compute startup issue:

1. https://review.openstack.org/#/c/173794/1
2. https://review.openstack.org/#/c/173897/

Note:
1. In attached nova patch I have used os.kill() to kill the process, this can also be done by using process_utils execute call.

2. If rsync/scp process is killed while deleting the instance, instance folder remains on destination node.
   If you apply periodic patch [1] mentioned in security bug [2] the above orphan instance folder gets deleted on nova-compute startup
   [1] 0001-Delete-orphaned-instance-files-from-compute-nodes.patch
   [2] https://bugs.launchpad.net/nova/+bug/1392527