nova.cmd.baseproxy handles errors incorrectly
Bug #1506213 reported by
Alexander Aleksiyants
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Compute (nova) |
Fix Released
|
Low
|
Wenzhi Yu |
Bug Description
Nova from master.
The module doesn't print error message. If an error occurs in nova.cmd.baseproxy the method exit_with_error is executed that looks as follows:
def exit_with_
print(msg) and sys.exit(errno)
So in python 2.7 this method terminates the application without printing anything (unable to flush on time) and in python 3.4 it does strange things because print() returns None.
I noticed this bug when I was trying to run nova-novncproxy without novnc istalled. nova-novncproxy was being terminated without any prints. Then I debugged it and found out that it tries to send an error message but it fails.
Changed in nova: | |
assignee: | nobody → Wen Zhi Yu (yuywz) |
To post a comment you must log in.
Confirmed with this simple test with python2.7:
import sys
def exit_with_ error(msg, errno=-1):
print(msg) and sys.exit(errno)
if __name__ == "__main__":
exit_with_ error(" print this message")
The message doesn't get flushed.