WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

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

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] [PATCH] Fix xm scsi-attach/detach/list for inactive managed domains
From: Masaki Kanno <kanno.masaki@xxxxxxxxxxxxxx>
Date: Mon, 27 Oct 2008 17:16:03 +0900
Delivery-date: Mon, 27 Oct 2008 01:16:37 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Hi,

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 
None/device-misc/vscsi/nextDeviceID')
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 ?
    main.main(sys.argv)
  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 
None/device-misc/vscsi/nextDeviceID')
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,
 Kan

Attachment: xm_scsi.patch
Description: Binary data

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] [PATCH] Fix xm scsi-attach/detach/list for inactive managed domains, Masaki Kanno <=