diff options
author | Martin Klozik <martinx.klozik@intel.com> | 2016-04-29 14:23:36 +0100 |
---|---|---|
committer | Martin Klozik <martinx.klozik@intel.com> | 2016-05-04 09:29:30 +0100 |
commit | 824d9c5d537916ebb1aebf1cfb6de9ab64484246 (patch) | |
tree | 5568133a2c095deed5940f3a069ca1cd983c7789 /tools/systeminfo.py | |
parent | 25969600ac9508ecc54a25d7b0f628e0713a82a2 (diff) |
bugfix: Graceful shutdown of VM - improvement
Cleanup phase of PVVP scenario sometimes causes server reboot.
Following updates were made to prevent reboots:
* better generic process termination procedure
* ovsdb is terminated after vswitchd termination
* vswitchd is terminated directly instead of parent sudo process
* already running VNFs are terminated in case of failure during
VNF start()
Change-Id: Ic09d60d7bfdea01c84a2685ede3d0316f0d09be7
JIRA: VSPERF-271
Signed-off-by: Martin Klozik <martinx.klozik@intel.com>
Reviewed-by: Maryam Tahhan <maryam.tahhan@intel.com>
Diffstat (limited to 'tools/systeminfo.py')
-rw-r--r-- | tools/systeminfo.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tools/systeminfo.py b/tools/systeminfo.py index ba490946..9d8eb5cb 100644 --- a/tools/systeminfo.py +++ b/tools/systeminfo.py @@ -168,6 +168,14 @@ def get_pid(proc_name_str): """ return get_pids([proc_name_str]) +def pid_isalive(pid): + """ Checks if given PID is alive + + :param pid: PID of the process + :returns: True if given process is running, False otherwise + """ + return os.path.isdir('/proc/' + str(pid)) + # This function uses long switch per purpose, so let us suppress pylint warning too-many-branches # pylint: disable=R0912 def get_version(app_name): |