xend: Don't call decode() if PV_{kernel, ramdisk} are ''
PATCH 1/1 xend: Don't call decode() if PV_{kernel, ramdisk} are ''
Hi,
I detected the following messages in xend.log. The messages are shown when I started xend or guest domains.
[2009-07-23 11:04:30 3740] DEBUG (fileuri:260) Decode throws an error: '"'data:' scheme declaration missing"' [2009-07-23 11:04:30 3740] DEBUG (fileuri:260) Decode throws an error: ''no file:// scheme found'' [2009-07-23 11:04:30 3740] DEBUG (fileuri:260) Decode throws an error: '"'data:' scheme declaration missing"' [2009-07-23 11:04:30 3740] DEBUG (fileuri:260) Decode throws an error: ''no file:// scheme found''
The messages are not shown by the following patch.
I think that a default value of PV_{kernel, ramdisk} is '', not None. decode() is not called by the patch if the value of PV_{kernel, ramdisk} is '' or None.
tools/python/xen/xend/XendConfig.py +1 -1
@@ -2087,7 +2087,7 @@ def handle_fileuris(self): for arg in [('PV_kernel', 'use_tmp_kernel'), ('PV_ramdisk', 'use_tmp_ramdisk')]: - if self[arg[0]] != None: + if self[arg[0]]: self[arg[0]], self[arg[1]] \ = xen.util.fileuri.schemes.decode(self[arg[0]]) log.debug("fileuri '%s' = '%s'" % (arg[0], self[arg[0]][:100]))
Best regards,
Kan
tools/python/xen/xend/XendConfig.py +1 -1
@@ -2087,7 +2087,7 @@ def handle_fileuris(self): for arg in [('PV_kernel', 'use_tmp_kernel'), ('PV_ramdisk', 'use_tmp_ramdisk')]: - if self[arg[0]] != None: + if self[arg[0]]: self[arg[0]], self[arg[1]] \ = xen.util.fileuri.schemes.decode(self[arg[0]]) log.debug("fileuri '%s' = '%s'" % (arg[0], self[arg[0]][:100]))
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel
Hello!
Can you please provide some more information:
1. Was there any misbehaviour (like xend could not start up or similar) or were just the debug lines printed in the log?
2. Did you use 'file:' or 'data:' scheme for starting up new VMs?
3. Running Environment: OS / Distribution (Version) and used python version would be helpful.
Background:
The feature was removed from the repository because of another bug report. But before providing a corrected version, I want to be sure that I'll get all aspects of the changes send in the meantime. Also this information is helpful to add some more tests to (my local) regression test suite.
Kind regards
Andreas Florath