Bug 283791

Summary: Changed iscsiadm behaviour breaks iSCSI
Product: [Fedora] Fedora Reporter: Kostas Georgiou <k.georgiou>
Component: anacondaAssignee: Anaconda Maintenance Team <anaconda-maint-list>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: medium    
Version: rawhideCC: mchristi
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2007-09-11 17:34:15 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 235703    
Attachments:
Description Flags
Temporary solution to get the iSCSI nodes none

Description Kostas Georgiou 2007-09-09 01:56:31 UTC
In iscsi.py _getPortal() runs iscsiadm -m node -p "ippaddr" which
used to return:
10.0.0.1:3260,1 iqn.2005-03.foo:7576a2e6bb2f
The new format looks like:
node.name = iqn.2005-03.foo:7576a2e6bb2f
node.tpgt = 1
node.startup = automatic
....
node.discovery_address = 10.0.0.1
node.discovery_port = 3260
node.discovery_type = send_targets
....

As a quick fix I switched to running iscsiadm -m discovery -t st -p "ipaddr"
which fixes the problem since the format is the same. For a proper fix some
refactoring is probably a good idea since I don't see a reason why the output
from discovery() that is thrown away at the moment can not be used directly.

The patch (with some other fixes) does allow again an install on iSCSI root.

Comment 1 Kostas Georgiou 2007-09-09 01:56:31 UTC
Created attachment 190901 [details]
Temporary solution to get the iSCSI nodes

Comment 2 Jeremy Katz 2007-09-10 01:26:12 UTC
Mike -- what should we be using that's actually going to give consistent output
across versions of the iscsi tools?  We can't have this changing all the time :(

Comment 3 Mike Christie 2007-09-11 02:03:21 UTC
Sorry about that. iscsiadm should not have changed behavior for supported commands.

iscsiadm -m node -p ippaddr

was a bogus command. Passing only the ip addr in that command is a mistake and
does not mean anything in older iscsiadms. iscsiadm saw that and thought the
user passed in the ip addr by mistake, and so it dropped it and did "iscsiadm -m
node" where that prints out all the node/portal records.

If you wanted to print out all the node/portal records that have been found then
you should do:

iscsiadm -m node

If you wanted to print out the node/portal records that have been found from a
specific discovery ip, then when you do discovery it prints them out. So doing

iscsiadm -m discovery -t st -p ip

will print out the portals found from that ip (note that there was a bug in old
versions 2.0-7*, where all the portals that were ever found from any address
were printed instead of just the ones from that ip).

If you want to see all the portals found and how they match with their discovery
methods then run:

iscsiadm -m discovery  -P 1

(this last command with the "-P 1" argument is only available on newer iscsiadm
versions though).

You guys should use the commands documented in the README and iscsiadm man page.
Unless, there was a bug in the command and we cannot figure out what the
original iscsiadm authors meant to do, there should always be compat code for
those commands. The only exception is if a command is marked experimental or for
debug/developer purposes or unstable, then you should not rely on it from
release to release.

I will make it so iscsiadm does a proper failure on unsupported commands instead
of trying to guess about what the user wanted.

Comment 4 Jeremy Katz 2007-09-11 17:34:15 UTC
Kostas -- thanks for the patch.  And Mike, thanks for the clarification on the
supported commands; hopefully we're good in that respect now from a quick look.

Comment 5 Kostas Georgiou 2007-09-11 21:02:22 UTC
Actually from what I remember from the code anaconda will use what it collected
from the discover run lets say 10.0.0.1:3260,1 as an argument to -p which might
break in the future.

In any case with the fix in rawhide we are now a step closer to getting iSCSI
root  and support in the installer working again :) Although I am afraid that
there might not be enough time for the F8 release :(