if-up.d/if-down.d scripts restart iSCSI inappropriately

Bug #669142 reported by Oliver Hookins
108
This bug affects 23 people
Affects Status Importance Assigned to Milestone
open-iscsi (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

Binary package hint: open-iscsi

When any interface that is not named "lo" is brought up or down, it will cause open-iscsi to restart. This is regardless of if the interface has anything to do with iSCSI traffic, which can cause problems for LUNs still in use.

The fragment of the script /etc/init.d/open-iscsi that causes this is near the top:

# Support for ifupdown script.
# Don't bother to restart when lo is configured.
if [ "$IFACE" = lo ]; then
        exit 0
fi

Restricting restarts purely for the loopback interface is not sufficient, although adequately determining if a restart is actually required may be somewhat tricky. Sadly I have no suggestions for a solution at the moment.

### System Information ###
Description: Ubuntu 10.04.1 LTS
Release: 10.04
open-iscsi 2.0.871-0ubuntu4

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

I would recommend even fully skipping these scripts.

We have various machines running with KVM and multiple network interfaces. For example, when we want to bring down a bridge, Open-iSCSI stops, which causes all our Virtual Machines to crash:

ifdown vlanbr103

That will cause Open-iSCSI to stop, while there is no iSCSI traffic over that interface (it's bridge!).

I'd like to see this scripts removed from Open-iSCSI since they do more harm then good.

Changed in open-iscsi (Ubuntu):
status: New → Confirmed
Revision history for this message
Razique Mahroua (razique) wrote :

I experienced the same issue.
I've modified the beginning of the script this way :

PATH=/sbin:/bin:/usr/sbin:/usr/bin
DAEMON=/sbin/iscsid
ADM=/sbin/iscsiadm
PIDFILE=/var/run/iscsid.pid
NAMEFILE=/etc/iscsi/initiatorname.iscsi
ISCSI_INTERFACE="br1:0"

[ -x "$DAEMON" ] || exit 0

# Support for ifupdown script.
# Don't bother to restart when lo is configured.
if [ "$IFACE" != "$ISCSI_INTERFACE" ]; then
        exit 0
fi

So now, appart from the explicitely interface specified, the open-iscsi daemon doesn't restart :)
Pay attention if you use some aliased interfaces though, you coud physically loose the connectivity.

Revision history for this message
Razique Mahroua (razique) wrote :

Actually, I've slighly updated it :

# Support for ifupdown script.
# Don't bother to restart when lo is configured.
if [ "$IFACE" != "$ISCSI_INTERFACE" ] && [ -n "$IFACE" ]; then
        echo "Not restarting ISCSI daemon... (check the value of ISCSI_INTERFACE)"
        exit 0
fi

Which means that I restart iscsi when the explicitely interface is set, but you are still able to restart the iscsi daemon while you invoke the script.

Revision history for this message
Sander Smeenk (ubuntu-freshdot) wrote :

Seeing the same in Maverick and Oneiric. Killed our VM-platform.

Revision history for this message
Nathan Bird (ecthellion) wrote :

Still present in 12.04. Glad I found it before putting very much on there.

Revision history for this message
Eli Heady (eli-heady) wrote :

Yes, still present in 12.04. This is a totally ridiculous mis-feature. I'm having a hard time coming up with real scenarios in which you'd want iscsid state to be changed when any single interface is brought down/up (that is, outside of system init or shutdown).

James Troup (elmo)
tags: added: canonistack
Revision history for this message
jmedina (jorgearma1982) wrote :

This affected me,

Today I was adding a new interface and when I ifdown it it stop iscsi service which caused multipath to fail, and then LVM and a few KVM guests, I think you should remove this script from if-down.d and if-up.d because it causes more damages than it helps.

It happend in ubuntu server 12.04.

Revision history for this message
SW (launchpad-mailinator) wrote :

I am not sure if my iscsi config is general for all ubuntus, but at least I replaced

if [ "$IFACE" = lo ]; then
        exit 0
fi

with

if iscsiadm -m iface --op=show | grep -q ",$(ip link show $IFACE 2>/dev/null | awk '$1=="link/ether" {print $2}')," ; then

Revision history for this message
Egor Andreev (a-egor) wrote :

It breaked my complex network initialisation at boot time (br+vlan+bond) until I removed the symlink /etc/network/if-up.d/open-iscsi
I use ubuntu 12.04.3

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers