iscsid is looking for targets prior to network being available

Bug #345957 reported by Ryan Parrish
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
open-iscsi (Ubuntu)
Expired
Undecided
Unassigned

Bug Description

Binary package hint: open-iscsi

Description: Ubuntu jaunty (development branch)
Release: 9.04
open-iscsi:
  Installed: 2.0.870.1-0ubuntu2
  Candidate: 2.0.870.1-0ubuntu2
  Version table:
 *** 2.0.870.1-0ubuntu2 0
        500 http://us.archive.ubuntu.com jaunty/main Packages
        100 /var/lib/dpkg/status

I am trying to get a iscsi target to mount at boot time by setting node.startup = automatic and adding the _netdev option to fstab. However, it appears that the open-scsi initd script is trying to find devices prior to network being available (line 90 in /etc/init.d/open-iscsi).

I have attached a screen shot of the system startup.

Revision history for this message
Ryan Parrish (ryanparrish) wrote :
Revision history for this message
Ryan Parrish (ryanparrish) wrote :

I should add that I tried changing /etc/rcS.d/S25open-iscsi to S41open-scsi (just after networking) and while I didn't get the [failed] message the target still didn't automatically mount.

Revision history for this message
Wido den Hollander (wido) wrote :

I can confirm the same for Hardy, this works for me:

mv /etc/rcS.d/S25open-iscsi /etc/rcS.d/S50open-iscsi

Revision history for this message
Mathias Gug (mathiaz) wrote :

@Ryan:

Are you able to login and mount the target manually?

The way iscsi is handled has changed in jaunty. They're considered as normal block device, thus _netdev is not honored by the boot process.

Changed in open-iscsi:
status: New → Incomplete
Revision history for this message
Ryan Parrish (ryanparrish) wrote :

Yes, I can mount the target right away once I login.

Revision history for this message
Ryan Parrish (ryanparrish) wrote :

Setting it to S50open-iscsi didn't solve the issue for me.

Revision history for this message
schoubi (schoubi) wrote :

Hi,

I can confirm the same issue in ubuntu-server intrepid

mv /etc/rcS.d/S25open-iscsi /etc/rcS.d/S50open-iscsi do the trick

Revision history for this message
theterran (daniel-mann) wrote :

As of 2009.06.15 the issue remains in intrepid (2.6.28-11-server). Moving S25open-iscsi to S50open-iscsi does not resolve the issue.

As a temporary workaround, I have added the following to /etc/rc.local so that iSCSI volumes/devices configured with the _netdev option in /etc/fstab are mounted after boot:

mount -a -O _netdev

Granted, the _netdev option is not currently effective during normal boot, but this does allow the (re-)mounting of only those devices.

I have also found it helpful at this point to change the restart and shutdown order so that iSCSI targets are logged off prior to stopping networking, as follows:

$ sudo mv /etc/rc0.d/S41open-iscsi /etc/rc0.d/S32open-iscsi
$ sudo mv /etc/rc6.d/S41open-iscsi /etc/rc6.d/S32open-iscsi

Revision history for this message
theterran (daniel-mann) wrote :

Ah, that should be "issue remains in jaunty". I'm using 9.04; better with numbers...

open-iscsi version 2.0-870

Revision history for this message
Peter Matulis (petermatulis) wrote :

What other information is required to make this bug complete? Currently in Jaunty you cannot mount iscsi volumes at boot time without stuffing a mount command in /etc/rc.local.

Revision history for this message
Dustin Kirkland  (kirkland) wrote :

Peter-

I doubt we'll be able to fix this for Jaunty.

Can you confirm the bug on Karmic and Lucid?

:-Dustin

Revision history for this message
Peter Matulis (petermatulis) wrote :

Dustin,

I can confirm that an iscsi volume can be mounted automatically at boot time for a Karmic client/initiator.

Now a reboot hangs terribly when such a volume is mounted. I've attached a screenshot. It appears to confirm the comment above (theterran wrote on 2009-06-15) where we need to screw around with the shutdown scripts. However, I quickly tried that workaround to no effect.

Revision history for this message
Peter Matulis (petermatulis) wrote :
Revision history for this message
Peter Matulis (petermatulis) wrote :

I want to specify that an iscsi volume can be attached on bootup and shutdown with no problem.

Such a volume can also be mounted on bootup.

All this without any adjustments whatsoever (ex: changing the startup links).

