* [Cluster-devel] cluster/rgmanager/src/resources ip.sh service.sh
@ 2007-05-02 18:28 lhh
0 siblings, 0 replies; only message in thread
From: lhh @ 2007-05-02 18:28 UTC (permalink / raw)
To: cluster-devel.redhat.com
CVSROOT: /cvs/cluster
Module name: cluster
Branch: RHEL5
Changes by: lhh at sourceware.org 2007-05-02 18:28:52
Modified files:
rgmanager/src/resources: ip.sh service.sh
Log message:
Undo incorrectly committed changes to ip.sh and service.sh
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/rgmanager/src/resources/ip.sh.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=1.21.2.2&r2=1.21.2.3
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/rgmanager/src/resources/service.sh.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=1.7.2.3&r2=1.7.2.4
--- cluster/rgmanager/src/resources/ip.sh 2007/05/02 18:26:26 1.21.2.2
+++ cluster/rgmanager/src/resources/ip.sh 2007/05/02 18:28:52 1.21.2.3
@@ -86,21 +86,6 @@
<content type="string"/>
</parameter>
- <parameter name="ethernet_device">
- <longdesc lang="en">
- If set, forces the use of the specified ethernet
- device for IP address assignment. Usually,
- an interface is picked which has an IP in the
- same subnet as the specified IP address.
- </longdesc>
-
- <shortdesc lang="en">
- Ethernet device
- </shortdesc>
-
- <content type="string"/>
- </parameter>
-
<parameter name="monitor_link">
<longdesc lang="en">
Enabling this causes the status check to fail if
@@ -412,7 +397,7 @@
{
declare idx dev ifaddr
declare ifaddr_exp
-
+
while read idx dev ifaddr; do
isSlave $dev
@@ -428,11 +413,6 @@
done < <(/sbin/ip -o -f inet6 addr | awk '{print $1,$2,$4}')
- if [ -n "$OCF_RESKEY_ethernet_device" ]; then
- ip_list_interfaces
- return $?
- fi
-
return 0
}
@@ -599,25 +579,6 @@
}
-#
-# When a user wants to use a specific device, just list all
-# devices to make sure the device exists on the system
-#
-ip_list_interfaces()
-{
- while read idx dev; do
- dev=${dev/:/}
-
- isSlave $dev
- if [ $? -ne 2 ]; then
- continue
- fi
-
- echo $dev none none
- done < <(/sbin/ip -o -f link addr | awk '{print $1,$2}')
-}
-
-
ipv4_list_interfaces()
{
declare idx dev ifaddr
@@ -629,15 +590,12 @@
continue
fi
+ idx=${idx/:/}
+
echo $dev ${ifaddr/\/*/} ${ifaddr/*\//}
done < <(/sbin/ip -o -f inet addr | awk '{print $1,$2,$4}')
-
- if [ -n "$OCF_RESKEY_ethernet_device" ]; then
- ip_list_interfaces
- return $?
- fi
-
+
return 0
}
@@ -656,30 +614,19 @@
continue
fi
- if [ -n "$OCF_RESKEY_ethernet_device" ] && \
- [ "$dev" != "$OCF_RESKEY_ethernet_device" ]; then
- continue
- fi
-
if [ "$1" = "add" ]; then
- if [ -z "$OCF_RESKEY_ethernet_device" ]; then
- ipv6_same_subnet $ifaddr/$maskbits $addr
- if [ $? -ne 0 ]; then
- continue
- fi
- fi
-
+ ipv6_same_subnet $ifaddr_exp/$maskbits $addr_exp
+ if [ $? -ne 0 ]; then
+ continue
+ fi
interface_up $dev
if [ $? -ne 0 ]; then
continue
fi
-
- if [ "$monitor_link" = "yes" ]; then
- network_link_up $dev
- if [ $? -ne 0 ]; then
- continue
- fi
- fi
+ network_link_up $dev
+ if [ $? -ne 0 ]; then
+ continue
+ fi
ocf_log info "Adding IPv6 address $addr to $dev"
fi
if [ "$1" = "del" ]; then
@@ -725,51 +672,30 @@
ipv4()
{
declare dev ifaddr maskbits
- declare op=$1
declare addr=$2
- declare monitor_link=$3
while read dev ifaddr maskbits; do
if [ -z "$dev" ]; then
continue
fi
- if [ -n "$OCF_RESKEY_ethernet_device" ] && \
- [ "$dev" != "$OCF_RESKEY_ethernet_device" ]; then
- continue
- fi
-
- if [ "$op" = "add" ]; then
- if [ -z "$OCF_RESKEY_ethernet_device" ]; then
- ipv4_same_subnet $ifaddr/$maskbits $addr
- if [ $? -ne 0 ]; then
- continue
- fi
+ if [ "$1" = "add" ]; then
+ ipv4_same_subnet $ifaddr/$maskbits $addr
+ if [ $? -ne 0 ]; then
+ continue
fi
-
interface_up $dev
if [ $? -ne 0 ]; then
- ocf_log warn "Enabling $dev"
- /sbin/ip link $dev up
- interface_up $dev
- if [ $? -ne 0 ]; then
- ocf_log warn "Failed to enable $dev"
- continue
- fi
+ continue
fi
-
- if [ "$monitor_link" = "yes" ]; then
- network_link_up $dev
- if [ $? -ne 0 ]; then
- continue
- fi
+ network_link_up $dev
+ if [ $? -ne 0 ]; then
+ continue
fi
ocf_log info "Adding IPv4 address $addr to $dev"
fi
-
- if [ "$op" = "del" ]; then
+ if [ "$1" = "del" ]; then
if [ "${addr/\/*/}" != "$ifaddr" ]; then
- echo "${addr/\/*/} != $ifaddr"
continue
fi
ocf_log info "Removing IPv4 address $addr from $dev"
@@ -915,11 +841,11 @@
case $1 in
inet)
- ipv4 $2 $3 $monitor_link
+ ipv4 $2 $3
return $?
;;
inet6)
- ipv6 $2 $3 $monitor_link
+ ipv6 $2 $3
return $?
;;
esac
@@ -941,11 +867,6 @@
;;
esac
-if [ -n "$OCF_RESKEY_ethernet_device" ]; then
- ocf_log debug "Forcing use of $OCF_RESKEY_ethernet_device"
-else
- ocf_log debug "Using default autoplacement of IP addresses"
-fi
if [ -z "$OCF_CHECK_LEVEL" ]; then
OCF_CHECK_LEVEL=0
--- cluster/rgmanager/src/resources/service.sh 2007/05/02 18:26:26 1.7.2.3
+++ cluster/rgmanager/src/resources/service.sh 2007/05/02 18:28:52 1.7.2.4
@@ -172,16 +172,17 @@
<special tag="rgmanager">
<attributes root="1" maxinstances="1"/>
- <child type="fs" start="1" stop="8"/>
- <child type="clusterfs" start="2" stop="7"/>
- <child type="netfs" start="3" stop="6"/>
- <child type="nfsexport" start="4" stop="5"/>
+ <child type="lvm" start="1" stop="9"/>
+ <child type="fs" start="2" stop="8"/>
+ <child type="clusterfs" start="3" stop="7"/>
+ <child type="netfs" start="4" stop="6"/>
+ <child type="nfsexport" start="5" stop="5"/>
- <child type="nfsclient" start="5" stop=""/>
+ <child type="nfsclient" start="6" stop="4"/>
- <child type="ip" start="6" stop="2"/>
- <child type="smb" start="7" stop="3"/>
- <child type="script" start="7" stop="1"/>
+ <child type="ip" start="7" stop="2"/>
+ <child type="smb" start="8" stop="3"/>
+ <child type="script" start="9" stop="1"/>
</special>
</resource-agent>
EOT
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2007-05-02 18:28 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-05-02 18:28 [Cluster-devel] cluster/rgmanager/src/resources ip.sh service.sh lhh
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.