Resolves: #634021
This commit is contained in:
parent
41e86a17f5
commit
600a051a70
@ -3,7 +3,7 @@
|
||||
Summary: iSCSI daemon and utility programs
|
||||
Name: iscsi-initiator-utils
|
||||
Version: 6.2.0.872
|
||||
Release: 16%{?dist}
|
||||
Release: 17%{?dist}
|
||||
Source0: http://people.redhat.com/mchristi/iscsi/rhel6.0/source/open-iscsi-2.0-872-rc4-bnx2i.tar.gz
|
||||
Source1: iscsid.init
|
||||
Source2: iscsidevs.init
|
||||
@ -209,6 +209,10 @@ fi
|
||||
%{_includedir}/libiscsi.h
|
||||
|
||||
%changelog
|
||||
* Sat Feb 19 2011 Mike Christie <mcrhsit@redhat.com> 6.2.0.872.17
|
||||
- 634021 Fix in .14 added regression during iscsi startup that prevented
|
||||
sessions from getting created.
|
||||
|
||||
* Wed Feb 9 2011 Ales Kozumplik <akozumpl@redhat.com> 6.2.0.872.16
|
||||
- 529443 fwparam_sysfs: fix pathname manipulation error in
|
||||
fwparam_sysfs_boot_info.
|
||||
|
10
iscsid.init
10
iscsid.init
@ -34,7 +34,7 @@ root_is_iscsi() {
|
||||
[[ "$rootopts" =~ "_netdev" ]]
|
||||
}
|
||||
|
||||
force_start() {
|
||||
start_iscsid() {
|
||||
echo -n $"Starting $prog: "
|
||||
modprobe -q iscsi_tcp
|
||||
modprobe -q ib_iser
|
||||
@ -47,6 +47,10 @@ force_start() {
|
||||
retval=$?
|
||||
echo
|
||||
touch $lockfile
|
||||
}
|
||||
|
||||
force_start() {
|
||||
start_iscsid
|
||||
# a force start could imply the iscsi service is started due to how it
|
||||
# lazy starts. We need to touch the lock file so it is shutdown later
|
||||
touch $iscsi_lockfile
|
||||
@ -74,7 +78,7 @@ start() {
|
||||
# or if iscsid is managing the sessions.
|
||||
grep -qrs "node.startup = automatic" /var/lib/iscsi/nodes
|
||||
if [ $? -eq 0 ] || root_is_iscsi || use_discoveryd ; then
|
||||
force_start
|
||||
start_iscsid
|
||||
return $?
|
||||
fi
|
||||
|
||||
@ -131,7 +135,7 @@ restart() {
|
||||
stop
|
||||
# if iscsid was running then make sure it starts up
|
||||
if [ "$use_force_start" -eq 0 ] ; then
|
||||
force_start
|
||||
start_iscsid
|
||||
else
|
||||
start
|
||||
fi
|
||||
|
@ -58,6 +58,22 @@ start() {
|
||||
return 0
|
||||
}
|
||||
|
||||
iscsi_sessions_running() {
|
||||
declare -a iparams=( $(iscsiadm -m session 2>/dev/null | egrep "tcp|iser|bnx2i|be2iscsi|cxgb3i|cxgb4i") )
|
||||
if [[ -z "${iparams[*]}" ]]; then
|
||||
# no sessions
|
||||
return 2
|
||||
fi
|
||||
|
||||
return 0
|
||||
}
|
||||
|
||||
cleanup_successful_stop() {
|
||||
success $"Stopping $prog"
|
||||
rm -f $lockfile
|
||||
echo
|
||||
}
|
||||
|
||||
stop() {
|
||||
# Don't turn off iscsi if root is possibly on a iscsi disk.
|
||||
rootopts=$(awk '{ if ($1 !~ /^[ \t]*#/ && $2 == "/") { print $4; }}' /etc/mtab)
|
||||
@ -74,6 +90,11 @@ stop() {
|
||||
|
||||
echo -n $"Stopping $prog: "
|
||||
|
||||
if ! iscsi_sessions_running ; then
|
||||
cleanup_successful_stop
|
||||
return 0
|
||||
fi
|
||||
|
||||
if [ "$RUNLEVEL" = "6" -o "$RUNLEVEL" = "0" -o "$RUNLEVEL" = "1" ]; then
|
||||
$exec -m node --logoutall=all 2>&1 > /dev/null
|
||||
else
|
||||
@ -88,9 +109,7 @@ stop() {
|
||||
return 1
|
||||
fi
|
||||
|
||||
success $"Stopping $prog"
|
||||
rm -f $lockfile
|
||||
echo
|
||||
cleanup_successful_stop
|
||||
return 0
|
||||
}
|
||||
|
||||
@ -107,16 +126,6 @@ force_reload() {
|
||||
restart
|
||||
}
|
||||
|
||||
iscsi_sessions_running() {
|
||||
declare -a iparams=( $(iscsiadm -m session 2>/dev/null | egrep "tcp|iser|bnx2i|be2iscsi|cxgb3i|cxgb4i") )
|
||||
if [[ -z "${iparams[*]}" ]]; then
|
||||
# no sessions
|
||||
return 2
|
||||
fi
|
||||
|
||||
return 0
|
||||
}
|
||||
|
||||
rh_status() {
|
||||
[ -f $lockfile ] || { echo $"$prog is stopped" ; return 3 ; }
|
||||
|
||||
@ -142,7 +151,6 @@ case "$1" in
|
||||
$1
|
||||
;;
|
||||
stop)
|
||||
iscsi_sessions_running || exit 0
|
||||
$1
|
||||
;;
|
||||
restart)
|
||||
|
Loading…
Reference in New Issue
Block a user