Red Hat Bugzilla – Bug 283791
Changed iscsiadm behaviour breaks iSCSI
Last modified: 2007-11-30 17:12:15 EST
In iscsi.py _getPortal() runs iscsiadm -m node -p "ippaddr" which
used to return:
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.
Created attachment 190901 [details]
Temporary solution to get the iSCSI nodes
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 :(
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
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.
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.
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 :(