Skip to content

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also .

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also .
...
  • 5 commits
  • 5 files changed
  • 0 commit comments
  • 2 contributors
Commits on May 24, 2012
@lge lge Medium: Filesystem: add nfs4 to the list of well known types 02031a1
@lge lge Medium: oracle, oralsnr: get rid of eval
I tend to avoid eval if possible.
We better do this as shell function instead.
b17941e
@lge lge Medium: oracle: quote regex
To avoid it getting glob-expanded by the shell by accident.
demo:
 set -x
 mkdir -p ^/.blafoo$
 echo /foo | grep ^/.*foo$ || echo BROKEN
 echo /foo | grep "^/.*foo$" || echo BROKEN

Admittedly unlikely, but let's be paranoid.
5608bbe
@lge lge Medium: IPaddr2: fix recent regression, nic=lo always "stopped"
Intended logic:
   If lvs_support is enabled, and IP is only found active on loopback,
   pretend IP was not served,

Regression introduced in
  d93b5fd IPaddr2: add support for same ip/netmask on different interfaces
caused any IP found on lo* to be ignored and considered not served.
882d108
Commits on May 25, 2012
@dmuhamedagic dmuhamedagic build: update ChangeLog for release 3.9.3 (2) 18cc715
Showing with 38 additions and 30 deletions.
  1. +6 −2 ChangeLog
  2. +5 −5 heartbeat/Filesystem
  3. +9 −13 heartbeat/IPaddr2
  4. +9 −5 heartbeat/oracle
  5. +9 −5 heartbeat/oralsnr
