184 lines
6.4 KiB
Diff
184 lines
6.4 KiB
Diff
From 84083d83ff6049bcc99b959c00999496b3027317 Mon Sep 17 00:00:00 2001
|
|
From: Oyvind Albrigtsen <oalbrigt@redhat.com>
|
|
Date: Fri, 21 Sep 2018 11:30:26 +0200
|
|
Subject: [PATCH 1/4] IPv6Addr/nagios/sybaseASE: add missing "s"-suffix in
|
|
metadata
|
|
|
|
---
|
|
heartbeat/IPv6addr.c | 12 ++++++------
|
|
heartbeat/nagios | 2 +-
|
|
heartbeat/sybaseASE.in | 4 ++--
|
|
3 files changed, 9 insertions(+), 9 deletions(-)
|
|
|
|
diff --git a/heartbeat/IPv6addr.c b/heartbeat/IPv6addr.c
|
|
index 68447de2e..d8562559b 100644
|
|
--- a/heartbeat/IPv6addr.c
|
|
+++ b/heartbeat/IPv6addr.c
|
|
@@ -863,12 +863,12 @@ meta_data_addr6(void)
|
|
" </parameter>\n"
|
|
" </parameters>\n"
|
|
" <actions>\n"
|
|
- " <action name=\"start\" timeout=\"15\" />\n"
|
|
- " <action name=\"stop\" timeout=\"15\" />\n"
|
|
- " <action name=\"status\" timeout=\"15\" interval=\"15\" />\n"
|
|
- " <action name=\"monitor\" timeout=\"15\" interval=\"15\" />\n"
|
|
- " <action name=\"validate-all\" timeout=\"5\" />\n"
|
|
- " <action name=\"meta-data\" timeout=\"5\" />\n"
|
|
+ " <action name=\"start\" timeout=\"15s\" />\n"
|
|
+ " <action name=\"stop\" timeout=\"15s\" />\n"
|
|
+ " <action name=\"status\" timeout=\"15s\" interval=\"15s\" />\n"
|
|
+ " <action name=\"monitor\" timeout=\"15s\" interval=\"15s\" />\n"
|
|
+ " <action name=\"validate-all\" timeout=\"5s\" />\n"
|
|
+ " <action name=\"meta-data\" timeout=\"5s\" />\n"
|
|
" </actions>\n"
|
|
"</resource-agent>\n";
|
|
printf("%s\n",meta_data);
|
|
diff --git a/heartbeat/nagios b/heartbeat/nagios
|
|
index 4cb462f6a..3d07b141c 100755
|
|
--- a/heartbeat/nagios
|
|
+++ b/heartbeat/nagios
|
|
@@ -114,7 +114,7 @@ nagios_meta_data() {
|
|
<action name="start" timeout="20s" />
|
|
<action name="stop" timeout="20s" />
|
|
<action name="status" timeout="20s" />
|
|
-<action name="monitor" depth="0" timeout="20s" interval="10s" start-delay="10" />
|
|
+<action name="monitor" depth="0" timeout="20s" interval="10s" start-delay="10s" />
|
|
<action name="validate-all" timeout="20s" />
|
|
<action name="meta-data" timeout="20s" />
|
|
</actions>
|
|
diff --git a/heartbeat/sybaseASE.in b/heartbeat/sybaseASE.in
|
|
index b4809ea23..9ddd429be 100755
|
|
--- a/heartbeat/sybaseASE.in
|
|
+++ b/heartbeat/sybaseASE.in
|
|
@@ -234,8 +234,8 @@ meta_data()
|
|
<action name="monitor" interval="30s" timeout="100s" />
|
|
|
|
<!--Checks to see if we can read from the mountpoint -->
|
|
- <action name="status" depth="10" timeout="100" interval="120s" />
|
|
- <action name="monitor" depth="10" timeout="100" interval="120s" />
|
|
+ <action name="status" depth="10" timeout="100s" interval="120s" />
|
|
+ <action name="monitor" depth="10" timeout="100s" interval="120s" />
|
|
|
|
<action name="meta-data" timeout="5s" />
|
|
<action name="validate-all" timeout="5s" />
|
|
|
|
From d4bba27b171cb87698359dd300313ba5a6600cca Mon Sep 17 00:00:00 2001
|
|
From: Oyvind Albrigtsen <oalbrigt@redhat.com>
|
|
Date: Fri, 21 Sep 2018 11:34:41 +0200
|
|
Subject: [PATCH 2/4] CI: improvements
|
|
|
|
- added "check"-command to skip build-process
|
|
- added check for "s"-suffix in agents
|
|
- added additional file-types to also check ocf-* and C agents
|
|
---
|
|
ci/build.sh | 20 +++++++++++++++-----
|
|
1 file changed, 15 insertions(+), 5 deletions(-)
|
|
|
|
diff --git a/ci/build.sh b/ci/build.sh
|
|
index c331e9ab4..22f4472d3 100755
|
|
--- a/ci/build.sh
|
|
+++ b/ci/build.sh
|
|
@@ -51,7 +51,7 @@ find_prunes() {
|
|
}
|
|
|
|
find_cmd() {
|
|
- echo "find heartbeat -type f -and \( -perm /111 -or -name '*.sh' \) $(find_prunes)"
|
|
+ echo "find heartbeat -type f -and \( -perm /111 -or -name '*.sh' -or -name '*.c' -or -name '*.in' \) $(find_prunes)"
|
|
}
|
|
|
|
check_all_executables() {
|
|
@@ -59,6 +59,12 @@ check_all_executables() {
|
|
while read -r script; do
|
|
file --mime "$script" | grep 'charset=binary' >/dev/null 2>&1 && continue
|
|
file --mime "$script" | grep 'text/x-python' >/dev/null 2>&1 && continue
|
|
+ file --mime "$script" | grep 'text/x-makefile' >/dev/null 2>&1 && continue
|
|
+
|
|
+ if grep -qE "\<action.*(timeout|interval|delay)=\\\?\"[0-9]+\\\?\"" "$script"; then
|
|
+ fail "$script: \"s\"-suffix missing in timeout, interval or delay"
|
|
+ fi
|
|
+
|
|
head=$(head -n1 "$script")
|
|
[[ "$head" =~ .*ruby.* ]] && continue
|
|
[[ "$head" =~ .*zsh.* ]] && continue
|
|
@@ -67,6 +73,7 @@ check_all_executables() {
|
|
[[ "$script" =~ ^.*\.orig ]] && continue
|
|
[[ "$script" =~ ^ldirectord.in ]] && continue
|
|
check "$script"
|
|
+
|
|
done < <(eval "$(find_cmd)")
|
|
if [ $failed -gt 0 ]; then
|
|
echo "ci/build.sh: $failed failure(s) detected."
|
|
@@ -75,8 +82,11 @@ check_all_executables() {
|
|
exit 0
|
|
}
|
|
|
|
-./autogen.sh
|
|
-./configure
|
|
-make check
|
|
-[ $? -eq 0 ] || failed=$((failed + 1))
|
|
+if [ "$1" != "check" ]; then
|
|
+ ./autogen.sh
|
|
+ ./configure
|
|
+ make check
|
|
+ [ $? -eq 0 ] || failed=$((failed + 1))
|
|
+fi
|
|
+
|
|
check_all_executables
|
|
|
|
From 6c5f5442b4d03448aa585bf62f83876f667a76f8 Mon Sep 17 00:00:00 2001
|
|
From: Oyvind Albrigtsen <oalbrigt@redhat.com>
|
|
Date: Fri, 21 Sep 2018 11:41:40 +0200
|
|
Subject: [PATCH 3/4] ocf-shellfuncs: fixes caught when improving CI
|
|
|
|
---
|
|
heartbeat/ocf-shellfuncs.in | 4 ++--
|
|
1 file changed, 2 insertions(+), 2 deletions(-)
|
|
|
|
diff --git a/heartbeat/ocf-shellfuncs.in b/heartbeat/ocf-shellfuncs.in
|
|
index 8e44f09eb..043ab9bf2 100644
|
|
--- a/heartbeat/ocf-shellfuncs.in
|
|
+++ b/heartbeat/ocf-shellfuncs.in
|
|
@@ -457,7 +457,7 @@ ocf_pidfile_status() {
|
|
return 2
|
|
fi
|
|
pid=`cat $pidfile`
|
|
- kill -0 $pid 2>&1 > /dev/null
|
|
+ kill -0 $pid > /dev/null 2>&1
|
|
if [ $? = 0 ]; then
|
|
return 0
|
|
fi
|
|
@@ -761,7 +761,7 @@ maketempfile()
|
|
{
|
|
if [ $# = 1 -a "$1" = "-d" ]; then
|
|
mktemp -d
|
|
- return -0
|
|
+ return 0
|
|
elif [ $# != 0 ]; then
|
|
return 1
|
|
fi
|
|
|
|
From d1579996d6f5aec57ece2bc31b106891d0bbb964 Mon Sep 17 00:00:00 2001
|
|
From: Oyvind Albrigtsen <oalbrigt@redhat.com>
|
|
Date: Fri, 21 Sep 2018 11:50:08 +0200
|
|
Subject: [PATCH 4/4] CI: fix upstream CI not detecting MIME-format correctly
|
|
for Makefiles
|
|
|
|
---
|
|
ci/build.sh | 3 ++-
|
|
1 file changed, 2 insertions(+), 1 deletion(-)
|
|
|
|
diff --git a/ci/build.sh b/ci/build.sh
|
|
index 22f4472d3..b900ddc05 100755
|
|
--- a/ci/build.sh
|
|
+++ b/ci/build.sh
|
|
@@ -59,7 +59,8 @@ check_all_executables() {
|
|
while read -r script; do
|
|
file --mime "$script" | grep 'charset=binary' >/dev/null 2>&1 && continue
|
|
file --mime "$script" | grep 'text/x-python' >/dev/null 2>&1 && continue
|
|
- file --mime "$script" | grep 'text/x-makefile' >/dev/null 2>&1 && continue
|
|
+ # upstream CI doesnt detect MIME-format correctly for Makefiles
|
|
+ [[ "$script" =~ .*/Makefile.in ]] && continue
|
|
|
|
if grep -qE "\<action.*(timeout|interval|delay)=\\\?\"[0-9]+\\\?\"" "$script"; then
|
|
fail "$script: \"s\"-suffix missing in timeout, interval or delay"
|