The package has some tests that are meant to do iscsi root but can't be
executed fully automated.
With those one can try iscsi-root rather easy (not really easy, but better than
from scratch).
$ pull-lp-source open-iscsi
$ cd open-iscsi-2.1.3/
$ PATH=$PWD/debian/tests:$PATH
$ get-image hirsute.d hirsute
$ sudo ./debian/tests/patch-image --kernel=hirsute.d/kernel
--initrd=hirsute.d/initrd hirsute.d/disk.img
$ tgt-boot-test -v hirsute.d/disk.img hirsute.d/kernel hirsute.d/initrd
# At this point this boots off the iscsi root and one can log in with
ubuntu/passw0rd
This is using overlayroot like:
sda 8:0 0 2.2G 1 disk
├─sda1 8:1 0 2.1G 1 part /media/root-ro
├─sda14 8:14 0 4M 1 part
└─sda15 8:15 0 106M 1 part
Mounted like:
/dev/sda1 on /media/root-ro type ext4 (ro,relatime)
tmpfs-root on /media/root-rw type tmpfs (rw,relatime,inode64)
overlayroot on / type overlay
(rw,relatime,lowerdir=/media/root-ro,upperdir=/media/root-rw/overlay,workdir=/media/root-rw/overlay-workdir/_)
$ sudo iscsiadm -m session -P 1
Target: tgt-boot-test-SKWNjP (non-flash)
Current Portal: 10.0.12.2:3260,1
Persistent Portal: 10.0.12.2:3260,1
**********
Interface:
**********
Iface Name: default
Iface Transport: tcp
Iface Initiatorname: maas-enlist
Iface IPaddress: 10.0.12.15
Iface HWaddress: default
Iface Netdev: default
SID: 1
iSCSI Connection State: LOGGED IN
iSCSI Session State: LOGGED_IN
Internal iscsid Session State: NO CHANGE
This is a transient setup, but it should run the same hooks shouldn't it?
In any case it does not have the same hang, the guest shuts down even it
failing.
To be fair the finalrd has issues, but not a full hang.
...
[ OK ] Reached target Power-Off.
Unexpected iSCSI Connection State, forcing iSCSI logout.
Logging out of session [sid: 1, target: tgt-boot-test-reTuhW, portal:
10.0.12.2,3260]
[ 250.977777] sd-execu[1727]:
/usr/lib/systemd/system-shutdown/open-iscsi.finalrd failed with exit status 141.
[ 251.000668] reboot: Power down
xkvm returned 0 in 252s
cleaning up tgt mount tgt-boot-test-reTuhW
@Michael - do you think we need a R/W iSCSI root to experience the full hang
that you reported?
@Michael - I tested Hirsute (21.04), which version did you run on (maybe it
differs between them)?
--
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1922976
Title:
iscsid fails to log out from target on shutdown
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/open-iscsi/+bug/1922976/+subscriptions
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs