[Bug 785818] New: iscsi boot fix proposal for mkinitrd script boot-ibft.sh
https://bugzilla.novell.com/show_bug.cgi?id=785818 https://bugzilla.novell.com/show_bug.cgi?id=785818#c0 Summary: iscsi boot fix proposal for mkinitrd script boot-ibft.sh Classification: openSUSE Product: openSUSE 12.2 Version: Final Platform: All OS/Version: SLES 11 Status: NEW Severity: Normal Priority: P5 - None Component: Basesystem AssignedTo: bnc-team-screening@forge.provo.novell.com ReportedBy: vasu.chandrasekhara@gmail.com QAContact: qa-bugs@suse.de Found By: --- Blocker: --- User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.4 (KHTML, like Gecko) Chrome/22.0.1229.94 Safari/537.4 Hi, I ran into an issue with sles 11 sp2 and it looks like this issue persists in opensuse as well. When installing on an iSCSI SAN LUN, one of the advantages is that you should be able to switch the physical server and boot the same LUN off iSCSI. With a changed set of iSCSI boot parameters, configured in the iSCSI capable network card and passed to the OS in the iBFT. Unfortunately, during the creation of the initrd file, mkinitrd persists ip & iscsi information of the current server setup into the init or run_all.sh script. Example: Code: [ "$debug" ] && echo preping 12-network.sh [ "$static_macaddresses" ] || static_macaddresses='eth0:11:22:33:44:55:66' [ "$static_ips" ] || static_ips='10.10.10.10:::255.255.255.0:linux:eth0:none' [ "$drvlink" ] || drvlink='pci:v00008086d000010FBsv000010CFsd000015A4bc02sc00i00' if [ "$interface" -o "$dhcp" -o "$ip" -o "$nfsaddrs" -o "$drvlink" ]; then modules=" af_packet $bonding_module" [ "$debug" ] && echo running 12-network.sh source boot/12-network.sh [ "$modules" ] && load_modules fi [ "$debug" ] && echo preping 13-iscsi.sh [ "$root_iscsi" ] || root_iscsi='1' [ "$iscsi_sessions" ] || iscsi_sessions='1' [ "$TargetName1" ] || TargetName1='iqn.1992-08.com.myiscsistorage:sn.111111111' [ "$TargetAddress1" ] || TargetAddress1='10.10.10.100' [ "$TargetPort1" ] || TargetPort1='3260' [ "$TargetPort" ] || TargetPort='3260' if [ "$root_iscsi" -o "$TargetAddress" ]; then modules=" iscsi_tcp crc32c scsi_transport_iscsi iscsi_ibft bnx2i" [ "$debug" ] && echo running 13-iscsi.sh source boot/13-iscsi.sh [ "$modules" ] && load_modules fi The information should rather be dynamically read from the iBFT table when booting via iscsi. Which is actually also done in /lib/mkinitrd/scripts/boot-ibft.sh: Code: ip="$(ibft_get_att ip-addr)::$(ibft_get_att gateway):$(ibft_get_att subnet-mask):$ibft_hostname:$(ibft_get_ethdev):$nettype" interface=$(ibft_get_ethdev) macaddress=$(ibft_get_att mac) InitiatorName=$(ibft_get_initiatorname) But the network activation in boot-network.sh expects different variables and format, see /lib/mkinitrd/scripts/boot-network.sh: Code: static_ips=($static_ips) for macaddr in $static_macaddresses -- $dhcp_macaddresses; do My fix proposal for /lib/mkinitrd/scripts/boot-ibft.sh is to create the variables required for boot-network.sh: Code: ... ip="$(ibft_get_att ip-addr)::$(ibft_get_att gateway):$(ibft_get_att subnet-mask):$ibft_hostname:$(ibft_get_ethdev):$nettype" interface=$(ibft_get_ethdev) macaddress=$(ibft_get_att mac) InitiatorName=$(ibft_get_initiatorname) ################################################## if test "$nettype" = "dhcp"; then dhcp_macaddresses="$interface:$macaddress" else static_macaddresses="$interface:$macaddress" static_ips=$ip fi ################################################## Hope, somebody can make use of this fix and include it into the next patch/release. Best, Vasu Reproducible: Always Steps to Reproduce: 1. Install SLES SP2 on iSCSI LUN (withiscsi=1) with Server A. 2. Map iSCSI LUN to Server B (which has other iSCSI Boot parameters) 3. Server B fails to boot properly. http://forums.opensuse.org/english/get-technical-help-here/install-boot-logi... -- 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.
https://bugzilla.novell.com/show_bug.cgi?id=785818 https://bugzilla.novell.com/show_bug.cgi?id=785818#c Jiaying ren <jren@novell.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jren@novell.com AssignedTo|bnc-team-screening@forge.pr |hare@suse.com |ovo.novell.com | -- 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.
https://bugzilla.novell.com/show_bug.cgi?id=785818 https://bugzilla.novell.com/show_bug.cgi?id=785818#c2 Lee Duncan <lduncan@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |NEEDINFO InfoProvider| |vasu.chandrasekhara@gmail.c | |om --- Comment #2 from Lee Duncan <lduncan@suse.com> 2012-11-19 16:17:26 PST --- Vasu: Just to be clear, you are just essentially moving an iSCSI target to a different IP address, right? I want to make sure I understand the bug ... -- 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.
https://bugzilla.novell.com/show_bug.cgi?id=785818 https://bugzilla.novell.com/show_bug.cgi?id=785818#c3 --- Comment #3 from Vasu Chandrasekhara <vasu.chandrasekhara@gmail.com> 2012-11-20 09:51:53 UTC --- Hi Lee, not quite, but moving the target could also be a problem in the current implementation. The issue is that with modern iscsi NICs, the initrd should not persist iscsi initiator & target information. That information should be read from the iBFT dynamically. (If gpxe - http://etherboot.org/wiki/sanboot - is used and iBFT is not possible, of course persisting the iscsi info in the inird makes sense.) This way, you have a "neutral" Linux OS image residing on an arbitrary LUN and then you can program your iSCSI capable NIC (e.g. in the BIOS or UEFI) to point to that LUN. The issue above, which I am pointing to, is that the iBFT is dynamically read in boot-ibft.sh, but not acted upon in boot-network.sh. Ideally, the only parameters which needs to be passed in the boot parameter for an iscsi boot of Linux is: ibft_availabe (this could imply root_iscsi). Best, Vasu -- 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.
https://bugzilla.novell.com/show_bug.cgi?id=785818 https://bugzilla.novell.com/show_bug.cgi?id=785818#c4 --- Comment #4 from Lee Duncan <lduncan@suse.com> 2012-11-20 20:20:16 PST --- Vasu: I think perhaps you misunderstood my question. You answered about the problem in general and how you think it should be addressed at a high level. That was not what I was asking. I was asking this: in order to reproduce your problem, or to test to see if any fix I might have addresses your problem, can I test by simply moving in iSCSI target from one IP address to another, i.e. effectively just changing the IP address of the target? Or was there more involved with your test case? More specifically, you wrote:
When installing on an iSCSI SAN LUN, one of the advantages is that you should be able to switch the physical server and boot the same LUN off iSCSI. With a changed set of iSCSI boot parameters, configured in the iSCSI capable network card and passed to the OS in the iBFT.
What do you mean by "switch the physical server"? I believe you mean that the exact same iSCSI target would become available at a different target IP address. Correct? When you answer, please change NEEDSINFO to assigned to me. NOTE: I believe I _do_ have a fix for this, so I would like to know how to test said fix. -- 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.
https://bugzilla.novell.com/show_bug.cgi?id=785818 https://bugzilla.novell.com/show_bug.cgi?id=785818#c5 Vasu Chandrasekhara <vasu.chandrasekhara@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEEDINFO |NEW InfoProvider|vasu.chandrasekhara@gmail.c | |om | --- Comment #5 from Vasu Chandrasekhara <vasu.chandrasekhara@gmail.com> 2012-11-21 15:25:32 UTC --- Hi Lee, understood. 1. Get Server A with IP a to iSCSI boot from the iSCSI Target LUN T. 2. Shut Server A down. 3. Unmask LUN T from Server A, Mask to Server B. 4. Start Server B with IP b to iSCSI boot from the iSCSI Target LUN T. In this test scenario the NICs must support iBFT and the IP & iSCSI configuration must be programmed into the nvram of the NIC. Best, Vasu -- 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.
https://bugzilla.novell.com/show_bug.cgi?id=785818 https://bugzilla.novell.com/show_bug.cgi?id=785818#c6 Lee Duncan <lduncan@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED --- Comment #6 from Lee Duncan <lduncan@suse.com> 2012-12-02 11:40:18 PST --- So you are talking about using a single iSCSI target, and using it first to run Server A, then, after shutdown, moving that target to Server B and using it there as the root disc. So everything but the root disc itself is changed out then, correct? -- 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.
https://bugzilla.novell.com/show_bug.cgi?id=785818 https://bugzilla.novell.com/show_bug.cgi?id=785818#c7 --- Comment #7 from Vasu Chandrasekhara <vasu.chandrasekhara@gmail.com> 2012-12-03 20:09:34 UTC --- Hi Lee, correct. Just to be more precise, Server B should not be in the same network realm as Server A (e.g. Server A has 10.10.10.10/24 and Server B has something like 10.20.10.17/24 and are not on the same wire). That ensures in the testcase, that any config parameter persisted in the initrd is detected. Best, Vasu -- 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.
https://bugzilla.novell.com/show_bug.cgi?id=785818 https://bugzilla.novell.com/show_bug.cgi?id=785818#c8 --- Comment #8 from Lee Duncan <lduncan@suse.com> 2012-12-05 11:39:06 PST --- Vasu: the fix you suggest is being done as part of another bug fix, for bnc#755642. In case you cannot see that bug, I will attach the suggested patch here. I believe this bug should be closed as a duplicate of 755642. -- 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.
https://bugzilla.novell.com/show_bug.cgi?id=785818 https://bugzilla.novell.com/show_bug.cgi?id=785818#c9 --- Comment #9 from Lee Duncan <lduncan@suse.com> 2012-12-05 11:42:12 PST --- Created an attachment (id=515863) --> (http://bugzilla.novell.com/attachment.cgi?id=515863) Modify initrd to handle iBFT/iSCSI more dynamically Please cd to /lib/mkinitrd and apply this patch, which changes two files in the "scripts" subdirectory. Then run "mkinitrd -v" (saving the output, in case there is a problem), then rebooting using the new initrd. This patch is from bug 755642 ... -- 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.
https://bugzilla.novell.com/show_bug.cgi?id=785818 https://bugzilla.novell.com/show_bug.cgi?id=785818#c10 --- Comment #10 from Lee Duncan <lduncan@suse.com> 2012-12-07 10:14:19 PST --- No objections to closing this as a duplicate, as mentioned in Comment#8? Going, going, ... -- 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.
https://bugzilla.novell.com/show_bug.cgi?id=785818 https://bugzilla.novell.com/show_bug.cgi?id=785818#c11 Vasu Chandrasekhara <vasu.chandrasekhara@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |RESOLVED Resolution| |WORKSFORME --- Comment #11 from Vasu Chandrasekhara <vasu.chandrasekhara@gmail.com> 2012-12-10 14:23:10 UTC --- This bug can be closed as duplicate. (I am not authorized to see the original bug report, but from the diff attachment I conclude that this is the same change that I am proposing, except that I also needed to set the "static_ips=$ip" variable) Thanks, Vasu P.S. I can also not set the status to resolved duplicate of 755642 -- 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.
participants (1)
-
bugzilla_noreply@novell.com