Gitweb: http://git.fedorahosted.org/git/?p=cluster.git;a=commitdiff;h=bb3cf23ad9214…
Commit: bb3cf23ad9214086ec497f2368649501d8546c9e
Parent: 0efa69dbc533017d02dea73646841c97fca91525
Author: Marek 'marx' Grac <mgrac(a)redhat.com>
AuthorDate: Wed Sep 25 10:58:11 2013 +0200
Committer: Marek 'marx' Grac <mgrac(a)redhat.com>
CommitterDate: Wed Sep 25 10:58:11 2013 +0200
fence_cisco_ucs: fence agent does not respect "delay" attribute
Resolves: rhbz#994228
Based on commit 2424d8c71413d6ba4ace2c002ee80c1f4517b4c8 in fence-agents.git
---
fence/agents/cisco_ucs/fence_cisco_ucs.py | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/fence/agents/cisco_ucs/fence_cisco_ucs.py b/fence/agents/cisco_ucs/fence_cisco_ucs.py
index beecd3a..499a79a 100755
--- a/fence/agents/cisco_ucs/fence_cisco_ucs.py
+++ b/fence/agents/cisco_ucs/fence_cisco_ucs.py
@@ -116,6 +116,11 @@ used with Cisco UCS to fence machines."
docs["vendorurl"] = "http://www.cisco.com"
show_docs(options, docs)
+ ## Do the delay of the fence device before logging in
+ ## Delay is important for two-node clusters fencing but we do not need to delay 'status' operations
+ if options["-o"] in ["off", "reboot"]:
+ time.sleep(int(options["-f"]))
+
### Login
res = send_command(options, "<aaaLogin inName=\"" + options["-l"] + "\" inPassword=\"" + options["-p"] + "\" />")
result = re_cookie.search(res)
Gitweb: http://git.fedorahosted.org/git/?p=cluster.git;a=commitdiff;h=d0c5a3be2b15e…
Commit: d0c5a3be2b15eedfc4c964d91f71a5d51c238fb2
Parent: 7c1eff97fde6b899904a97e366380a470c3f50a3
Author: Ryan McCabe <rmccabe(a)redhat.com>
AuthorDate: Tue Sep 17 22:22:13 2013 -0400
Committer: Ryan McCabe <rmccabe(a)redhat.com>
CommitterDate: Wed Sep 18 09:58:35 2013 -0400
fs.sh: Avoid failures caused by /tmp being full
This patch prevents fs.sh resource agent failures when /tmp is full
by eliminating the need to write a temporary file to /tmp while
parsing /proc/mounts.
This same fix has been made upstream and in RHEL6 in the filesystem
resource agent for the codepath that is hit when 'findmnt' is
either not available or not used.
Resolves: rhbz#1009245
Signed-off-by: Ryan McCabe <rmccabe(a)redhat.com>
---
rgmanager/src/resources/fs.sh | 10 ++--------
1 files changed, 2 insertions(+), 8 deletions(-)
diff --git a/rgmanager/src/resources/fs.sh b/rgmanager/src/resources/fs.sh
index e55e77f..5dc7000 100755
--- a/rgmanager/src/resources/fs.sh
+++ b/rgmanager/src/resources/fs.sh
@@ -560,8 +560,6 @@ mountInUse () {
dev=$1
mp=$2
- typeset proc_mounts=$(mktemp /tmp/fs.proc.mounts.XXXXXX)
- cat /proc/mounts > $proc_mounts
while read tmp_dev tmp_mp junka junkb junkc junkd; do
if [ -n "$tmp_dev" -a "$tmp_dev" = "$dev" ]; then
return $YES
@@ -570,8 +568,7 @@ mountInUse () {
if [ -n "$tmp_mp" -a "$tmp_mp" = "$mp" ]; then
return $YES
fi
- done < $proc_mounts
- rm -f $proc_mounts
+ done < <(cat /proc/mounts)
return $NO
}
@@ -612,8 +609,6 @@ isMounted () {
ret=$NO
- typeset proc_mounts=$(mktemp /tmp/fs.proc.mounts.XXXXXX)
- cat /proc/mounts > $proc_mounts
while read tmp_dev tmp_mp junk_a junk_b junk_c junk_d
do
real_device $tmp_dev
@@ -638,8 +633,7 @@ isMounted () {
fi
ret=$YES
fi
- done < $proc_mounts
- rm -f $proc_mounts
+ done < <(cat /proc/mounts)
if [ $ret -eq $YES ] && [ $found -ne 0 ]; then
ocf_log warn "Device $dev is mounted on $poss_mp instead of $mp"
Gitweb: http://git.fedorahosted.org/git/?p=cluster.git;a=commitdiff;h=ba5cc65fe172c…
Commit: ba5cc65fe172c34c78c884f2bef96a6e9a45d20b
Parent: c5a838ac74d1099ade298f1cca602e8f7bd7a283
Author: Ryan McCabe <rmccabe(a)redhat.com>
AuthorDate: Tue Sep 17 22:22:13 2013 -0400
Committer: Ryan McCabe <rmccabe(a)redhat.com>
CommitterDate: Wed Sep 18 09:50:27 2013 -0400
fs.sh: Avoid failures caused by /tmp being full
This patch prevents fs.sh resource agent failures when /tmp is full
by eliminating the need to write a temporary file to /tmp while
parsing /proc/mounts.
This same fix has been made upstream and in RHEL6 in the filesystem
resource agent for the codepath that is hit when 'findmnt' is
either not available or not used.
Resolves: rhbz#1009246
Signed-off-by: Ryan McCabe <rmccabe(a)redhat.com>
---
rgmanager/src/resources/fs.sh | 10 ++--------
1 files changed, 2 insertions(+), 8 deletions(-)
diff --git a/rgmanager/src/resources/fs.sh b/rgmanager/src/resources/fs.sh
index e55e77f..5dc7000 100755
--- a/rgmanager/src/resources/fs.sh
+++ b/rgmanager/src/resources/fs.sh
@@ -560,8 +560,6 @@ mountInUse () {
dev=$1
mp=$2
- typeset proc_mounts=$(mktemp /tmp/fs.proc.mounts.XXXXXX)
- cat /proc/mounts > $proc_mounts
while read tmp_dev tmp_mp junka junkb junkc junkd; do
if [ -n "$tmp_dev" -a "$tmp_dev" = "$dev" ]; then
return $YES
@@ -570,8 +568,7 @@ mountInUse () {
if [ -n "$tmp_mp" -a "$tmp_mp" = "$mp" ]; then
return $YES
fi
- done < $proc_mounts
- rm -f $proc_mounts
+ done < <(cat /proc/mounts)
return $NO
}
@@ -612,8 +609,6 @@ isMounted () {
ret=$NO
- typeset proc_mounts=$(mktemp /tmp/fs.proc.mounts.XXXXXX)
- cat /proc/mounts > $proc_mounts
while read tmp_dev tmp_mp junk_a junk_b junk_c junk_d
do
real_device $tmp_dev
@@ -638,8 +633,7 @@ isMounted () {
fi
ret=$YES
fi
- done < $proc_mounts
- rm -f $proc_mounts
+ done < <(cat /proc/mounts)
if [ $ret -eq $YES ] && [ $found -ne 0 ]; then
ocf_log warn "Device $dev is mounted on $poss_mp instead of $mp"
Gitweb: http://git.fedorahosted.org/git/?p=cluster.git;a=commitdiff;h=0efa69dbc5330…
Commit: 0efa69dbc533017d02dea73646841c97fca91525
Parent: c5a838ac74d1099ade298f1cca602e8f7bd7a283
Author: Ryan McCabe <rmccabe(a)redhat.com>
AuthorDate: Tue Sep 17 22:22:13 2013 -0400
Committer: Ryan McCabe <rmccabe(a)redhat.com>
CommitterDate: Tue Sep 17 22:22:13 2013 -0400
fs.sh: Avoid failures caused by /tmp being full
This patch prevents fs.sh resource agent failures when /tmp is full
by eliminating the need to write a temporary file to /tmp while
parsing /proc/mounts.
This same fix has been made upstream and in RHEL6 in the filesystem
resource agent for the codepath that is hit when 'findmnt' is
either not available or not used.
Resolves: rhbz#997546
Signed-off-by: Ryan McCabe <rmccabe(a)redhat.com>
---
rgmanager/src/resources/fs.sh | 10 ++--------
1 files changed, 2 insertions(+), 8 deletions(-)
diff --git a/rgmanager/src/resources/fs.sh b/rgmanager/src/resources/fs.sh
index e55e77f..5dc7000 100755
--- a/rgmanager/src/resources/fs.sh
+++ b/rgmanager/src/resources/fs.sh
@@ -560,8 +560,6 @@ mountInUse () {
dev=$1
mp=$2
- typeset proc_mounts=$(mktemp /tmp/fs.proc.mounts.XXXXXX)
- cat /proc/mounts > $proc_mounts
while read tmp_dev tmp_mp junka junkb junkc junkd; do
if [ -n "$tmp_dev" -a "$tmp_dev" = "$dev" ]; then
return $YES
@@ -570,8 +568,7 @@ mountInUse () {
if [ -n "$tmp_mp" -a "$tmp_mp" = "$mp" ]; then
return $YES
fi
- done < $proc_mounts
- rm -f $proc_mounts
+ done < <(cat /proc/mounts)
return $NO
}
@@ -612,8 +609,6 @@ isMounted () {
ret=$NO
- typeset proc_mounts=$(mktemp /tmp/fs.proc.mounts.XXXXXX)
- cat /proc/mounts > $proc_mounts
while read tmp_dev tmp_mp junk_a junk_b junk_c junk_d
do
real_device $tmp_dev
@@ -638,8 +633,7 @@ isMounted () {
fi
ret=$YES
fi
- done < $proc_mounts
- rm -f $proc_mounts
+ done < <(cat /proc/mounts)
if [ $ret -eq $YES ] && [ $found -ne 0 ]; then
ocf_log warn "Device $dev is mounted on $poss_mp instead of $mp"