cluster: RHEL57 - fence_cisco_ucs: Support for sub-organization
by Marek Grác
Gitweb: http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=...
Commit: 0b661eb2e92c1f3c7cb60fec83c69d21c00a0414
Parent: 434b08025485c1d7acfa03fc7d14fdb0e54a6c74
Author: Marek 'marx' Grac <mgrac(a)redhat.com>
AuthorDate: Tue Mar 22 15:00:46 2011 +0100
Committer: Marek 'marx' Grac <mgrac(a)redhat.com>
CommitterDate: Tue Mar 22 15:09:04 2011 +0100
fence_cisco_ucs: Support for sub-organization
Added new option --suborg where you can enter suborg path (e.g. org-myorg/org-sub).
Unlike in the other cases we do not automatically add prefixes as there can be more
levels of suborganizations.
Resolves: rhbz#678902
---
fence/agents/cisco_ucs/fence_cisco_ucs.py | 12 ++++++++++--
fence/agents/lib/fencing.py.py | 8 ++++++++
2 files changed, 18 insertions(+), 2 deletions(-)
diff --git a/fence/agents/cisco_ucs/fence_cisco_ucs.py b/fence/agents/cisco_ucs/fence_cisco_ucs.py
index 702f05b..3e0b172 100755
--- a/fence/agents/cisco_ucs/fence_cisco_ucs.py
+++ b/fence/agents/cisco_ucs/fence_cisco_ucs.py
@@ -18,7 +18,7 @@ re_get_desc = re.compile(" descr=\"(.*?)\"", re.IGNORECASE)
def get_power_status(conn, options):
try:
- res = send_command(options, "<configResolveDn cookie=\"" + options["cookie"] + "\" inHierarchical=\"false\" dn=\"org-root/ls-" + options["-n"] + "/power\"/>")
+ res = send_command(options, "<configResolveDn cookie=\"" + options["cookie"] + "\" inHierarchical=\"false\" dn=\"org-root" + options["-s"] + "/ls-" + options["-n"] + "/power\"/>")
except pycurl.error, e:
sys.stderr.write(e[1] + "\n")
fail(EC_TIMED_OUT)
@@ -102,7 +102,7 @@ def main():
"action", "ipaddr", "login", "passwd", "passwd_script",
"ssl", "inet4_only", "inet6_only", "ipport", "port",
"web", "separator", "power_wait", "power_timeout",
- "shell_timeout" ]
+ "shell_timeout", "suborg" ]
atexit.register(atexit_handler)
@@ -125,6 +125,14 @@ used with Cisco UCS to fence machines."
options["cookie"] = result.group(1);
##
+ ## Modify suborg to format /suborg
+ if options["-s"] != "":
+ if options["-s"].startswith("/") == False:
+ options["-s"] = "/" + options["-s"]
+ if options["-s"].endswith("/") == True:
+ options["-s"] = options["-s"][0:-1]
+
+ ##
## Fence operations
####
result = fence_action(None, options, set_power_status, get_power_status, get_list)
diff --git a/fence/agents/lib/fencing.py.py b/fence/agents/lib/fencing.py.py
index de8bd90..933fd75 100644
--- a/fence/agents/lib/fencing.py.py
+++ b/fence/agents/lib/fencing.py.py
@@ -219,6 +219,14 @@ all_opt = {
"required" : "0",
"shortdesc" : "Physical switch number on device",
"order" : 1 },
+ "suborg" : {
+ "getopt" : "s:",
+ "longopt" : "suborg",
+ "help" : "--suborg=<path> Additional path needed to access suborganization",
+ "required" : "0",
+ "shortdesc" : "Additional path needed to access suborganization",
+ "default" : "",
+ "order" : 1 },
"partition" : {
"getopt" : "n:",
"help" : "-n <id> Name of the partition",
13 years, 1 month
cluster: RHEL6 - fence_cisco_ucs: Support for sub-organization
by Marek Grác
Gitweb: http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=...
Commit: 4f9c0c57af4f9eb2fa6ac463dafd351a6c657998
Parent: e468b6f6588d22f22b3329deaaf62bea014e4a2e
Author: Marek 'marx' Grac <mgrac(a)redhat.com>
AuthorDate: Tue Mar 22 15:00:46 2011 +0100
Committer: Marek 'marx' Grac <mgrac(a)redhat.com>
CommitterDate: Tue Mar 22 15:05:00 2011 +0100
fence_cisco_ucs: Support for sub-organization
Added new option --suborg where you can enter suborg path (e.g. org-myorg/org-sub).
Unlike in the other cases we do not automatically add prefixes as there can be more
levels of suborganizations.
Resolves: rhbz#678094
---
fence/agents/cisco_ucs/fence_cisco_ucs.py | 12 ++++++++++--
fence/agents/lib/fencing.py.py | 8 ++++++++
2 files changed, 18 insertions(+), 2 deletions(-)
diff --git a/fence/agents/cisco_ucs/fence_cisco_ucs.py b/fence/agents/cisco_ucs/fence_cisco_ucs.py
index 07375b3..87c4bd2 100755
--- a/fence/agents/cisco_ucs/fence_cisco_ucs.py
+++ b/fence/agents/cisco_ucs/fence_cisco_ucs.py
@@ -18,7 +18,7 @@ re_get_desc = re.compile(" descr=\"(.*?)\"", re.IGNORECASE)
def get_power_status(conn, options):
try:
- res = send_command(options, "<configResolveDn cookie=\"" + options["cookie"] + "\" inHierarchical=\"false\" dn=\"org-root/ls-" + options["-n"] + "/power\"/>")
+ res = send_command(options, "<configResolveDn cookie=\"" + options["cookie"] + "\" inHierarchical=\"false\" dn=\"org-root" + options["-s"] + "/ls-" + options["-n"] + "/power\"/>")
except pycurl.error, e:
sys.stderr.write(e[1] + "\n")
fail(EC_TIMED_OUT)
@@ -102,7 +102,7 @@ def main():
"action", "ipaddr", "login", "passwd", "passwd_script",
"ssl", "inet4_only", "inet6_only", "ipport", "port",
"web", "separator", "power_wait", "power_timeout",
- "shell_timeout" ]
+ "shell_timeout", "suborg" ]
atexit.register(atexit_handler)
@@ -125,6 +125,14 @@ used with Cisco UCS to fence machines."
options["cookie"] = result.group(1);
##
+ ## Modify suborg to format /suborg
+ if options["-s"] != "":
+ if options["-s"].startswith("/") == False:
+ options["-s"] = "/" + options["-s"]
+ if options["-s"].endswith("/") == True:
+ options["-s"] = options["-s"][0:-1]
+
+ ##
## Fence operations
####
result = fence_action(None, options, set_power_status, get_power_status, get_list)
diff --git a/fence/agents/lib/fencing.py.py b/fence/agents/lib/fencing.py.py
index f7c565a..055a7f5 100644
--- a/fence/agents/lib/fencing.py.py
+++ b/fence/agents/lib/fencing.py.py
@@ -215,6 +215,14 @@ all_opt = {
"required" : "0",
"shortdesc" : "Physical switch number on device",
"order" : 1 },
+ "suborg" : {
+ "getopt" : "s:",
+ "longopt" : "suborg",
+ "help" : "--suborg=<path> Additional path needed to access suborganization",
+ "required" : "0",
+ "shortdesc" : "Additional path needed to access suborganization",
+ "default" : "",
+ "order" : 1 },
"partition" : {
"getopt" : "n:",
"help" : "-n <id> Name of the partition",
13 years, 1 month
fence-agents: master - fence_cisco_ucs: Support for sub-organization
by Marek Grác
Gitweb: http://git.fedorahosted.org/git/fence-agents.git?p=fence-agents.git;a=com...
Commit: 71d6b61273be24289d1ef64e81af291305cb5660
Parent: e8253f37feb87c5f64db1c40f4c93fb27a248f34
Author: Marek 'marx' Grac <mgrac(a)redhat.com>
AuthorDate: Tue Mar 22 15:00:46 2011 +0100
Committer: Marek 'marx' Grac <mgrac(a)redhat.com>
CommitterDate: Tue Mar 22 15:00:46 2011 +0100
fence_cisco_ucs: Support for sub-organization
Added new option --suborg where you can enter suborg path (e.g. org-myorg/org-sub).
Unlike in the other cases we do not automatically add prefixes as there can be more
levels of suborganizations.
Resolves: rhbz#678094
---
fence/agents/cisco_ucs/fence_cisco_ucs.py | 12 ++++++++++--
fence/agents/lib/fencing.py.py | 8 ++++++++
2 files changed, 18 insertions(+), 2 deletions(-)
diff --git a/fence/agents/cisco_ucs/fence_cisco_ucs.py b/fence/agents/cisco_ucs/fence_cisco_ucs.py
index 07375b3..87c4bd2 100755
--- a/fence/agents/cisco_ucs/fence_cisco_ucs.py
+++ b/fence/agents/cisco_ucs/fence_cisco_ucs.py
@@ -18,7 +18,7 @@ re_get_desc = re.compile(" descr=\"(.*?)\"", re.IGNORECASE)
def get_power_status(conn, options):
try:
- res = send_command(options, "<configResolveDn cookie=\"" + options["cookie"] + "\" inHierarchical=\"false\" dn=\"org-root/ls-" + options["-n"] + "/power\"/>")
+ res = send_command(options, "<configResolveDn cookie=\"" + options["cookie"] + "\" inHierarchical=\"false\" dn=\"org-root" + options["-s"] + "/ls-" + options["-n"] + "/power\"/>")
except pycurl.error, e:
sys.stderr.write(e[1] + "\n")
fail(EC_TIMED_OUT)
@@ -102,7 +102,7 @@ def main():
"action", "ipaddr", "login", "passwd", "passwd_script",
"ssl", "inet4_only", "inet6_only", "ipport", "port",
"web", "separator", "power_wait", "power_timeout",
- "shell_timeout" ]
+ "shell_timeout", "suborg" ]
atexit.register(atexit_handler)
@@ -125,6 +125,14 @@ used with Cisco UCS to fence machines."
options["cookie"] = result.group(1);
##
+ ## Modify suborg to format /suborg
+ if options["-s"] != "":
+ if options["-s"].startswith("/") == False:
+ options["-s"] = "/" + options["-s"]
+ if options["-s"].endswith("/") == True:
+ options["-s"] = options["-s"][0:-1]
+
+ ##
## Fence operations
####
result = fence_action(None, options, set_power_status, get_power_status, get_list)
diff --git a/fence/agents/lib/fencing.py.py b/fence/agents/lib/fencing.py.py
index 4e5eb18..8bd6f45 100644
--- a/fence/agents/lib/fencing.py.py
+++ b/fence/agents/lib/fencing.py.py
@@ -215,6 +215,14 @@ all_opt = {
"required" : "0",
"shortdesc" : "Physical switch number on device",
"order" : 1 },
+ "suborg" : {
+ "getopt" : "s:",
+ "longopt" : "suborg",
+ "help" : "--suborg=<path> Additional path needed to access suborganization",
+ "required" : "0",
+ "shortdesc" : "Additional path needed to access suborganization",
+ "default" : "",
+ "order" : 1 },
"partition" : {
"getopt" : "n:",
"help" : "-n <id> Name of the partition",
13 years, 1 month
cluster: RHEL6 - gfs2_convert exits with success without doing anything
by Fabio M. Di Nitto
Gitweb: http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=...
Commit: e468b6f6588d22f22b3329deaaf62bea014e4a2e
Parent: 508b868e8c22a4dc454a406d9a1c0a32af94c21e
Author: Abhijith Das <adas(a)redhat.com>
AuthorDate: Mon Mar 21 17:23:20 2011 -0500
Committer: Fabio M. Di Nitto <fdinitto(a)redhat.com>
CommitterDate: Tue Mar 22 10:16:23 2011 +0100
gfs2_convert exits with success without doing anything
This is a correction to the previous patch that worked only for
the default 4K blocksizes because the internal blocksize value
was not yet updated with the actual value from the ondisk gfs1
superblock.
Resolves: rhbz#688734
Signed-off-by: Abhi Das <adas(a)redhat.com>
---
gfs2/convert/gfs2_convert.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/gfs2/convert/gfs2_convert.c b/gfs2/convert/gfs2_convert.c
index 2b8f487..9cc3258 100644
--- a/gfs2/convert/gfs2_convert.c
+++ b/gfs2/convert/gfs2_convert.c
@@ -1498,7 +1498,6 @@ static int init(struct gfs2_sbd *sbp)
sbp->dinodes_alloced = 0; /* dinodes allocated - total them up later */
sbp->sd_sb.sb_bsize = GFS2_DEFAULT_BSIZE;
sbp->bsize = sbp->sd_sb.sb_bsize;
- sbp->fssize = lseek(sbp->device_fd, 0, SEEK_END) / sbp->sd_sb.sb_bsize;
osi_list_init(&sbp->rglist);
if (compute_constants(sbp)) {
log_crit("Error: Bad constants (1)\n");
@@ -1514,6 +1513,7 @@ static int init(struct gfs2_sbd *sbp)
rindex_addr = be64_to_cpu(raw_gfs1_ondisk_sb.sb_rindex_di.no_addr);
sbp->bsize = sbp->sd_sb.sb_bsize;
+ sbp->fssize = lseek(sbp->device_fd, 0, SEEK_END) / sbp->sd_sb.sb_bsize;
sbp->sd_inptrs = (sbp->bsize - sizeof(struct gfs_indirect)) /
sizeof(uint64_t);
sbp->sd_diptrs = (sbp->bsize - sizeof(struct gfs_dinode)) /
13 years, 1 month
cluster: RHEL57 - fence-agents: Fence_rhevm needs to change "RUNNING" status to "UP" status as the REST-API has changed.
by Lon Hohberger
Gitweb: http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=...
Commit: 434b08025485c1d7acfa03fc7d14fdb0e54a6c74
Parent: 31000582619959bf3e596bd776cc75fedc8cadf2
Author: Brandon Perkins <bperkins(a)redhat.com>
AuthorDate: Mon Mar 7 12:05:30 2011 -0500
Committer: Lon Hohberger <lhh(a)redhat.com>
CommitterDate: Mon Mar 21 20:12:05 2011 -0400
fence-agents: Fence_rhevm needs to change "RUNNING" status to "UP" status as the REST-API has changed.
Resolves: rhbz#681670
Signed-off-by: Marcus Barrow <mbarrow(a)redhat.com>
Reviewed-by: Lon Hohberger <lhh(a)redhat.com>
---
fence/agents/rhevm/fence_rhevm.py | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/fence/agents/rhevm/fence_rhevm.py b/fence/agents/rhevm/fence_rhevm.py
index c63251a..323ccf8 100755
--- a/fence/agents/rhevm/fence_rhevm.py
+++ b/fence/agents/rhevm/fence_rhevm.py
@@ -40,7 +40,7 @@ def get_power_status(conn, options):
else:
status = result.group(1)
- if (status == "RUNNING"):
+ if (status == "UP"):
return "on"
else:
return "off"
13 years, 1 month
cluster: RHEL57 - fence_rhevm: Update URL to RHEV-M REST API
by Lon Hohberger
Gitweb: http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=...
Commit: 31000582619959bf3e596bd776cc75fedc8cadf2
Parent: e578d83c39fcb6264b0e54f5c590a23430f9ac83
Author: Marek 'marx' Grac <mgrac(a)redhat.com>
AuthorDate: Mon Mar 21 09:06:36 2011 +0100
Committer: Lon Hohberger <lhh(a)redhat.com>
CommitterDate: Mon Mar 21 20:11:34 2011 -0400
fence_rhevm: Update URL to RHEV-M REST API
Resolves: rhbz#681676
---
fence/agents/rhevm/fence_rhevm.py | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/fence/agents/rhevm/fence_rhevm.py b/fence/agents/rhevm/fence_rhevm.py
index 92272b9..c63251a 100755
--- a/fence/agents/rhevm/fence_rhevm.py
+++ b/fence/agents/rhevm/fence_rhevm.py
@@ -88,7 +88,7 @@ def send_command(opt, command, method = "GET"):
else:
url = "http:"
- url += "//" + opt["-a"] + ":" + str(opt["-u"]) + "/rhevm-api-powershell/" + command
+ url += "//" + opt["-a"] + ":" + str(opt["-u"]) + "/rhevm-api/" + command
## send command through pycurl
c = pycurl.Curl()
13 years, 1 month
cluster: RHEL57 - resource-agents: Use literal quotes for tr calls
by Lon Hohberger
Gitweb: http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=...
Commit: e578d83c39fcb6264b0e54f5c590a23430f9ac83
Parent: ec8361d744d079be5c9c146e8a8b0762a9810275
Author: Lon Hohberger <lhh(a)redhat.com>
AuthorDate: Wed Jan 12 17:30:09 2011 -0500
Committer: Lon Hohberger <lhh(a)redhat.com>
CommitterDate: Mon Mar 21 20:06:17 2011 -0400
resource-agents: Use literal quotes for tr calls
This affects SAPInstance / SAPDatabase agents.
Resolves: rhbz#639252
Signed-off-by: Lon Hohberger <lhh(a)redhat.com>
Reviewed-by: Ryan O'Hara <rohara(a)redhat.com>
---
rgmanager/src/resources/SAPDatabase | 16 ++++++++--------
rgmanager/src/resources/SAPInstance | 2 +-
2 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/rgmanager/src/resources/SAPDatabase b/rgmanager/src/resources/SAPDatabase
index 8ac3005..5027018 100644
--- a/rgmanager/src/resources/SAPDatabase
+++ b/rgmanager/src/resources/SAPDatabase
@@ -201,7 +201,7 @@ do_exit() {
# listener_start: Start the given listener
#
listener_start() {
- orasid="ora`echo $SID | tr [:upper:] [:lower:]`"
+ orasid="ora`echo $SID | tr '[:upper:]' '[:lower:]'`"
rc=$OCF_SUCCESS
output=`echo "lsnrctl start $NETSERVICENAME" | su - $orasid 2>&1`
if [ $? -eq 0 ]
@@ -219,7 +219,7 @@ listener_start() {
# listener_stop: Stop the given listener
#
listener_stop() {
- orasid="ora`echo $SID | tr [:upper:] [:lower:]`"
+ orasid="ora`echo $SID | tr '[:upper:]' '[:lower:]'`"
rc=$OCF_SUCCESS
if
listener_status
@@ -243,7 +243,7 @@ listener_stop() {
# listener_status: is the given listener running?
#
listener_status() {
- orasid="ora`echo $SID | tr [:upper:] [:lower:]`"
+ orasid="ora`echo $SID | tr '[:upper:]' '[:lower:]'`"
# Note: ps cuts off it's output at column $COLUMNS, so "ps -ef" can not be used here
# as the output might be to long.
cnt=`ps efo args --user $orasid | grep $NETSERVICENAME | grep -c tnslsnr`
@@ -502,7 +502,7 @@ exit \$rc" > $TEMPFILE
# db6udb_recover: try to recover DB/2 after a crash
#
db6udb_recover() {
- db2sid="db2`echo $SID | tr [:upper:] [:lower:]`"
+ db2sid="db2`echo $SID | tr '[:upper:]' '[:lower:]'`"
echo '#!/bin/sh
LOG=$HOME/recover.log
@@ -752,11 +752,11 @@ sapdatabase_status() {
SNUM=2
;;
ORA) SEARCH="ora_[a-z][a-z][a-z][a-z]_"
- SUSER="ora`echo $SID | tr [:upper:] [:lower:]`"
+ SUSER="ora`echo $SID | tr '[:upper:]' '[:lower:]'`"
SNUM=4
;;
DB6) SEARCH="db2[a-z][a-z][a-z][a-z][a-z]"
- SUSER="db2`echo $SID | tr [:upper:] [:lower:]`"
+ SUSER="db2`echo $SID | tr '[:upper:]' '[:lower:]'`"
SNUM=5
;;
esac
@@ -876,7 +876,7 @@ if [ -z "$OCF_RESKEY_DBTYPE" ]; then
ocf_log err "Please set OCF_RESKEY_DBTYPE to the database vendor specific tag (ORA,ADA,DB6)!"
do_exit $OCF_ERR_ARGS
fi
-DBTYPE=`echo "$OCF_RESKEY_DBTYPE" | tr "[a-z]" "[A-Z]"`
+DBTYPE=`echo "$OCF_RESKEY_DBTYPE" | tr '[a-z]' '[A-Z]'`
# optional OCF parameters, we try to guess which directories are correct
EXESTARTDB="startdb"
@@ -995,7 +995,7 @@ fi
if [ `echo $LD_LIBRARY_PATH | grep -c "^$DIR_EXECUTABLE\>"` -eq 0 ]; then
LD_LIBRARY_PATH=$DIR_EXECUTABLE:$LD_LIBRARY_PATH; export LD_LIBRARY_PATH
fi
-sidadm="`echo $SID | tr [:upper:] [:lower:]`adm"
+sidadm="`echo $SID | tr '[:upper:]' '[:lower:]'`adm"
# What kind of method was invoked?
case "$1" in
diff --git a/rgmanager/src/resources/SAPInstance b/rgmanager/src/resources/SAPInstance
index 94643c9..e70e2a3 100644
--- a/rgmanager/src/resources/SAPInstance
+++ b/rgmanager/src/resources/SAPInstance
@@ -568,7 +568,7 @@ fi
if [ `echo $LD_LIBRARY_PATH | grep -c "^$DIR_EXECUTABLE\>"` -eq 0 ]; then
LD_LIBRARY_PATH=$DIR_EXECUTABLE:$LD_LIBRARY_PATH; export LD_LIBRARY_PATH
fi
-sidadm="`echo $SID | tr [:upper:] [:lower:]`adm"
+sidadm="`echo $SID | tr '[:upper:]' '[:lower:]'`adm"
# What kind of method was invoked?
case "$1" in
13 years, 1 month
cluster: RHEL57 - qdiskd: Fix bad timer check - RHEL5
by Lon Hohberger
Gitweb: http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=...
Commit: ec8361d744d079be5c9c146e8a8b0762a9810275
Parent: 4c5fdf002d5f409c8a1acbba4a290c13b5d1e7e4
Author: Lon Hohberger <lhh(a)redhat.com>
AuthorDate: Thu Mar 3 17:39:10 2011 -0500
Committer: Lon Hohberger <lhh(a)redhat.com>
CommitterDate: Mon Mar 21 19:00:40 2011 -0400
qdiskd: Fix bad timer check - RHEL5
Resolves: rhbz#679274
Signed-off-by: Lon Hohberger <lhh(a)redhat.com>
Reviewed-by: Fabio M. Di Nitto <fdinitto(a)redhat.com>
Tested-by: Masanari Iida <masanari_iida(a)hp.com>
---
cman/qdisk/score.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/cman/qdisk/score.c b/cman/qdisk/score.c
index 2e8993d..1907e4a 100644
--- a/cman/qdisk/score.c
+++ b/cman/qdisk/score.c
@@ -107,7 +107,8 @@ fork_heuristic(struct h_data *h, struct timespec *now)
}
if (now->tv_sec < h->nextrun.tv_sec ||
- now->tv_nsec < h->nextrun.tv_nsec)
+ ((now->tv_sec == h->nextrun.tv_sec) &&
+ (now->tv_nsec < h->nextrun.tv_nsec)))
return 0;
h->nextrun.tv_sec = now->tv_sec + h->interval;
13 years, 1 month
cluster: RHEL57 - resource-agents: Use shutdown immediate in oracledb.sh
by Lon Hohberger
Gitweb: http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=...
Commit: 4c5fdf002d5f409c8a1acbba4a290c13b5d1e7e4
Parent: 84e6165091312a1e5d31437485e713d47d9339ff
Author: Lon Hohberger <lhh(a)redhat.com>
AuthorDate: Mon Mar 7 09:56:52 2011 -0500
Committer: Lon Hohberger <lhh(a)redhat.com>
CommitterDate: Mon Mar 21 18:59:44 2011 -0400
resource-agents: Use shutdown immediate in oracledb.sh
Resolves: rhbz#633992
Signed-off-by: Lon Hohberger <lhh(a)redhat.com>
---
rgmanager/src/resources/oracledb.sh | 15 ++++++++++++---
1 files changed, 12 insertions(+), 3 deletions(-)
diff --git a/rgmanager/src/resources/oracledb.sh b/rgmanager/src/resources/oracledb.sh
index 3358783..bcb367f 100755
--- a/rgmanager/src/resources/oracledb.sh
+++ b/rgmanager/src/resources/oracledb.sh
@@ -319,12 +319,17 @@ stop_db()
declare tmpfile
declare logfile
declare -i rv
+ declare how_shutdown="$1"
+
+ if [ -z "$1" ]; then
+ how_shutdown="immediate"
+ fi
tmpfile=$(mktemp /tmp/$SCRIPT-stop.tmp.XXXXXX)
logfile=$(mktemp /tmp/$SCRIPT-stop.log.XXXXXX)
# Setup for Stop ...
- echo "shutdown abort" > $tmpfile
+ echo "shutdown $how_shutdown" > $tmpfile
echo "quit" >> $tmpfile
sqlplus "/ as sysdba" < $tmpfile &> $logfile
@@ -434,7 +439,7 @@ get_db_status()
# this db process is down - stop and
# (re)start all ora_XXXX_$ORACLE_SID processes
initlog -q -n $SCRIPT -s "Restarting Oracle Database..."
- stop_db
+ stop_db immediate
if [ $? != 0 ] ; then
# stop failed - return 1
return 1
@@ -776,7 +781,11 @@ stop_oracle()
action "Stopping Oracle EM:" emctl stop em || return 1
fi
- faction "Stopping Oracle Database:" stop_db || return 1
+ faction "Stopping Oracle Database:" stop_db immediate
+ if [ $? -ne 0 ]; then
+ faction "Stopping Oracle Database (hard):" stop_db abort || return 1
+ fi
+
action "Stopping Oracle Listener:" lsnrctl stop $ORACLE_LISTENER
faction "Waiting for all Oracle processes to exit:" exit_idle
13 years, 1 month
cluster: RHEL57 - rgmanager: Make clustat report correct version
by Lon Hohberger
Gitweb: http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=...
Commit: 84e6165091312a1e5d31437485e713d47d9339ff
Parent: 7a1ce5f909bdf6aef032bf4874de9fe54a22ab25
Author: Ryan Mitchell <rmitchel(a)redhat.com>
AuthorDate: Mon Mar 7 09:50:07 2011 -0500
Committer: Lon Hohberger <lhh(a)redhat.com>
CommitterDate: Mon Mar 21 18:59:27 2011 -0400
rgmanager: Make clustat report correct version
Resolves: rhbz#654160
Signed-off-by: Lon Hohberger <lhh(a)redhat.com>
Tested-by: Lon Hohberger <lhh(a)redhat.com>
---
rgmanager/src/utils/clustat.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/rgmanager/src/utils/clustat.c b/rgmanager/src/utils/clustat.c
index 567fe2c..e9fc4ef 100644
--- a/rgmanager/src/utils/clustat.c
+++ b/rgmanager/src/utils/clustat.c
@@ -1132,9 +1132,9 @@ main(int argc, char **argv)
ret = !(cman_is_quorate(ch));
goto cleanup;
case VERSION_ONLY:
-#ifdef RELEASE_VERSION
+#ifdef PACKAGE_VERSION
printf("%s version %s\n", basename(argv[0]),
- RELEASE_VERSION);
+ PACKAGE_VERSION);
#else
printf("%s version DEVEL\n", basename(argv[0]));
#endif
13 years, 1 month