[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [PATCH] Fix xm scsi-attach/detach/list for inactive managed domains


This patch fixes xm scsi-attach/detach/list command for inactive 
managed domains.
In inactive managed domains, xm scsi-detach command and xm scsi-list 
command always fail.  Also xm scsi-attach command fail under certain 
conditions.  Results of those commands are as follows.

# xm new vm1
Using config file "/etc/xen/vm1".
# xm scsi-attach vm1 0:0:1:0 0:0:1:0
# xm scsi-attach vm1 0:0:2:0 0:0:2:0
Error: (22, 'Invalid argument, while reading 
Usage: xm scsi-attach <Domain> <PhysDevice> <VirtDevice> [BackDomain]

Attach a new SCSI device.
# xm scsi-list vm1
Idx BE  state  phy-hctl   phy   vir-hctl   devstate
0   -1  -1     Unexpected error: exceptions.KeyError

Please report to xen-devel@xxxxxxxxxxxxxxxxxxx
Traceback (most recent call last):
  File "/usr/sbin/xm", line 10, in ?
  File "//usr/lib/python/xen/xm/main.py", line 2928, in main
    _, rc = _run_cmd(cmd, cmd_name, args)
  File "//usr/lib/python/xen/xm/main.py", line 2952, in _run_cmd
    return True, cmd(args)
  File "//usr/lib/python/xen/xm/main.py", line 2281, in xm_scsi_list
    print "%(p-dev)-10s %(p-devname)-5s %(v-dev)-10s %(frontstate)-4s" % mi
KeyError: 'p-dev'
# xm scsi-detach vm1 0:0:1:0
Error: (22, 'Invalid argument, while reading 
Usage: xm scsi-detach <Domain> <VirtDevice>

Detach a specified SCSI device.

BTW, this patch separates constants in DevController.py into a new 
file DevConstants.py because an import error occurs when xm/main.py 
tries to refer to xenbusState. 

Signed-off-by: Masaki Kanno <kanno.masaki@xxxxxxxxxxxxxx>

Best regards,

Attachment: xm_scsi.patch
Description: Binary data

Xen-devel mailing list



Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.