> > If we were to invoke 'iscsistart --fwparam_network' after having done > > configure_networking, then the iscsi parameters would be in affect. > > Its may be arguable that this is simply misconfiguration of the ip= > > parameter. > > On the other hand, one could argue that one might want to overwrite > the parameters set in the firmware with an explicit kernel commmand > line.
Agreed. > I think the case is definitely clear if iscsi_auto is specified > without an ip= parameter, then iscsistart should take care of it. Definitely. Unfortunately, the case that I'm working on is with MAAS which specifies a ip= command line to its provided iscsi server. The install environment is then provided over read-only iscsi. It seems reasonable that you might have 'ip=' on the kernel command line for reasons unrelated to iscsi entirely, and possibly referencing different network devices. > Btw. is there any way to test this in a VM? I don't have access to > the corresponding hardware that sets these values, so I can't > really test this myself. Luckily, you *can* do it entirely within qemu and ipxe with a few minor limitations. Figuring out how to do that is non-trivial, but I've managed my way through it. I'll try to collect my notes and post back here. > > > Also of note, /run/net-<device>.conf will not be written if iscsistart > > configures the networking as opposed to 'ipconfig' doing it. > > Could you give me the output of > > iscsistart -f > > on a system with iBFT? I think I could write a trivial POSIX > shell parser for that that creates the corresponding > /run/net-*.conf files. From the open-iscsi source I'm pretty > confident I know what the output looks like, but I'd rather > have real data to test that with. Right, that was my thought too. I might suggest not reading iscsistart -f, but rather the files from /sys/firmware/ibft. Here is some output from each, for those not adventuresome enough to try on their own. Note, i added a carriage return to subnet mask that did not have one. This system was booted with an pxe config that looked like this and 'break=top' on the kernel command line. The values jsut then collected from the initramfs: #!ipxe dhcp set iscsi-host 192.168.1.131 set base-url http://192.168.1.131:9999/ sanhook --drive 0x80 iscsi:${iscsi-host}::3260:1:inst-000-1 sanhook --drive 0x81 iscsi:${iscsi-host}::3260:1:inst-000-2 kernel ${base-url}/boot-kernel break=top initrd ${base-url}/boot-initrd boot (initramfs) iscsistart --fwparam_print # BEGIN RECORD 2.0-873 iface.initiatorname = iqn.2010-04.org.ipxe:00000000-0000-0000-0000-000000000000 iface.transport_name = tcp iface.hwaddress = 52:54:00:12:34:56 iface.bootproto = STATIC iface.ipaddress = 10.0.2.16 iface.subnet_mask = 255.255.255.0 iface.gateway = 10.0.2.2 iface.primary_dns = 10.0.2.3 iface.vlan_id = 0 iface.net_ifacename = eth0 node.name = inst-000-2 node.conn[0].address = 192.168.1.131 node.conn[0].port = 3260 node.boot_lun = 01000000 # END RECORDk (initramfs) ipconfig eth0 IP-Config: eth0 hardware address 52:54:00:12:34:56 mtu 1500 DHCP RARP IP-Config: eth0 guessed broadcast address 10.0.2.255 IP-Config: eth0 complete (dhcp from 10.0.2.2): address: 10.0.2.15 broadcast: 10.0.2.255 netmask: 255.255.255.0 gateway: 10.0.2.2 dns0 : 10.0.2.3 dns1 : 0.0.0.0 rootserver: 10.0.2.2 rootpath: filename : (initramfs) for f in $(find /sys/firmware/ibft/ -type f); do echo == $f ==; cat $f; done == /sys/firmware/ibft/target0/lun == 01000000 == /sys/firmware/ibft/target0/port == 3260 == /sys/firmware/ibft/target0/target-name == inst-000-2 == /sys/firmware/ibft/target0/flags == 3 == /sys/firmware/ibft/target0/index == 0 == /sys/firmware/ibft/target0/chap-type == 0 == /sys/firmware/ibft/target0/nic-assoc == 0 == /sys/firmware/ibft/target0/ip-addr == 192.168.1.131 == /sys/firmware/ibft/initiator/flags == 3 == /sys/firmware/ibft/initiator/index == 0 == /sys/firmware/ibft/initiator/initiator-name == iqn.2010-04.org.ipxe:00000000-0000-0000-0000-000000000000 == /sys/firmware/ibft/ethernet0/mac == 52:54:00:12:34:56 == /sys/firmware/ibft/ethernet0/vlan == 0 == /sys/firmware/ibft/ethernet0/flags == 3 == /sys/firmware/ibft/ethernet0/index == 0 == /sys/firmware/ibft/ethernet0/primary-dns == 10.0.2.3 == /sys/firmware/ibft/ethernet0/subnet-mask == 255.255.255.0 == /sys/firmware/ibft/ethernet0/gateway == 10.0.2.2 == /sys/firmware/ibft/ethernet0/origin == 1 == /sys/firmware/ibft/ethernet0/ip-addr == 10.0.2.16