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

Re: [Xen-devel] [PATCH 2 of 2] Remus: ensure kernel modules are built be

To: Brendan Cully <brendan@xxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxx, Keir Fraser <keir.fraser@xxxxxxxxxxxxx>, Gilberto Nunes <gilberto.nunes@xxxxxxxxxxxxxxx>
Subject: Re: [Xen-devel] [PATCH 2 of 2] Remus: ensure kernel modules are built before attempting to install them
From: 张铭嘉 <zhangninja@xxxxxxxxx>
Date: Tue, 2 Feb 2010 10:26:09 +0800
Cc:
Delivery-date: Mon, 01 Feb 2010 18:26:43 -0800
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type; bh=7HaJ+j+bsUQ0AsVeEMwbY/kK9p6GgB0Op+ENhFyHu2s=; b=rXCCkhd29MZh42zDwtvILbv5dUuYN80Ow1zXf/MQNKwOG7LAVjWBBvFLSWm0Hd9Mlv 5EFEplz8dP+PWqXMCmIqQqhUhktdIIvwFpKoObCoUUqDi0vJYaYrD6wWL1qziOMqlJnz psIzAHn8UdcgD0FbwEz63Hq9XloP/tcUnTm3o=
Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=Pwi+Mhh9n49FUp92YmOW3oOrstKmdJWGW0HeUCGLnxct54vCYHgaHQxg9kzuiR4b6/ /g8UKIn7e7HA9djdKHXepirU6ZWS/9cMss+nvmA4/JnjJ3YQ//VIWhS7OgBVjFzW3Qay Af0aqcLtFGdjcoprCUcI3cybsQDaM0m6Lwxx0=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <a43ce819faa185c1e1ee.1265069609@xxxxxxxxxxxxxxxxx>
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>
References: <patchbomb.1265069607@xxxxxxxxxxxxxxxxx> <a43ce819faa185c1e1ee.1265069609@xxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Hi:
It's so greate to know that you have added this. 
I can "xm create" pv guest successfully using: 
disk=[ 'tap:remus:server2:9000|aio:/home/ninja/img/test/paraV.img,hda1,w' ]

However, when I updated my xen-unstable version from 20570: aa01a13d750b to 20844.I encountered a problem seems very strange:

[root@server1 test]# xm create vm1.cfg 
Using config file "./vm1.cfg".
Error: Device 769 (tap) could not be connected. server2:9000|aio:/home/ninja/img/test/paraV.img does not exist

What I can ensure is that this is not
If I remove "remus:server2:9000| ", I can create the pv normally using 
"disk=[ 'tap:aio:/home/ninja/img/test/paraV.img,hda1,w' ]". So it seems that I make something wrong with the "remus:server2:9000| ". Yet I did successfully create a pv using the same configuration in a previous version of xen-unstable(I'm not quite sure if there is a bug been imported into the later version since 20570).

Do I miss something? Thanks for pointed out.

This is my configuration file:
  1 kernel="/boot/vmlinuz-2.6.18.8-xen"
  2 ramdisk="/boot/initrd-2.6.18.8-xen.img"
  3 memory=256
  4 name="ParaOS"
  5 vcpus=1
  6 vif=[ '' ]
  7 #vif = [ 'mac=00:16:3e:00:00:11, bridge=xenbr0' ]
  8 ip="192.168.226.217"
  9 netmask="255.255.255.0"
 10 gateway="192.168.226.1"
 11 #disk=[ 'tap:aio:/home/ninja/img/test/paraV.img,hda1,w' ]
 12 disk=[ 'tap:remus:server2:9000|aio:/home/ninja/img/test/paraV.img,hda1,w' ]
 13 root="/dev/hda1 ro"

"server2" is the name of backup server, "9000" is the intended port and "/home/ninja/img/test/paraV.img" is the location of my image.

The error was oringiated from the function of "waitForDevice" in xen/xend/server/DevController.py
the status of waiting is "Error" and the vm imediately destroy itself which seems caused by it hasn't waited the "tap 769"(device ID which listed in xend.log as below).

the error info is at line 165 of DevController.py
157         elif status == Error:
158             self.destroyDevice(devid, False)
159             if err is None:
160                 raise VmError("Device %s (%s) could not be connected. "
161                               "Backend device not found." %
162                               (devid, self.deviceClass))
163             else:
164                 raise VmError("Device %s (%s) could not be connected. "
165                               "%s" % (devid, self.deviceClass, err))

the "err"  in VmError above is produced by function "waitForBackend" in DevController.py too.
559             err = xstransact.Read(backpath, HOTPLUG_ERROR_NODE)
which I print out and get the value of backpath:
backpath:/local/domain/0/backend/tap/18/769.
I don't know why xstransact.Read failed here.

Is it a name resolvation problem of remus, or guestOS version specific problem(my pv is rhel5.3), 

or just a configuration problem or anything else? I'm stunted.hope someone can give me any advice to step further. 

Here is the xend.log:
6410 [2010-02-02 09:48:12 5172] WARNING (XendConfig:874) Unconverted key: Description
6411 [2010-02-02 09:48:12 5172] DEBUG (XendDomainInfo:101) XendDomainInfo.create(['vm', ['name', 

'ParaOS'], ['memory', 256], ['on_xend_star     t', 'ignore'], ['on_xend_stop', 'ignore'], 

['vcpus', 1], ['oos', 1], ['image', ['linux', ['kernel', '/boot/vmlinuz-2.6.18.8-xen'], ['r     

amdisk', '/boot/initrd-2.6.18.8-xen.img'], ['ip', 

'192.168.226.217:127.0.255.255:192.168.226.1:255.255.255.0::eth0:off'], ['root', '/d     ev/hda1 

ro'], ['videoram', 4], ['tsc_mode', 0], ['nomigrate', 0]]], ['s3_integrity', 1], ['device', 

['tap2', ['uname', 'tap:remus:serv     er2:9000|aio:/home/ninja/img/test/paraV.img'], ['dev', 

'hda1'], ['mode', 'w']]], ['device', ['vif']]])
6412 [2010-02-02 09:48:12 5172] DEBUG (XendDomainInfo:2486) XendDomainInfo.constructDomain
6413 [2010-02-02 09:48:12 5172] DEBUG (balloon:220) Balloon: 2045408 KiB free; need 4096; done.
6414 [2010-02-02 09:48:12 5172] DEBUG (XendDomain:464) Adding Domain: 3
6415 [2010-02-02 09:48:12 5172] DEBUG (XendDomainInfo:2795) XendDomainInfo.initDomain: 3 256
6416 [2010-02-02 09:48:12 5172] DEBUG (XendDomainInfo:2822) _initDomain:shadow_memory=0x0, 

memory_static_max=0x10000000, memory_static_min=     0x0.
6417 [2010-02-02 09:48:12 5172] INFO (image:182) buildDomain os=linux dom=3 vcpus=1
6418 [2010-02-02 09:48:12 5172] DEBUG (image:723) domid          = 3
6419 [2010-02-02 09:48:12 5172] DEBUG (image:724) memsize        = 256
6420 [2010-02-02 09:48:12 5172] DEBUG (image:725) image          = /boot/vmlinuz-2.6.18.8-xen
6421 [2010-02-02 09:48:12 5172] DEBUG (image:726) store_evtchn   = 1
6422 [2010-02-02 09:48:12 5172] DEBUG (image:727) console_evtchn = 2
6423 [2010-02-02 09:48:12 5172] DEBUG (image:728) cmdline        = root=/dev/hda1 ro 

ip=192.168.226.217:127.0.255.255:192.168.226.1:255.255     .255.0::eth0:off
6424 [2010-02-02 09:48:12 5172] DEBUG (image:729) ramdisk        = /boot/initrd-2.6.18.8-xen.img
6425 [2010-02-02 09:48:12 5172] DEBUG (image:730) vcpus          = 1 
6426 [2010-02-02 09:48:12 5172] DEBUG (image:731) features       = 6427 [2010-02-02 09:48:12 

5172] DEBUG (image:732) flags          = 06428 [2010-02-02 09:48:12 5172] DEBUG (image:733) 

superpages     = 06429 [2010-02-02 09:48:12 5172] INFO (XendDomainInfo:2345) createDevice: tap2 : 

{'bootable': 1, 'uname': 'tap:remus:server2:9000|aio:/home/     ninja/img/test/paraV.img', 

'mode': 'w', 'dev': 'hda1', 'uuid': 'f1b2a397-c138-b847-727f-89e9903e61f9'}
6430 [2010-02-02 09:48:12 5172] WARNING (BlktapController:195) WARNING: using deprecated blktap 

module
6431 [2010-02-02 09:48:12 5172] DEBUG (DevController:95) DevController: writing {'virtual-

device': '769', 'device-type': 'disk', 'protocol'     : 'x86_32-abi', 'backend-id': '0', 'state': 

'1', 'backend': '/local/domain/0/backend/tap/3/769'} to /local/domain/3/device/vbd/769.
6432 [2010-02-02 09:48:12 5172] DEBUG (DevController:97) DevController: writing {'domain': 

'ParaOS', 'frontend': '/local/domain/3/device/vb     d/769', 'uuid': 'f1b2a397-c138-b847-727f-

89e9903e61f9', 'bootable': '1', 'dev': 'hda1', 'state': '1', 'params': 'remus:server2:9000|ai     

o:/home/ninja/img/test/paraV.img', 'mode': 'w', 'online': '1', 'frontend-id': '3', 'type': 'tap'} 

to /local/domain/0/backend/tap/3/769     .
6433 [2010-02-02 09:48:12 5172] INFO (XendDomainInfo:2345) createDevice: vif : {'mac': 

'00:16:3e:49:50:68', 'uuid': '2f8cf97b-2306-0e54-1bb     2-bc7b5668b4da'}
6434 [2010-02-02 09:48:12 5172] DEBUG (DevController:95) DevController: writing {'mac': 

'00:16:3e:49:50:68', 'handle': '0', 'protocol': 'x8     6_32-abi', 'backend-id': '0', 'state': 

'1', 'backend': '/local/domain/0/backend/vif/3/0'} to /local/domain/3/device/vif/0.
6435 [2010-02-02 09:48:12 5172] DEBUG (DevController:97) DevController: writing {'domain': 

'ParaOS', 'frontend': '/local/domain/3/device/vi     f/0', 'uuid': '2f8cf97b-2306-0e54-1bb2-

bc7b5668b4da', 'script': '/etc/xen/scripts/vif-bridge', 'mac': '00:16:3e:49:50:68', 'frontend-i   

  d': '3', 'state': '1', 'online': '1', 'handle': '0'} to /local/domain/0/backend/vif/3/0.
6436 [2010-02-02 09:48:12 5172] DEBUG (XendDomainInfo:3377) Storing VM details: {'on_xend_stop': 

'ignore', 'shadow_memory': '0', 'uuid': '4     c167777-7597-cc57-f34d-476b9b6ccb08', 'on_reboot': 

'restart', 'start_time': '1265075292.91', 'on_poweroff': 'destroy', 'bootloader_arg     s': '', 

'on_xend_start': 'ignore', 'on_crash': 'restart', 'xend/restart_count': '0', 'vcpus': '1', 

'vcpu_avail': '1', 'bootloader': ''     , 'image': "(linux (kernel /boot/vmlinuz-2.6.18.8-xen) 

(ramdisk /boot/initrd-2.6.18.8-xen.img) (args 'root=/dev/hda1 ro ip=192.168.226     

.217:127.0.255.255:192.168.226.1:255.255.255.0::eth0:off ') (superpages 0) (tsc_mode 0) (videoram 

4) (pci ()) (nomigrate 0) (notes (HV     _START_LOW 4118806528) (FEATURES 

'writable_page_tables|writable_descriptor_tables|auto_translated_physmap|pae_pgdir_above_4gb|supe

rvis     or_mode_kernel') (VIRT_BASE 3221225472) (GUEST_VERSION 2.6) (PADDR_OFFSET 3221225472) 

(GUEST_OS linux) (HYPERCALL_PAGE 3222278144) (LO     ADER generic) (SUSPEND_CANCEL 1) (PAE_MODE 

yes) (ENTRY 3222274048) (XEN_VERSION xen-3.0)))", 'name': 'ParaOS'}
6437 [2010-02-02 09:48:12 5172] DEBUG (XendDomainInfo:1782) Storing domain details: 

{'console/ring-ref': '536762', 'image/entry': '32222740     48', 'console/port': '2', 

'store/ring-ref': '536763', 'image/loader': 'generic', 'vm': '/vm/4c167777-7597-cc57-f34d-

476b9b6ccb08', 'co     ntrol/platform-feature-multiprocessor-suspend': '1', 'image/hv-start-low': 

'4118806528', 'image/guest-os': 'linux', 'image/features/wr     itable-descriptor-tables': '1', 

'image/virt-base': '3221225472', 'memory/target': '262144', 'image/guest-version': '2.6', 

'image/featu     res/supervisor-mode-kernel': '1', 'image/pae-mode': 'yes', 'description': '', 

'console/limit': '1048576', 'image/paddr-offset': '32212     25472', 'image/hypercall-page': 

'3222278144', 'image/suspend-cancel': '1', 'cpu/0/availability': 'online', 'image/features/pae-

pgdir-a     bove-4gb': '1', 'image/features/writable-page-tables': '1', 'console/type': 

'xenconsoled', 'image/features/auto-translated-physmap': '     1', 'name': 'ParaOS', 'domid': 

'3', 'image/xen-version': 'xen-3.0', 'store/port': '1'}
6438 [2010-02-02 09:48:12 5172] DEBUG (DevController:95) DevController: writing {'protocol': 

'x86_32-abi', 'state': '1', 'backend-id': '0',      'backend': 

'/local/domain/0/backend/console/3/0'} to /local/domain/3/device/console/0.
6439 [2010-02-02 09:48:12 5172] DEBUG (DevController:97) DevController: writing {'domain': 

'ParaOS', 'frontend': '/local/domain/3/device/co     nsole/0', 'uuid': '1823a807-d3eb-00d8-29f7-

39494f277f32', 'frontend-id': '3', 'state': '1', 'location': '2', 'online': '1', 'protocol'     : 

'vt100'} to /local/domain/0/backend/console/3/0.
6440 [2010-02-02 09:48:13 5172] DEBUG (XendDomainInfo:1869) XendDomainInfo.handleShutdownWatch
6441 [2010-02-02 09:48:13 5172] DEBUG (DevController:139) Waiting for devices vif2.
6442 [2010-02-02 09:48:13 5172] DEBUG (DevController:139) Waiting for devices vif.
6443 [2010-02-02 09:48:13 5172] DEBUG (DevController:144) Waiting for 0.
6444 [2010-02-02 09:48:13 5172] DEBUG (DevController:628) hotplugStatusCallback 

/local/domain/0/backend/vif/3/0/hotplug-status.
6445 [2010-02-02 09:48:13 5172] DEBUG (DevController:628) hotplugStatusCallback 

/local/domain/0/backend/vif/3/0/hotplug-status.
6446 [2010-02-02 09:48:13 5172] DEBUG (DevController:642) hotplugStatusCallback 1.
6447 [2010-02-02 09:48:13 5172] DEBUG (DevController:139) Waiting for devices vscsi.
6448 [2010-02-02 09:48:13 5172] DEBUG (DevController:139) Waiting for devices vbd.
6449 [2010-02-02 09:48:13 5172] DEBUG (DevController:139) Waiting for devices ioports.
6450 [2010-02-02 09:48:13 5172] DEBUG (DevController:139) Waiting for devices irq.
6451 [2010-02-02 09:48:13 5172] DEBUG (DevController:139) Waiting for devices vkbd.
6452 [2010-02-02 09:48:13 5172] DEBUG (DevController:139) Waiting for devices vfb.
6453 [2010-02-02 09:48:13 5172] DEBUG (DevController:139) Waiting for devices console.
6454 [2010-02-02 09:48:13 5172] DEBUG (DevController:144) Waiting for 0.
6455 [2010-02-02 09:48:13 5172] DEBUG (DevController:139) Waiting for devices pci.
6456 [2010-02-02 09:48:13 5172] DEBUG (DevController:139) Waiting for devices tap2.
6457 [2010-02-02 09:48:13 5172] DEBUG (DevController:139) Waiting for devices tap.
6458 [2010-02-02 09:48:13 5172] DEBUG (DevController:144) Waiting for 769.
6458 [2010-02-02 09:48:13 5172] DEBUG (DevController:144) Waiting for 769.
6459 [2010-02-02 09:48:13 5172] DEBUG (DevController:628) hotplugStatusCallback 

/local/domain/0/backend/tap/3/769/hotplug-status.
6460 [2010-02-02 09:48:13 5172] DEBUG (DevController:642) hotplugStatusCallback 2.
6461 [2010-02-02 09:48:13 5172] DEBUG (XendDomainInfo:3030) XendDomainInfo.destroy: domid=18
6462 [2010-02-02 09:48:13 5172] DEBUG (XendDomainInfo:2389) Destroying device model
6463 [2010-02-02 09:48:13 5172] DEBUG (XendDomainInfo:2396) Releasing devices
6464 [2010-02-02 09:48:13 5172] DEBUG (XendDomainInfo:2402) Removing vif/0
6465 [2010-02-02 09:48:13 5172] DEBUG (XendDomainInfo:1269) XendDomainInfo.destroyDevice: 

deviceClass = vif, device = vif/0
6466 [2010-02-02 09:48:13 5172] DEBUG (XendDomainInfo:2402) Removing console/0
6467 [2010-02-02 09:48:13 5172] DEBUG (XendDomainInfo:1269) XendDomainInfo.destroyDevice: 

deviceClass = console, device = console/0
6468 [2010-02-02 09:48:13 5172] DEBUG (XendDomainInfo:2402) Removing tap/769
6469 [2010-02-02 09:48:13 5172] DEBUG (XendDomainInfo:1269) XendDomainInfo.destroyDevice: 

deviceClass = tap, device = tap/769


On Tue, Feb 2, 2010 at 8:13 AM, Brendan Cully <brendan@xxxxxxxxx> wrote:
# HG changeset patch
# User Brendan Cully <brendan@xxxxxxxxx>
# Date 1265068569 28800
# Node ID a43ce819faa185c1e1eef2b8244b64788ddff05a
# Parent  d30a67608592a1b68c286bb352b9f7fbe37f0e19
Remus: ensure kernel modules are built before attempting to install them

make tools seems to skip straight to the install target.

Signed-off-by: Brendan Cully <brendan@xxxxxxxxx>

diff --git a/tools/remus/kmod/Makefile b/tools/remus/kmod/Makefile
--- a/tools/remus/kmod/Makefile
+++ b/tools/remus/kmod/Makefile
@@ -17,7 +17,7 @@
       if test -d $(KERNELDIR); then $(MAKE) -C $(KERNELDIR) SUBDIRS=`pwd` modules; fi

 .PHONY: install
-install:
+install: all
       if test -d $(KERNELDIR); then $(MAKE) -C $(KERNELDIR) SUBDIRS=`pwd` INSTALL_MOD_PATH=$(DESTDIR) modules_install; fi

 clean::

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel



--
--
Best Regards

Minjia Zhang

Huazhong University of Science and Technology

Room 328,Dong 8 Building 8, No.1037 Luoyu Road, Wuhan 430074, P.R.C.

Tel: +86-159-2625-3437

Email:zhangninja@xxxxxxxxx
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel