Gitweb: http://git.fedorahosted.org/git/?p=cluster.git;a=commitdiff;h=d45ceaa6e2437…
Commit: d45ceaa6e243733f801ce6aa8519d741a1801e34
Parent: 334a6b9cb3cda250444c8d3192d3ab33e70ad923
Author: Christine Caulfield <ccaulfie(a)redhat.com>
AuthorDate: Fri Apr 19 08:47:29 2013 +0100
Committer: Christine Caulfield <ccaulfie(a)redhat.com>
CommitterDate: Fri Apr 19 08:47:29 2013 +0100
fenced: additional fixes for /dev/zero bug
Patch 60dd70f06444939ea14bb6a40cfb61ab1eea9616 was not the full
fix for that bug. This patch fixes one place where the correct
fd was not updated and also corrects the shutdown code so
that it's not dependant on which fd (zero or cman) is active.
Resolves rhbz#951049
Signed-off-by: Christine Caulfield <ccaulfie(a)redhat.com>
---
fence/fenced/main.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/fence/fenced/main.c b/fence/fenced/main.c
index 72961f5..3163905 100644
--- a/fence/fenced/main.c
+++ b/fence/fenced/main.c
@@ -549,11 +549,11 @@ static int loop(void)
client_add(groupd_fd, &maxi);
log_debug("listen %d member %d groupd %d",
- listen_fd, member_fd, groupd_fd);
+ listen_fd, client[cluster_fd_pos].fd, groupd_fd);
for (;;) {
/* We need to re-get the cluster FD eac time */
- pollfd[cluster_fd_pos].fd = get_member_fd();
+ pollfd[cluster_fd_pos].fd = client[cluster_fd_pos].fd = get_member_fd();
rv = poll(pollfd, maxi + 1, -1);
if (rv < 0) {
if (errno == EINTR)
@@ -575,7 +575,7 @@ static int loop(void)
if (client[i].fd < 0)
continue;
if (pollfd[i].revents & (POLLERR | POLLHUP | POLLNVAL)) {
- if (pollfd[i].fd == member_fd) {
+ if (i == cluster_fd_pos) {
log_error("cluster is down, exiting");
exit(1);
}
@@ -587,7 +587,7 @@ static int loop(void)
} else if (pollfd[i].revents & POLLIN) {
if (pollfd[i].fd == groupd_fd)
process_groupd();
- else if (pollfd[i].fd == member_fd)
+ else if (i == cluster_fd_pos)
process_member();
else
client_process(i);
Gitweb: http://git.fedorahosted.org/git/?p=gfs2-utils.git;a=commitdiff;h=4d4c96cbb2…
Commit: 4d4c96cbb24a58b54a198e01044e7cce161ea323
Parent: 6649ab418b25992eb707ab821f2fdcb317c27dd9
Author: Andrew Price <anprice(a)redhat.com>
AuthorDate: Wed Apr 17 16:28:58 2013 +0100
Committer: Andrew Price <anprice(a)redhat.com>
CommitterDate: Wed Apr 17 16:28:58 2013 +0100
gfs2_edit: Fix divide by zero bug
gfs2_edit uses its own superblock reading functions instead of read_sb
so the sd_blocks_per_bitmap 'constant' doesn't get calculated causing a
divide-by-zero crash. With this patch, the value is now calculated in
compute_constants() which does get called by gfs2_edit.
Signed-off-by: Andrew Price <anprice(a)redhat.com>
---
gfs2/libgfs2/misc.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/gfs2/libgfs2/misc.c b/gfs2/libgfs2/misc.c
index 9efddcd..c05a770 100644
--- a/gfs2/libgfs2/misc.c
+++ b/gfs2/libgfs2/misc.c
@@ -70,6 +70,8 @@ int compute_constants(struct gfs2_sbd *sdp)
sdp->sd_hash_bsize = sdp->bsize / 2;
sdp->sd_hash_bsize_shift = sdp->sd_sb.sb_bsize_shift - 1;
sdp->sd_hash_ptrs = sdp->sd_hash_bsize / sizeof(uint64_t);
+ sdp->sd_blocks_per_bitmap = (sdp->sd_sb.sb_bsize - sizeof(struct gfs2_meta_header))
+ * GFS2_NBBY;
/* Compute maximum reservation required to add a entry to a directory */
Gitweb: http://git.fedorahosted.org/git/?p=cluster.git;a=commitdiff;h=07766f691733c…
Commit: 07766f691733c71344a703eff31636fac3ca1d30
Parent: 8ebfc023495b1010e6802ab1be6fb11790f35494
Author: Chris Feist <cfeist(a)redhat.com>
AuthorDate: Fri Dec 7 13:37:57 2012 -0600
Committer: Ryan McCabe <rmccabe(a)redhat.com>
CommitterDate: Tue Apr 16 10:35:09 2013 -0400
rgmanager: Update SAPInstance agent resource limits
Update the rgmanager SAPInstance agent so resource limits configured in
/usr/sap/services are properly applied.
This is commit f6a961f28ba5dd321dd069c9b621f89a3481894e
from resource-agents.git
Resolves: rhbz#869705
Signed-off-by: Ryan McCabe <rmccabe(a)redhat.com>
---
rgmanager/src/resources/SAPInstance | 38 +++++++++++++++++++++++++++++++++++
1 files changed, 38 insertions(+), 0 deletions(-)
diff --git a/rgmanager/src/resources/SAPInstance b/rgmanager/src/resources/SAPInstance
index 802d3c0..fbfb7d7 100644
--- a/rgmanager/src/resources/SAPInstance
+++ b/rgmanager/src/resources/SAPInstance
@@ -162,6 +162,40 @@ sapinstance_methods() {
!
}
+#
+# setup_limits: If sapstartsrv needs to be started by this resource agent we need to ensure that any resource
+# limits configured in /usr/sap/sapservices are applied.
+# Since sapstartsrv is started as root and then it downgrades its privileges by calling setuid() and
+# setgid() any PAM limits at /etc/security/limits.conf are not applied.
+# Should sapstartsrv need to be started, we look for values configured at /usr/sap/sapservices (as
+# per SAP note 1437105) and, if found, we apply them before starting sapstartsrv.
+# Instance processes are started by sapstartsrv and will inherit resource limits from it.
+#
+setup_limits() {
+ if [ -r $SAPSERVICES ]
+ then
+ descriptors=`grep "^limit.descriptors" $SAPSERVICES | sed -e "s/limit.descriptors=//" `
+ if [ -n $descriptors ]
+ then
+ ocf_log info "found valid open file descriptors limit at ${SAPSERVICES}: ${descriptors}, applying..."
+ eval ulimit -n $descriptors
+ fi
+
+ stacksize=`grep "^limit.stacksize" $SAPSERVICES | sed -e "s/limit.stacksize=//" `
+ if [ -n $stacksize ]
+ then
+ ocf_log info "found valid stack size limit at ${SAPSERVICES}: ${stacksize}, applying..."
+ eval ulimit -s $stacksize
+ fi
+
+ datasize=`grep "^limit.datasize" $SAPSERVICES | sed -e "s/limit.datasize=//" `
+ if [ -n $datasize ]
+ then
+ ocf_log info "found valid process data segment size limit at ${SAPSERVICES}: ${datasize}, applying..."
+ eval ulimit -d $datasize
+ fi
+ fi
+}
#
# check_sapstartsrv : Before using sapcontrol we make sure that the sapstartsrv is running for the correct instance.
@@ -192,6 +226,8 @@ check_sapstartsrv() {
if [ $restart -eq 1 ]
then
pkill -9 -f "sapstartsrv.*$runninginst"
+
+ setup_limits
$SAPSTARTSRV pf=$SAPSTARTPROFILE -D -u $sidadm
# now make sure the daemon has been started and is able to respond
@@ -571,6 +607,8 @@ if [ `echo $LD_LIBRARY_PATH | grep -c "^$DIR_EXECUTABLE\>"` -eq 0 ]; then
fi
sidadm="`echo $SID | tr '[:upper:]' '[:lower:]'`adm"
+SAPSERVICES=/usr/sap/sapservices
+
# What kind of method was invoked?
case "$1" in
Gitweb: http://git.fedorahosted.org/git/?p=cluster.git;a=commitdiff;h=adf106455d722…
Commit: adf106455d72219956030c7f821b0dd06381a9cb
Parent: a5875267a2eb0137dc7a123340db44d42dee4ee9
Author: J.H.M. Dassen (Ray) <rdassen(a)redhat.com>
AuthorDate: Tue Feb 5 09:54:15 2013 +0100
Committer: Ryan McCabe <rmccabe(a)redhat.com>
CommitterDate: Fri Apr 12 14:13:52 2013 -0400
rgmanager: Clean up comments in ASEHAagent.sh
Grammar fix
Resolves: rhbz#841142
Acked-by: Ryan McCabe <rmccabe(a)redhat.com>
---
rgmanager/src/resources/ASEHAagent.sh | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/rgmanager/src/resources/ASEHAagent.sh b/rgmanager/src/resources/ASEHAagent.sh
index 489d49b..38a78b6 100755
--- a/rgmanager/src/resources/ASEHAagent.sh
+++ b/rgmanager/src/resources/ASEHAagent.sh
@@ -528,11 +528,11 @@ EOF
sleep 5
- # Check if the server has been shutted down successfully
+ # Check if the server has been shut down successfully
t=0
while [[ $t -lt $OCF_RESKEY_shutdown_timeout ]]
do
- # Search "ueshutdown: exiting" in the server log. If found, it means the server has been shutted down.
+ # Search "ueshutdown: exiting" in the server log. If found, it means the server has been shut down.
# Otherwise, we need to wait.
tail $CONSOLE_LOG | grep "ueshutdown: exiting" > /dev/null 2>&1
if [[ $? != 0 ]]
@@ -547,14 +547,14 @@ EOF
fi
done
- # If $t is larger than shutdown_timeout, it means the ASE server cannot be shutted down in given time. We need
+ # If $t is larger than shutdown_timeout, it means the ASE server cannot be shut down in given time. We need
# to wait for the background kill process to kill the OS processes directly.
if [[ $t -ge $OCF_RESKEY_shutdown_timeout ]]
then
ocf_log err "ASEHAagent: Shutdown of '$OCF_RESKEY_server_name' from isql failed. Server is either down or unreachable."
fi
- # Here, the ASE server has been shutted down by isql command or killed by background process. We need to do
+ # Here, the ASE server has been shut down by isql command or killed by background process. We need to do
# further check to make sure all processes have gone away before saying shutdown is complete. This stops the
# other node from starting up the package before it has been stopped and the file system has been unmounted.