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 error message and wait time for xm block-detach

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] [PATCH] Fix error message and wait time for xm block-detach command
From: Masaki Kanno <kanno.masaki@xxxxxxxxxxxxxx>
Date: Tue, 04 Sep 2007 19:48:21 +0900
Cc: jfehlig@xxxxxxxxxx
Delivery-date: Wed, 05 Sep 2007 08:15:22 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
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/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Hi,

I tested xm block-detach command with latest xen-unstable and 
changeset:15736 in the staging tree.  Test cases are as follows. 
I found some problems in the following test case 1, 3 and 8. 

+--+----------+----------+----------+----------+
|  |A         |B         |C         |D         |
|  +----------+----------+----------+----------+
|  |Domain    |Already   |Disk Type |Disk      |
|  |    Status| Attached?|          |  on Guest|
+--+----------+----------+----------+----------+
| 1|Active    |Yes       |VBD       |Mounted   |
+--+----------+----------+----------+----------+
| 2|Inactive  |No        |TAP       |Unmounted |
|  |(Managed) |          |          |          |
+--+----------+----------+----------+----------+

Test case 1:A1+B1+C1+D1
  # xm block-detach vm1 hda1
  << Wait 200 seconds >>
  Error: Device hda1 (tap) could not be disconnected. 
  Usage: xm block-detach <Domain> <DevId> [-f|--force]
  
  Destroy a domain's virtual block device.
  #

  ** The keyword "(tap)" in the error message is misleading.
  ** The wait time is 200 seconds. It's long, isn't it?


Test case 2:A1+B1+C1+D2
  # xm block-detach vm1 hdb1
  #

  ** Good


Test case 3:A1+B1+C2+D1
  # xm block-detach vm2 hda1
  << Wait 200 seconds >>
  Error: Device hda1 (tap) could not be disconnected. 
  Usage: xm block-detach <Domain> <DevId> [-f|--force]
  
  Destroy a domain's virtual block device.

  ** The wait time is 200 seconds. It's long, isn't it?


Test case 4:A1+B1+C2+D2
  # xm block-detach vm2 hdb1
  #

  ** Good


Test case 5:A1+B2
  # xm block-detach vm2 hdb2
  Error: Device 834 not connected
  Usage: xm block-detach <Domain> <DevId> [-f|--force]
  
  Destroy a domain's virtual block device.

  ** Good


Test case 6:A2+B1+C1
  # xm block-detach vm1 hda1
  #

  ** Good


Test case 7:A2+B1+C2
  # xm block-detach vm2 hda1
  #

  ** Good


Test case 8:A2+B2
  # xm block-detach vm2 hdb2
  #

  ** Error message is not shown. 


About the problem of test case 1 and 3:
 - Wait time
    There is a cause in xm.  When xm requires a block device 
    detaching to xend, xm requires the block device detaching two 
    times. 
    At first, xm requires the block device detaching by device 
    class 'vbd'. 
    Next, xm requires the block device detaching by device class 
    'tap'. 
    As the result, the wait time is 200 seconds because each of 
    the block device detaching requests causes time-out. 
 - Misleading error message
    Because the last request is by device class 'tap' to xend, 
    the keyword "(tap)" is included in the error message of test 
    case 1. 
 
 This patch fixes the number of times of the block device detaching 
 request to one time.  At first, xm makes inquiries about device 
 class of a detaching target device to xend.  Then xm requires the 
 block device detaching by xend returned device class.  The wait 
 time becomes 100 seconds because the block device detaching request 
 is one time.  And the error message is also fixed. 

About the problem of test case 8:
 There is a cause in xend.  In the test case, xend does not show 
 error message. 
 
 This patch fixes to show the following error message in test case. 
 
  # xm block-detach vm2 hdb2
  Error: Device hdb2 is not defined
  Usage: xm block-detach <Domain> <DevId> [-f|--force]
  
  Destroy a domain's virtual block device.


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

Best regards,
 Kan

Attachment: error_message_for_xm_block-detach.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 error message and wait time for xm block-detach command, Masaki Kanno <=