Trouble automating login: iface iter could not stat...

319 weergaven
Naar het eerste ongelezen bericht

Michael

ongelezen,
20 jun 2008, 11:42:2520-06-2008
aan open-iscsi
I'm trying to implement the automatic login, by doing:
iscsiadm -m node -T <targetname> --op update -n node.startup -v
automatic

When I run this after inserting the proper target name, it seems to
work fine. But when I do: service open-iscsi restart, I get:

Setting up iSCSI targets: iscsiadm: iface iter could not stat /etc/
iscsi/nodes/<target name>/10.3.2.7,3260 (I didn't feel like typing the
whole target name).
iscsiadm: Could not log into all portals. Err 19.

Why can't I log in automatically? When I attempt to log in manually
right after this it works fine:
iscsiadm -m node -T <targetname> -p 10.3.2.7:3260 -l

Anyone know what's going on?

Konrad Rzeszutek

ongelezen,
20 jun 2008, 12:28:5120-06-2008
aan open-...@googlegroups.com
On Fri, Jun 20, 2008 at 08:42:25AM -0700, Michael wrote:
>
> I'm trying to implement the automatic login, by doing:
> iscsiadm -m node -T <targetname> --op update -n node.startup -v
> automatic
>
> When I run this after inserting the proper target name, it seems to
> work fine. But when I do: service open-iscsi restart, I get:
>
> Setting up iSCSI targets: iscsiadm: iface iter could not stat /etc/
> iscsi/nodes/<target name>/10.3.2.7,3260 (I didn't feel like typing the
> whole target name).

You are root when you do this, right?

And the /etc/iscsi/nodes/<..>/../ does have a default file?

vaibhav pol

ongelezen,
21 jun 2008, 03:56:0121-06-2008
aan open-...@googlegroups.com
hey i have the same problem i edit the init script
iscsiadm -m node --loginall=automatic is not working for me

when id
mdadm -m node -l
it login on all node
i put this line into init script it's working fine if in any other way can be done. please let me know
thanks
vaibhi

Michael

ongelezen,
23 jun 2008, 10:18:0923-06-2008
aan open-iscsi
Yes to both questions, Konrad.
> > Anyone know what's going on?- Hide quoted text -
>
> - Show quoted text -

Mike Christie

ongelezen,
23 jun 2008, 11:36:5423-06-2008
aan open-...@googlegroups.com


What version of open-iscsi are you using? Did it come from
open-iscsi.org or a distro? If it is a distro could you send the
open-iscsi script from /etc/init.d/open-iscsi?

I just tried it real quick with open-iscsi-2.0-869.2 and it worked ok here.

Also after you run the command to set automatic startup could you run:

iscsiadm -m node -L automatic -d 8

and send all the output (the init script should just be doing that
command, so this will dump out a lot of debugging info)?

Michael

ongelezen,
23 jun 2008, 15:04:5723-06-2008
aan open-iscsi
Ok, I ran the command I previously noted to set automatic startup,
then ran the command you suggested, with this output:

[root@wkstn5 ~]# iscsiadm -m node -L automatic -d 8
iscsiadm: Max file limits 1024 1024

iscsiadm: searching <target name>

iscsiadm: found 10.3.2.7,3260,-1

iscsiadm: iface iter could not stat /etc/iscsi/nodes/<target name>/
10.3.2.7,3260.
iscsiadm: Could not log into all portals. Err 19.

I'm on another computer typing all this manually, so I didn't actually
write the target name here.
> command, so this will dump out a lot of debugging info)?- Hide quoted text -

Michael

ongelezen,
23 jun 2008, 15:51:0223-06-2008
aan open-iscsi
Also, it works perfectly fine if I go into /etc/iscsi/nodes/<target
name>/10.3.2.1,3260 and edit the node.startup line myself. Am I just
typing the command wrong without realizing it? Again, I'm doing:

iscsiadm -m node -T <targetname> --op update -n node.startup -v
automatic

> > - Show quoted text -- Hide quoted text -

Mike Christie

ongelezen,
23 jun 2008, 16:17:5023-06-2008
aan open-...@googlegroups.com
Michael wrote:
> Also, it works perfectly fine if I go into /etc/iscsi/nodes/<target
> name>/10.3.2.1,3260 and edit the node.startup line myself. Am I just
> typing the command wrong without realizing it? Again, I'm doing:
>

What version of the tools are you using and did you upgrade or switch
tool versions?

And did you make this node by hand/manually by doing
iscsiadm -m node -T target -p ip:port --op new
?


The wierd part is that we see this in the log out put you snipped:

iscsiadm: found 10.3.2.7,3260,-1

Here the tpgt is -1 which means it did not get set. Normally targets are
going to send us this so if we did sendtargets we should have that info.

If you do the old style build by hand with no tpgt like this to create
the record:

iscsiadm -m node -T target -p ip:port --op new

then the db uses the old format (so
/etc/iscsi/nodes/<targetname>/10.3.2.1,3260 would be a file)

To use the new format you have to pass in the tpgt

iscsiadm -m node -T target -p ip:port,tpgt --op new

(here there is no /etc/iscsi/nodes/<targetname>/10.3.2.1,3260 file and
we have /etc/iscsi/nodes/<targetname>/10.3.2.1,3260,tpgt as a dir).


> iscsiadm -m node -T <targetname> --op update -n node.startup -v
> automatic
>

This is the right command for the new DB format where the tpgt is known
(not -1).

For the old format you had to pass in the target and portal:

iscsiadm -m node -T target -p ip:port --op update -n node.startup -v
automatic

So if you are creating the records manually but do not know the tpgt you
can pass in anything greater than -1 when you create the record, and we
will figure it out dynamically (later to manage the node you would not
pass in anything for the tpgt and we will figure it out or pass in
whatever you passed in when you created it).

iscsiadm -m node -T target -p ip:port,tpgt --op new

Mike Christie

ongelezen,
25 jun 2008, 10:26:0025-06-2008
aan open-...@googlegroups.com
Mike Christie wrote:
> Michael wrote:
>> Also, it works perfectly fine if I go into /etc/iscsi/nodes/<target
>> name>/10.3.2.1,3260 and edit the node.startup line myself. Am I just
>> typing the command wrong without realizing it? Again, I'm doing:
>>
>
> What version of the tools are you using and did you upgrade or switch
> tool versions?
>
> And did you make this node by hand/manually by doing
> iscsiadm -m node -T target -p ip:port --op new
> ?
>
>
> The wierd part is that we see this in the log out put you snipped:
>
> iscsiadm: found 10.3.2.7,3260,-1
>
> Here the tpgt is -1 which means it did not get set. Normally targets are
> going to send us this so if we did sendtargets we should have that info.
>
> If you do the old style build by hand with no tpgt like this to create
> the record:
>
> iscsiadm -m node -T target -p ip:port --op new
>
> then the db uses the old format (so
> /etc/iscsi/nodes/<targetname>/10.3.2.1,3260 would be a file)
>
> To use the new format you have to pass in the tpgt
>
> iscsiadm -m node -T target -p ip:port,tpgt --op new
>
> (here there is no /etc/iscsi/nodes/<targetname>/10.3.2.1,3260 file and
> we have /etc/iscsi/nodes/<targetname>/10.3.2.1,3260,tpgt as a dir).
>

Attached is a patch to support the old behavior with new tools. I
thought I added this before, but it looks like for some reason I did not
handle all the cases.

The patch applies to git head or the 869.2.

fix-tgpt-compat.patch
Allen beantwoorden
Auteur beantwoorden
Doorsturen
0 nieuwe berichten