Deepak C Shetty has posted comments on this change.
Change subject: Support for QEMU cmdline hook ......................................................................
Patch Set 1: No score
(3 inline comments)
Ran into issues using json.loads. appreciate suggestions.
.................................................... File vdsm_hooks/qemucmdline/before_vm_start.py Line 46: def addQemuNsSupport(domXML): Done
Line 76: qemu_cmdline = eval(os.environ['qemu_cmdline']) Using json.loads gives me this exception... It does like the str(dict) format.
Thread-49::DEBUG::2012-08-07 19:41:15,953::__init__::1249::Storage.Misc.excCmd::(_log) FAILED: <err> = 'qemu_cmdline: [unexpected error]: Traceback (most recent call last):\n File "/usr/libexec/vdsm/hooks/before_vm_start/50_qemucmdline", line 74, in <module>\n qemu_cmdline = json.loads(os.environ['qemu_cmdline'])\n File "/usr/lib64/python2.7/json/__init__.py", line 326, in loads\n return _default_decoder.decode(s)\n File "/usr/lib64/python2.7/json/decoder.py", line 366, in decode\n obj, end = self.raw_decode(s, idx=_w(s, 0).end())\n File "/usr/lib64/python2.7/json/decoder.py", line 382, in raw_decode\n obj, end = self.scan_once(s, idx)\nValueError: Expecting property name: line 1 column 1 (char 1)\n\n'; <rc> = 2 Thread-49::INFO::2012-08-07 19:41:15,954::hooks::76::root::(_runHooksDir) qemu_cmdline: [unexpected error]: Traceback (most recent call last): File "/usr/libexec/vdsm/hooks/before_vm_start/50_qemucmdline", line 74, in <module> qemu_cmdline = json.loads(os.environ['qemu_cmdline']) File "/usr/lib64/python2.7/json/__init__.py", line 326, in loads return _default_decoder.decode(s) File "/usr/lib64/python2.7/json/decoder.py", line 366, in decode obj, end = self.raw_decode(s, idx=_w(s, 0).end()) File "/usr/lib64/python2.7/json/decoder.py", line 382, in raw_decode obj, end = self.scan_once(s, idx) ValueError: Expecting property name: line 1 column 1 (char 1)
Line 79: qcmdline_tag = startInject(domxml) Done
-- To view, visit http://gerrit.ovirt.org/6969 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I48477926d271bb9f6ae74f79de5d8c4d37b87caa Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Deepak C Shetty deepakcs@linux.vnet.ibm.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Deepak C Shetty deepakcs@linux.vnet.ibm.com