XendDomainInfo self.channel not initialized
I'm not certain why, but self.channel for dom0 is not intialized. I can see this when testing dom0 vcpu-hotplug with the attached patch applied.
root@bebop:/var/log # xm list
Name Id Mem(MB) CPU VCPU(s) State Time(s) Console
Domain-0 0 507 0 2 r---- 20.0
root@bebop:/var/log # xm list -v
Name Id VCPU CPU CPUMAP Domain-0 0 0 0 0x3 Domain-0 0 1 1 0x3
root@bebop:/var/log # xm vcpu-hotplug 0 1 0
Traceback (most recent call last):
File "/usr/lib/python2.4/logging/handlers.py", line 62, in emit
if self.shouldRollover(record):
File "/usr/lib/python2.4/logging/handlers.py", line 132, in shouldRollover
self.stream.seek(0, 2) #due to non-posix-compliant Windows feature
ValueError: I/O operation on closed file
[xend] ERROR (XendDomainInfo:975) self.channel is not valid
Putting a call to self.create_channel() if not self.channel works, but it is a hack.
I've put this in bug #101
http://bugzilla.xensource.com/cgi-bin/bugzilla/show_bug.cgi?id=101
Signature · 34 lines
Ryan Harper Software Engineer; Linux Technology Center IBM Corp., Austin, Tx (512) 838-9253 T/L: 678-9253 [email protected] diffstat output: XendDomainInfo.py | 4 +++- 1 files changed, 3 insertions(+), 1 deletion(-) Signed-off-by: Ryan Harper <[email protected]> --- diff -r 57b2fa8bf11d tools/python/xen/xend/XendDomainInfo.py --- a/tools/python/xen/xend/XendDomainInfo.py Wed Jul 13 15:04:49 2005 +++ b/tools/python/xen/xend/XendDomainInfo.py Wed Jul 13 16:01:06 2005 @@ -961,14 +961,16 @@ def vcpu_hotplug(self, vcpu, state): """Disable or enable VCPU in domain. """ - log.error("Holly Shit! %d %d\n" % (vcpu, state)) if self.channel: if int(state) == 0: msg = messages.packMsg('vcpu_hotplug_off_t', { 'vcpu' : vcpu} ) else: msg = messages.packMsg('vcpu_hotplug_on_t', { 'vcpu' : vcpu} ) + log.debug("Sending VCPU%d hotplug state %d\n" % (vcpu, state)) self.channel.writeRequest(msg) + else: + log.error("self.channel is not valid\n") def shutdown(self, reason, key=0): msgtype = shutdown_messages.get(reason)