Jim Fehlig
2010-Mar-02 22:55 UTC
[Xen-devel] [PATCH] fix domain exit actions that contain hyphen
Domain exit actions that contain a hyphen (e.g. rename-restart) were not being detected properly when xm is configured to use xenapi. Domain config containing on_crash="rename-restart" results in xen53:~ # xm new /tmp/domU.config Using config file "/tmp/domU.config". Unexpected error: <type ''exceptions.TypeError''> Please report to xen-devel@lists.xensource.com Traceback (most recent call last): File "/usr/sbin/xm", line 7, in <module> main.main(sys.argv) File "/usr/lib64/python2.6/site-packages/xen/xm/main.py", line 3937, in main _, rc = _run_cmd(cmd, cmd_name, args) File "/usr/lib64/python2.6/site-packages/xen/xm/main.py", line 3961, in _run_cmd return True, cmd(args) File "<string>", line 1, in <lambda> File "/usr/lib64/python2.6/site-packages/xen/xm/main.py", line 1582, in xm_importcommand cmd.main([command] + args) File "/usr/lib64/python2.6/site-packages/xen/xm/new.py", line 69, in main doc = sxp2xml_inst.convert_sxp_to_xml(config) File "/usr/lib64/python2.6/site-packages/xen/xm/xenapi_create.py", line 680, in convert_sxp_to_xml XEN_API_ON_CRASH_BEHAVIOUR) File "/usr/lib64/python2.6/site-packages/xen/xm/xenapi_create.py", line 671, in conv_chk raise "Invalid value: " + val TypeError: exceptions must be classes or instances, not str The attached patch fixes the raised exception and at the same time handles the replacement of hyphen with underscore properly. Regards, Jim Signed-off-by: Jim Fehlig <jfehlig@novell.com> _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel