Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 153528 Details for
Bug 237377
in ha cluster VIP can't be out of server's IP address range
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
Allows you to specify "ethernet_device" in cluster.conf
ip.sh-237377-1.patch (text/plain), 4.90 KB, created by
Lon Hohberger
on 2007-04-26 15:59:49 UTC
(
hide
)
Description:
Allows you to specify "ethernet_device" in cluster.conf
Filename:
MIME Type:
Creator:
Lon Hohberger
Created:
2007-04-26 15:59:49 UTC
Size:
4.90 KB
patch
obsolete
>Index: ip.sh >=================================================================== >RCS file: /cvs/cluster/cluster/rgmanager/src/resources/ip.sh,v >retrieving revision 1.21.2.1 >diff -u -r1.21.2.1 ip.sh >--- ip.sh 26 Jan 2007 20:45:25 -0000 1.21.2.1 >+++ ip.sh 26 Apr 2007 15:35:54 -0000 >@@ -86,6 +86,21 @@ > <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 >@@ -397,7 +412,7 @@ > { > declare idx dev ifaddr > declare ifaddr_exp >- >+ > while read idx dev ifaddr; do > > isSlave $dev >@@ -413,6 +428,11 @@ > > 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 > } > >@@ -579,6 +599,25 @@ > } > > >+# >+# 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 >@@ -590,12 +629,15 @@ > 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 > } > >@@ -614,19 +656,30 @@ > continue > fi > >+ if [ -n "$OCF_RESKEY_ethernet_device" ] && \ >+ [ "$dev" != "$OCF_RESKEY_ethernet_device" ]; then >+ continue >+ fi >+ > if [ "$1" = "add" ]; then >- ipv6_same_subnet $ifaddr_exp/$maskbits $addr_exp >- if [ $? -ne 0 ]; then >- continue >- fi >+ if [ -z "$OCF_RESKEY_ethernet_device" ]; then >+ ipv6_same_subnet $ifaddr/$maskbits $addr >+ if [ $? -ne 0 ]; then >+ continue >+ fi >+ fi >+ > interface_up $dev > if [ $? -ne 0 ]; then > continue > fi >- network_link_up $dev >- if [ $? -ne 0 ]; then >- continue >- fi >+ >+ if [ "$monitor_link" = "yes" ]; then >+ network_link_up $dev >+ if [ $? -ne 0 ]; then >+ continue >+ fi >+ fi > ocf_log info "Adding IPv6 address $addr to $dev" > fi > if [ "$1" = "del" ]; then >@@ -672,30 +725,51 @@ > 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 [ "$1" = "add" ]; then >- ipv4_same_subnet $ifaddr/$maskbits $addr >- if [ $? -ne 0 ]; then >- continue >+ 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 > fi >+ > interface_up $dev > if [ $? -ne 0 ]; then >- continue >+ 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 > fi >- network_link_up $dev >- if [ $? -ne 0 ]; then >- continue >+ >+ if [ "$monitor_link" = "yes" ]; then >+ network_link_up $dev >+ if [ $? -ne 0 ]; then >+ continue >+ fi > fi > ocf_log info "Adding IPv4 address $addr to $dev" > fi >- if [ "$1" = "del" ]; then >+ >+ if [ "$op" = "del" ]; then > if [ "${addr/\/*/}" != "$ifaddr" ]; then >+ echo "${addr/\/*/} != $ifaddr" > continue > fi > ocf_log info "Removing IPv4 address $addr from $dev" >@@ -841,11 +915,11 @@ > > case $1 in > inet) >- ipv4 $2 $3 >+ ipv4 $2 $3 $monitor_link > return $? > ;; > inet6) >- ipv6 $2 $3 >+ ipv6 $2 $3 $monitor_link > return $? > ;; > esac >@@ -867,6 +941,11 @@ > ;; > 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
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 237377
:
153527
| 153528