public inbox for cluster-cvs@sourceware.org help / color / mirror / Atom feed
From: Lon Hohberger <lon@fedoraproject.org> To: cluster-cvs-relay@redhat.com Subject: cluster: RHEL48 - rgmanager: Fix monitor_link="0" starts Date: Fri, 03 Apr 2009 14:13:00 -0000 [thread overview] Message-ID: <20090403141228.985471201C8@lists.fedorahosted.org> (raw) Gitweb: http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=da9f72456bdda7833f8360de92807b0f66cb334a Commit: da9f72456bdda7833f8360de92807b0f66cb334a Parent: 21882a4d12306bf3e4f418a93aac65082c31951f Author: Lon Hohberger <lhh@redhat.com> AuthorDate: Tue Mar 31 14:57:15 2009 -0400 Committer: Lon Hohberger <lhh@redhat.com> CommitterDate: Fri Apr 3 10:12:03 2009 -0400 rgmanager: Fix monitor_link="0" starts If link monitoring is disabled, still allow starting of the IP resource. rhbz489369 Signed-off-by: Lon Hohberger <lhh@redhat.com> --- rgmanager/src/resources/ip.sh | 38 +++++++++++++++++++++----------------- 1 files changed, 21 insertions(+), 17 deletions(-) diff --git a/rgmanager/src/resources/ip.sh b/rgmanager/src/resources/ip.sh index 307449b..083738b 100755 --- a/rgmanager/src/resources/ip.sh +++ b/rgmanager/src/resources/ip.sh @@ -626,10 +626,16 @@ ipv6() if [ $? -ne 0 ]; then continue fi - network_link_up $dev - if [ $? -ne 0 ]; then - continue - fi + if [ "$OCF_RESKEY_monitor_link" = "yes" ]; then + network_link_up $dev + if [ $? -ne 0 ]; then + continue + fi + fi + + if [ "${addr/\/*/}" = "${addr}" ]; then + addr="$addr/$maskbits" + fi ocf_log info "Adding IPv6 address $addr to $dev" fi if [ "$1" = "del" ]; then @@ -691,9 +697,11 @@ ipv4() if [ $? -ne 0 ]; then continue fi - network_link_up $dev - if [ $? -ne 0 ]; then - continue + if [ "$OCF_RESKEY_monitor_link" = "yes" ]; then + network_link_up $dev + if [ $? -ne 0 ]; then + continue + fi fi if [ "${addr/\/*/}" = "${addr}" ]; then @@ -808,15 +816,9 @@ ip_op() { declare dev declare rtr - declare monitor_link declare addr=${3/\/*/} - monitor_link="yes" - if [ "${OCF_RESKEY_monitor_link}" = "no" ] || - [ "${OCF_RESKEY_monitor_link}" = "0" ]; then - monitor_link="no" - fi - + if [ "$2" = "status" ]; then ocf_log debug "Checking $3, Level $OCF_CHECK_LEVEL" @@ -828,7 +830,7 @@ ip_op() fi ocf_log debug "$3 present on $dev" - if [ "$monitor_link" = "yes" ]; then + if [ "$OCF_RESKEY_monitor_link" = "yes" ]; then if ! network_link_up $dev; then ocf_log warn "No link on $dev..." return 1 @@ -879,11 +881,13 @@ if [ -z "$OCF_CHECK_LEVEL" ]; then OCF_CHECK_LEVEL=0 fi -if [ -z "$OCF_RESKEY_monitor_link" ]; then +if [ "${OCF_RESKEY_monitor_link}" = "no" ] || + [ "${OCF_RESKEY_monitor_link}" = "0" ]; then + OCF_RESKEY_monitor_link="no" +else OCF_RESKEY_monitor_link="yes" fi - case $1 in start) if address_configured ${OCF_RESKEY_family} ${OCF_RESKEY_address}; then
reply other threads:[~2009-04-03 14:13 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20090403141228.985471201C8@lists.fedorahosted.org \ --to=lon@fedoraproject.org \ --cc=cluster-cvs-relay@redhat.com \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).