The nova.virt.libvirt.instancejobtracker
Module¶
-
class
InstanceJobTracker
¶ Bases:
object
-
add_job
(instance, pid)¶ Appends process_id of instance to cache.
This method will store the pid of a process in cache as a key: value pair which will be used to kill the process if it is running while deleting the instance. Instance uuid is used as a key in the cache and pid will be the value.
Parameters: - instance – Object of instance
- pid – Id of the process
-
remove_job
(instance, pid)¶ Removes pid of process from cache.
This method will remove the pid of a process from the cache.
Parameters: - instance – Object of instance
- pid – Id of the process
-
terminate_jobs
(instance)¶ Kills the running processes for given instance.
This method is used to kill all running processes of the instance if it is deleted in between.
Parameters: instance – Object of instance
-