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