Bug 283791 - Changed iscsiadm behaviour breaks iSCSI
Summary: Changed iscsiadm behaviour breaks iSCSI
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: anaconda
Version: rawhide
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Anaconda Maintenance Team
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: F8Blocker
TreeView+ depends on / blocked
 
Reported: 2007-09-09 01:56 UTC by Kostas Georgiou
Modified: 2007-11-30 22:12 UTC (History)
1 user (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2007-09-11 17:34:15 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
Temporary solution to get the iSCSI nodes (600 bytes, patch)
2007-09-09 01:56 UTC, Kostas Georgiou
no flags Details | Diff

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 :( 


Note You need to log in before you can comment on or make changes to this bug.