[Bug 265198] New: Xen with iscsi backend
https://bugzilla.novell.com/show_bug.cgi?id=265198 Summary: Xen with iscsi backend Product: SUSE Linux 10.1 Version: Final Platform: x86 OS/Version: SLES 10 Status: NEW Severity: Normal Priority: P5 - None Component: Xen AssignedTo: cgriffin@novell.com ReportedBy: leo@kangaroot.net QAContact: qa@suse.de Running SLES10 SP1 RC1. In the /etc/xen/examples directory is a example.iscsi file which has a disk line that points to an iscsi device. e.g disk = [ 'iscsi:iqn.2006-09.de.suse@0ac47ee2-216e-452a-a341-a12624cd0225,hda,w' ] Is this supposed to work? If I try to do the same I always get "Error: Disk isn't accessible" when trying to create the vm. If I connect my iscsi the normal way via Yast -> Network services -> iscsi initiator and I refer to these disks with a phy line in my xen config everything works. e.g disk = [ 'phy:/dev/disk/by-uuid/8afa61fc-cce3-483b-b151-47e161194603,hda,w' ] -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.
https://bugzilla.novell.com/show_bug.cgi?id=265198 leo@kangaroot.net changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |leo@kangaroot.net ------- Comment #1 from leo@kangaroot.net 2007-04-17 02:52 MST ------- xen04:/etc/xen/scripts # grep -r DRIVER_PHY /usr/lib/python/site-packages/xen/ /usr/lib/python/site-packages/xen/install/disks.py: DRIVER_PHY = 'phy' /usr/lib/python/site-packages/xen/install/disks.py: assert(self._pdevDriver != self.DRIVER_PHY) /usr/lib/python/site-packages/xen/install/disks.py: self._pdevDriver = self.DRIVER_PHY Binary file /usr/lib/python/site-packages/xen/install/disks.pyc matches xen04:/etc/xen/scripts # grep -i -r iscsi /usr/lib/python/site-packages/xen/ xen04:/etc/xen/scripts # -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.
https://bugzilla.novell.com/show_bug.cgi?id=265198 garloff@novell.com changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED ------- Comment #2 from garloff@novell.com 2007-04-17 04:49 MST ------- The invocation of the script works as follows: The backend driver creates a hotplug event, which wakes up udev, which inspects its rules and finds SUBSYSTEM=="xen-backend", KERNEL=="vbd*", RUN+="/etc/xen/scripts/block $env{ACTION}" in /etc/udev/rules.d/40-xen.rules /etc/xen/scripts/block handles the types 'phy' and 'file' itself and calls /etc/xen/scripts/block-$type otherwise (see last lines of the block script). -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.
https://bugzilla.novell.com/show_bug.cgi?id=265198 ------- Comment #3 from leo@kangaroot.net 2007-04-17 04:59 MST ------- Thanks for your feedback Kurt. I added an echo (debug) statement to the beginning of the block-iscsi code but I don't see it printed when executing xm create . So I assume the script is not called. # xm create vm1.iscsi Using config file "./vm1.iscsi". Warning: The bootentry option is deprecated. Use bootargs and pass --entry= directly. No handlers could be found for logger "xend" Error: Disk isn't accessible Usage: xm create <ConfigFile> [options] [vars] # cat vm1.iscsi disk = [ 'iscsi:iqn.2007-02.net.kangaroot@disk1,hda,w' ] memory = 512 vcpus = 1 builder = 'linux' name = 'vm1' vif = [ 'mac=00:16:3e:f3:b1:14,vifname=vif_vm1' ] localtime = 0 on_poweroff = 'destroy' on_reboot = 'restart' on_crash = 'restart' extra = ' TERM=xterm init=/bin/bash' bootloader = '/usr/lib/xen/boot/domUloader.py' bootentry = 'hda2:/boot/vmlinuz-xenpae,/boot/initrd-xenpae' # tail -n5 /etc/xen/scripts/block echo "Looks like we have $t" # If we've reached here, $t is neither phy nor file, so fire a helper script. [ -x /etc/xen/scripts/block-"$t" ] && \ /etc/xen/scripts/block-"$t" "$command" $node But I don't see the message printed on the screen -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.
https://bugzilla.novell.com/show_bug.cgi?id=265198 ------- Comment #4 from garloff@novell.com 2007-04-17 05:07 MST ------- Leo: 1. The scripts are run from udev, messages don't go to the screen, but you can find them in the xend logs. (However I believe you'd need to do echo "TEXT" 1>&2 to write it to stderr rather than stdout ...) 2. domUloader and block-iscsi don't currently work together, see bug #186696. I have a new version of domUloader that fixes this, but unfortunately, the way the script is plugged into Xen has changed compared to my original work, so I'd need to redo that. (The way it's currently plugged in, it can't work!) I have not yet found the time to implement this and I'm also somewhat confused by Charles saying that it's not needed any more ... If you remove domUloader from the picture, does boot-iscs work for you then? If not, yo debug, you can uncomment the echo statements in the scipt. Or do manually what the script does: (a) Find out the record ID iscsiadm -m node The record ID is the first field, the one you are looking for should have the uuid set to the same value that you have configured in your disk export line in the xen vm config file. (b) Log in to the target iscsiadm -m node -r $rec -l Does this work? -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.
https://bugzilla.novell.com/show_bug.cgi?id=265198 ------- Comment #5 from leo@kangaroot.net 2007-04-17 05:23 MST ------- Created an attachment (id=131708) --> (https://bugzilla.novell.com/attachment.cgi?id=131708&action=view) xend.log -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.
https://bugzilla.novell.com/show_bug.cgi?id=265198 ------- Comment #6 from leo@kangaroot.net 2007-04-17 05:24 MST ------- Logging in to the target works: xen04:/etc/xen/scripts # iscsiadm -m node [1d5304] 192.168.5.1:3260,1 iqn.2007-02.net.kangaroot:disk3 [1d5302] 192.168.5.1:3260,1 iqn.2007-02.net.kangaroot:disk1 [1d5303] 192.168.5.1:3260,1 iqn.2007-02.net.kangaroot:disk2 xen04:/etc/xen/scripts # iscsiadm -m node -r 1d5302 -l xen04:/etc/xen/scripts # iscsiadm -m session tcp: [4:1d5302] 192.168.5.1:3260,1 iqn.2007-02.net.kangaroot:disk1 If I remove the DomUloader I get the following: # xm create /etc/xen/vm/vm1.iscsi Using config file "/etc/xen/vm/vm1.iscsi". Started domain vm1 So It seems it is started but after 5-10 seconds the domain is no longer active and I see some strange things in my xend.log (see attachment for full log) [2007-04-17 13:09:58 xend.XendDomainInfo 4336] DEBUG (XendDomainInfo:786) Storing domain details: {'console/ring-ref': '1129876', 'console/port': '2', 'name': 'vm1', 'console/limit': '1048576', 'vm': '/vm/0b21386d-3ac3-0d4c-f150-60388475d452', 'domid': '13', 'cpu/0/availability': 'online', 'memory/target': '524288', 'store/ring-ref': '1125698', 'store/port': '1'} [2007-04-17 13:09:58 xend.XendDomainInfo 4336] ERROR (XendDomainInfo:1134) VM vm1 restarting too fast (4.456499 seconds since the last restart). Refusing to restart to avoid loops. It seems like it is looping somewhere -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.
https://bugzilla.novell.com/show_bug.cgi?id=265198 ------- Comment #7 from leo@kangaroot.net 2007-04-17 05:30 MST ------- I managed to get the output from the console .. Using IPI No-Shortcut mode XENBUS: Device with no driver: device/vbd/768 XENBUS: Device with no driver: device/vif/0 XENBUS: Device with no driver: device/console/0 md: Autodetecting RAID arrays. md: autorun ... md: ... autorun DONE. VFS: Cannot open root device "<NULL>" or unknown-block(0,0) Please append a correct "root=" boot option Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0) I added a root = entry to the xen configuration and know I get .. XENBUS: Device with no driver: device/vbd/768 XENBUS: Device with no driver: device/vif/0 XENBUS: Device with no driver: device/console/0 md: Autodetecting RAID arrays. md: autorun ... md: ... autorun DONE. VFS: Cannot open root device "hda2" or unknown-block(0,0) Please append a correct "root=" boot option Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0) -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.
https://bugzilla.novell.com/show_bug.cgi?id=265198 ------- Comment #8 from leo@kangaroot.net 2007-04-17 05:52 MST ------- adding a ramdisk = line fixed the kernel panic. But the system still hangs after mounting the root fs. Using IPI No-Shortcut mode XENBUS: Device with no driver: device/vbd/768 XENBUS: Device with no driver: device/vif/0 XENBUS: Device with no driver: device/console/0 Freeing unused kernel memory: 196k freed netfront: Initialising virtual ethernet driver. netfront: device eth0 has copying receive path. Registering block device major 3 blkfront: hda: barriers enabled hda: hda1 hda2 md: md0 stopped. md: md1 stopped. md: md2 stopped. kjournald starting. Commit interval 5 seconds EXT3 FS on hda2, internal journal EXT3-fs: mounted filesystem with ordered data mode. Adding 976872k swap on /dev/hda1. Priority:-1 extents:1 across:976872k <HANG> -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.
https://bugzilla.novell.com/show_bug.cgi?id=265198 ------- Comment #9 from garloff@novell.com 2007-04-17 06:49 MST ------- Hmmm, if the block-iscsi script fails, you normally get an error message: Error: Device 768 (vbd) could not be connected. Backend device not found. You can also test the iscsi script using something like xm block-attach 0 'iscsi:iqn.2007-02.net.kangaroot@disk1' xvda r and your partitions should show up (use fdisk -l /dev/xvda to verify, xm block-detach 0 xvda to undo) The issue you are running into is probably that you don't pass a ramdisk (initrd) to the domain that does then properly load the xen drivers. Here's what should happen: [...] XENBUS: Device with no driver: device/vbd/768 XENBUS: Device with no driver: device/vif/0 XENBUS: Device with no driver: device/console/0 Freeing unused kernel memory: 192k freed Starting udevd Creating devices Loading xennet netfront: Initialising virtual ethernet driver. netfront: device eth0 has copying receive path. Loading xenblk Registering block device major 3 blkfront: hda: barriers enabled hda: hda1 hda2 ata_id[551]: main: HDIO_GET_IDENTITY failed for '/dev/.tmp-3-0' Loading dm-mod device-mapper: 4.7.0-ioctl (2006-06-24) initialised: dm-devel@redhat.com Loading dm-snapshot Waiting for /dev/mapper/control to appear: . ok Loading reiserfs Unable to find volume group "hda2" Waiting for device /dev/hda2 to appear: ok rootfs: major=3 minor=2 devn=770 fsck 1.38 (30-Jun-2005) [/bin/fsck.reiserfs (1) -- /] fsck.reiserfs -a /dev/hda2 get_dma_info failed Invalid argument Reiserfs super block in block 16 on 0x302 of format 3.6 with standard journal Blocks (total/free): 457840/77981 by 4096 bytes Filesystem is clean Replaying journal.. Reiserfs journal '/dev/hda2' in blocks [18..8211]: 0 transactions replayed Checking internal tree..finished fsck succeeded. Mounting root device read-write. Mounting root /dev/hda2 ReiserFS: hda2: found reiserfs format "3.6" with standard journal ReiserFS: hda2: using ordered data mode reiserfs: using flush barriers ReiserFS: hda2: journal params: device hda2, size 8192, journal first block 18, max trans len 1024, max batch 900, max commit age 30, max trans age 30 ReiserFS: hda2: checking transaction log (hda2) ReiserFS: hda2: Using r5 hash to sort names INIT: version 2.86 booting [...] -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.
https://bugzilla.novell.com/show_bug.cgi?id=265198 garloff@novell.com changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |garloff@novell.com, jdebaer@novell.com ------- Comment #10 from garloff@novell.com 2007-04-17 06:52 MST ------- Our messages crossed. To comment #8: Several possibilities: - The VM does not hang, you just don't get to see the console output any longer (as it's redirected to the virtual frambuffer). Pass xencons=tty to avoid that. (See bug #255670) - You run old packages from SLES10 for iscsitarget / open-iscsi on the same machine, which will deadlock on this :-( -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.
https://bugzilla.novell.com/show_bug.cgi?id=265198 ------- Comment #11 from leo@kangaroot.net 2007-04-17 07:10 MST ------- Ok, it seems the following xen config did the trick. disk = [ 'iscsi:iqn.2007-02.net.kangaroot@disk1,hda,w' ] memory = 512 vcpus = 1 builder = 'linux' name = 'vm1' vif = [ 'mac=00:16:3e:f3:b1:14,vifname=vif_vm1' ] localtime = 0 on_poweroff = 'destroy' on_reboot = 'restart' on_crash = 'restart' extra = '3 xencons=tty' kernel = "/boot/vmlinuz-xenpae" root = "/dev/hda2" ramdisk = '/boot/initrd-xenpae' Thanks for your help and cooperation. P.S: I'm not authorized to view those bug reports. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.
https://bugzilla.novell.com/show_bug.cgi?id=265198 garloff@novell.com changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |RESOLVED Resolution| |FIXED ------- Comment #12 from garloff@novell.com 2007-04-17 08:21 MST ------- OK, mark as FIXED. Please reopen if you have further problems with block-iscsi. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.
participants (1)
-
bugzilla_noreply@novell.com