However, upon shutdown or reboot, if the volume happens to be mounted then, and only then, do I get the problem stated above. The tested mounted filesystem was ext4 if that matters.

Evidently, iscsi targets are disconnected before the umount calls are made. I verified this by first manually unmounting the filesystem prior to a successful reboot.

All this testing done with 9.10 on server and client.

Revision history for this message
Peter Matulis (petermatulis) wrote :

So for fun I rejigged the startup commands and it made my local setup work. I doubt this is the proper way to go however.

lrwxrwxrwx 1 root root 18 2009-12-17 19:25 S33umountfs -> ../init.d/umountfs
lrwxrwxrwx 1 root root 20 2009-12-17 19:29 S34open-iscsi -> ../init.d/open-iscsi
lrwxrwxrwx 1 root root 20 2009-12-17 19:25 S35networking -> ../init.d/networking

Revision history for this message
theterran (daniel-mann) wrote : Re: [Bug 345957] Re: iscsid is looking for targets prior to network being available

Hi Peter,

I've forgotten my login for the bug tracking system on launchpad, but wanted
to respond to you as I've been thinking and testing along similar lines...

Only hours ago, I thought of trying the same thing on 9.04 that you just
tried on 9.10. At the moment I'm stuck on 9.04 since that is the supported
version for ColdFusion 9. We use iSCSI volumes for webfiles, and need for
apache to be able to see the volumes automatically at boot time. Also, I
would like to see iSCSI volumes unmounted and logged off cleanly at
shutdown. That's why I considered these earlier: the proper shutdown
sequence should be umount -> open-iscsi stop -> networking stop.

For startup, I achieved the goal without changing any of the rc script
orders by simply adding the following to rc.local:

    mount -a -O _netdev
    /etc/init.d/apache2 reload

This since the iSCSI targets are eventually mounted during the boot process,
even though they fail when attempting to mount before networking. Not sure
why they succeed later, but the behavior is consistent. Mounting volumes
that have the _netdev option works from rc.local, then apache can see the
filesystems and reloads successfully.

Not sure about shutdown, but I'll play with that more after the holidays on
my dev server...

Sorry that I couldn't put this in the official thread, but wanted you to
have my feedback as I'm following your updates.

Regards,

Daniel Mann
Terran Enterprises
<email address hidden>
850.807.4900

On Wed, Dec 23, 2009 at 13:39, Peter Matulis <email address hidden>wrote:

> So for fun I rejigged the startup commands and it made my local setup
> work. I doubt this is the proper way to go however.
>
> lrwxrwxrwx 1 root root 18 2009-12-17 19:25 S33umountfs ->
> ../init.d/umountfs
> lrwxrwxrwx 1 root root 20 2009-12-17 19:29 S34open-iscsi ->
> ../init.d/open-iscsi
> lrwxrwxrwx 1 root root 20 2009-12-17 19:25 S35networking ->
> ../init.d/networking
>
> --
> iscsid is looking for targets prior to network being available
> https://bugs.launchpad.net/bugs/345957
> You received this bug notification because you are a direct subscriber
> of the bug.
>
> Status in “open-iscsi” package in Ubuntu: Incomplete
>
> Bug description:
> Binary package hint: open-iscsi
>
> Description: Ubuntu jaunty (development branch)
> Release: 9.04
> open-iscsi:
> Installed: 2.0.870.1-0ubuntu2
> Candidate: 2.0.870.1-0ubuntu2
> Version table:
> *** 2.0.870.1-0ubuntu2 0
> 500 http://us.archive.ubuntu.com jaunty/main Packages
> 100 /var/lib/dpkg/status
>
> I am trying to get a iscsi target to mount at boot time by setting
> node.startup = automatic and adding the _netdev option to fstab. However, it
> appears that the open-scsi initd script is trying to find devices prior to
> network being available (line 90 in /etc/init.d/open-iscsi).
>
> I have attached a screen shot of the system startup.
>
> To unsubscribe from this bug, go to:
> https://bugs.launchpad.net/ubuntu/+source/open-iscsi/+bug/345957/+subscribe
>

Revision history for this message
Peter Matulis (petermatulis) wrote :

Just wanted to make obvious that my rc links given above are for rc0.d and rc6.d .

Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for open-iscsi (Ubuntu) because there has been no activity for 60 days.]

Changed in open-iscsi (Ubuntu):
status: Incomplete → Expired
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.