View
8 ChangeLog
@@ -1,10 +1,14 @@
-* Wed May 23 2012 Linux-HA contributors
+* Fri May 25 2012 Linux-HA contributors
- stable release 3.9.3
- dhcpd: new RA to manage ISC DHCP servers
-- mysql: improve handling of reset slave
+- Filesystem: add nfs4 to the list of well known types
+- IPaddr2: fix regression introduce in d93b5fd, nic=lo always
+ "stopped"
- iSCSILogicalUnit: correctly match for target IQN and backing
device name (iet and tgt)
- jboss: implememnt rotating of console log
+- mysql: improve handling of reset slave
+- oracle, oralsnr: get rid of eval
- slapd: pass bind_dn correctly to ldapsearch
* Wed May 16 2012 Linux-HA contributors
- release candidate 3.9.3 rc1
View
10 heartbeat/Filesystem
@@ -255,7 +255,7 @@ determine_blockdevice() {
# Get the current real device name, if possible.
# (specified devname could be -L or -U...)
case "$FSTYPE" in
- nfs|smbfs|cifs|glusterfs|ceph|tmpfs|none) ;;
+ nfs4|nfs|smbfs|cifs|glusterfs|ceph|tmpfs|none) ;;
*) DEVICE=`list_mounts | grep " $MOUNTPOINT " | cut -d' ' -f1`
if [ -b "$DEVICE" ]; then
blockdevice=yes
@@ -436,7 +436,7 @@ is_fsck_needed() {
no) false;;
""|auto)
case $FSTYPE in
- ext4|ext4dev|ext3|reiserfs|reiser4|nss|xfs|jfs|vfat|fat|nfs|cifs|smbfs|ocfs2|gfs2|none|lustre|glusterfs|ceph|tmpfs)
+ ext4|ext4dev|ext3|reiserfs|reiser4|nss|xfs|jfs|vfat|fat|nfs4|nfs|cifs|smbfs|ocfs2|gfs2|none|lustre|glusterfs|ceph|tmpfs)
false;;
*)
true;;
@@ -768,7 +768,7 @@ Filesystem_stop()
# For networked filesystems, there's merit in trying -f:
case "$FSTYPE" in
- nfs|cifs|smbfs) umount_force="-f" ;;
+ nfs4|nfs|cifs|smbfs) umount_force="-f" ;;
esac
# Umount all sub-filesystems mounted under $MOUNTPOINT/ too.
@@ -967,7 +967,7 @@ set_blockdevice_var() {
# these are definitely not block devices
case $FSTYPE in
- nfs|smbfs|cifs|none|glusterfs) return;;
+ nfs4|nfs|smbfs|cifs|none|glusterfs) return;;
esac
if `is_option "loop"`; then
@@ -1078,7 +1078,7 @@ case $FSTYPE in
ocfs2) ocfs2_init
CLUSTERSAFE=1
;;
-nfs|smbfs|cifs|none|gfs2|glusterfs|ceph) CLUSTERSAFE=1 # this is kind of safe too
+nfs4|nfs|smbfs|cifs|none|gfs2|glusterfs|ceph) CLUSTERSAFE=1 # this is kind of safe too
;;
# add here CLUSTERSAFE=0 for all filesystems which are not
# cluster aware and which, even if when mounted read-only,
View
22 heartbeat/IPaddr2
@@ -593,20 +593,16 @@ ip_served() {
if [ -z "$IP_CIP" ]; then
for i in $cur_nic; do
- case $i in
- lo*)
- if ocf_is_true ${OCF_RESKEY_lvs_support}; then
- echo "no"
- return 0
- fi
- ;;
- $NIC)
- # only mark as served when on the same interfaces as $NIC
- echo "ok"
- return 0
- ;;
- esac
+ # only mark as served when on the same interfaces as $NIC
+ [ "$i" = "$NIC" ] || continue
+ echo "ok"
+ return 0
done
+ # There used to be logic here to pretend "not served",
+ # if ${OCF_RESKEY_lvs_support} was enabled, and the IP was
+ # found active on "lo*" only. With lvs_support on, you should
+ # have NIC != lo, so thats already filtered
+ # by the continue above.
echo "no"
return 0
View
14 heartbeat/oracle
@@ -394,7 +394,7 @@ other_trace_junk() {
dumpinstipc() {
local output tracef
output=`dbasql getipc` # filename in the 2nd line
- tracef=`echo "$output" | awk 'NR==2' | grep ^/.*trc$`
+ tracef=`echo "$output" | awk 'NR==2' | grep '^/.*trc$'`
if [ "$tracef" ]; then
echo $tracef
else
@@ -607,20 +607,20 @@ killprocs() {
kill -s $sig $* >/dev/null
}
ora_kill() {
- oraprocs=`eval $procs | awk '{print $1}'`
+ oraprocs=`proc_pids`
if [ -z "$oraprocs" ]; then
ocf_log debug "All oracle processes are already stopped."
return
fi
killprocs TERM $oraprocs
for i in 1 2 3 4 5; do
- if [ -z "`eval $procs | awk '{print $1}'`" ]; then
+ if [ -z "`proc_pids`" ]; then
ocf_log debug "All oracle processes are killed."
return
fi
sleep 5
done
- killprocs KILL `eval $procs | awk '{print $1}'`
+ killprocs KILL `proc_pids`
}
#
@@ -705,7 +705,11 @@ rmtmpfiles() {
rm -f $TMPFILES
}
trap "rmtmpfiles" EXIT
-procs="ps -e -o pid,args | grep -i \"[o]ra[a-zA-Z0-9_]*$ORACLE_SID\$\""
+procs()
+{
+ ps -e -o pid,args | grep -i "[o]ra[a-zA-Z0-9_]*$ORACLE_SID$"
+}
+proc_pids() { procs | awk '{print $1}'; }
US=`id -u -n`
if [ $US != root -a $US != $ORACLE_OWNER ]
View
14 heartbeat/oralsnr
@@ -263,20 +263,20 @@ oralsnr_stop() {
# kill the listener procs
# give them 10 secs to exit cleanly (5 times 2)
oralsnr_kill() {
- oraprocs=`eval $procs | awk '{print $1}'`
+ oraprocs=`proc_pids`
if [ -z "$oraprocs" ]; then
ocf_log debug "All oralsnr processes are already stopped."
return
fi
killprocs TERM $oraprocs
for i in 1 2 3 4 5; do
- if [ -z "`eval $procs | awk '{print $1}'`" ]; then
+ if [ -z "`proc_pids`" ]; then
ocf_log debug "All oralsnr processes are killed."
return
fi
sleep 2
done
- killprocs KILL `eval $procs | awk '{print $1}'`
+ killprocs KILL `proc_pids`
}
killprocs() {
sig=$1
@@ -290,7 +290,7 @@ killprocs() {
# oralsnr_status: is the listener running?
#
is_oralsnr_up() {
- [ x != "x`eval $procs`" ]
+ procs > /dev/null
}
oralsnr_status() {
output=`$lsnrctl status $listener`
@@ -386,7 +386,11 @@ trap "rm -f $envtmpf" EXIT
#
listener=${OCF_RESKEY_listener:-"LISTENER"}
# how to get listener processes
-procs="ps -e -o pid,user,args | grep '[t]nslsnr' | grep -w $listener | grep -w $ORACLE_OWNER"
+procs()
+{
+ ps -e -o pid,user,args | grep '[t]nslsnr' | grep -w "$listener" | grep -w "$ORACLE_OWNER"
+}
+proc_pids() { procs | awk '{print $1}'; }
US=`id -u -n`
if [ $US != root -a $US != $ORACLE_OWNER ]

No commit comments for this range

Something went wrong with that request. Please try again.