Relaxing console pid looking
Recently we hit an issue that the pid file is missing, current logic simply removes pid file if the corresponding process is not found, but if the pid file is lost then the console could never be stopped and futher more, be restarted, regardless if the process is there or not. This patch captures FileNotFound to the exception handling to allow console recovery. Change-Id: I1a0b8347e960c6cff8aca10a22c67b710f7d617e
This commit is contained in:
parent
b63d15ccdb
commit
88c4271a70
@ -90,7 +90,7 @@ def _get_console_pid(node_uuid):
|
||||
with open(pid_path, 'r') as f:
|
||||
pid_str = f.readline()
|
||||
return int(pid_str)
|
||||
except (IOError, ValueError):
|
||||
except (IOError, ValueError, FileNotFoundError):
|
||||
raise exception.NoConsolePid(pid_path=pid_path)
|
||||
|
||||
|
||||
|
@ -0,0 +1,6 @@
|
||||
---
|
||||
fixes:
|
||||
- |
|
||||
Fixes an issue that when a node has console enabled but pid
|
||||
file missing, the console could not be disabled as well as be
|
||||
restarted, which makes the console feature unusable.
|
Loading…
Reference in New Issue
Block a user