Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
QA
ox-installer
Commits
b765a327
Commit
b765a327
authored
Aug 21, 2020
by
benedikt.kroening
Browse files
Using health-check endpoint from middleware for readiness checks
parent
09b1cc7a
Changes
4
Hide whitespace changes
Inline
Side-by-side
config/middleware/20_init_middleware.sh
View file @
b765a327
...
@@ -53,7 +53,7 @@ if [ ! -f ${INIT_STATE_FILE} ]; then
...
@@ -53,7 +53,7 @@ if [ ! -f ${INIT_STATE_FILE} ]; then
restartService open-xchange
restartService open-xchange
sleep
10
sleep
10
wait
Port localhost 8009
wait
TillAppsuiteReady
# setting propper filestore permissions ...
# setting propper filestore permissions ...
mkdir
-p
/var/opt/filestore
mkdir
-p
/var/opt/filestore
...
...
config/middleware/90_init_check-restart.sh
View file @
b765a327
...
@@ -81,7 +81,6 @@ if [ -f "/opt/open-xchange/etc/000-ox-restart-required" ]; then
...
@@ -81,7 +81,6 @@ if [ -f "/opt/open-xchange/etc/000-ox-restart-required" ]; then
rm
-f
/opt/open-xchange/etc/000-ox-restart-required
rm
-f
/opt/open-xchange/etc/000-ox-restart-required
echo
""
echo
""
waitPort localhost 8009
waitTillAppsuiteReady
waitTillAppsuiteReady
echo
"Trying to execute all updates tasks ..."
echo
"Trying to execute all updates tasks ..."
...
...
features/guard.sh
View file @
b765a327
...
@@ -266,8 +266,7 @@ if [[ "${GUARD_ENABLE}" = true ]]; then
...
@@ -266,8 +266,7 @@ if [[ "${GUARD_ENABLE}" = true ]]; then
fi
fi
if
[[
"
${
GUARD_BACKEND
}
"
=
true
]]
;
then
if
[[
"
${
GUARD_BACKEND
}
"
=
true
]]
;
then
waitPort localhost 8009
wwaitTillAppsuiteReady
waitTillAppsuiteReady
/opt/open-xchange/sbin/runallupdate
-A
${
OX_ADMINMASTER_USER
}
-P
${
OX_ADMINMASTER_PASS
}
/opt/open-xchange/sbin/runallupdate
-A
${
OX_ADMINMASTER_USER
}
-P
${
OX_ADMINMASTER_PASS
}
...
...
lib/common.bash
View file @
b765a327
...
@@ -298,31 +298,13 @@ function exportProperties {
...
@@ -298,31 +298,13 @@ function exportProperties {
function waitTillAppsuiteReady {
function waitTillAppsuiteReady {
set +e
set +e
echo -n "
Waiting
for
service re-start
(
max. 240 seconds
)
.
"
echo "
Waiting till App Suite health checker returns 200 ...
"
y=0
timeout 300 bash -c 'while [[ "
$(
curl
-s
-o
/dev/null
-w
''
%
{
http_code
}
''
localhost:8009/health
)
" != "
200
" ]]; do echo "
.
" && sleep 5; done' || false
while [[
${
y
}
-lt 24 ]]; do
/opt/open-xchange/sbin/allpluginsloaded > /dev/null 2>&1
if [[
$?
-ne 0 ]]; then
echo "
.
"
sleep 10
y=
$((
y+1
))
else
echo "
done
.
"
break
fi
done
if [[
${
y
}
-ge 48 ]]; then
echo ""
echo ""
echo "
/!
\\
Reached timeout. Please check manually why bundles refused to start /!
\\
"
echo "
/!
\\
For example by running
${
AS_BIN
}
listbundles /!
\\
"
echo ""
echo ""
fi
set -e
set -e
}
}
function loadConfig {
function loadConfig {
# temporary enabling extended shell debugging to retrieve functions definition location - in this case myself ...
# temporary enabling extended shell debugging to retrieve functions definition location - in this case myself ...
if [[ -z "
$INSTALLER_ROOT
" ]] ; then
if [[ -z "
$INSTALLER_ROOT
" ]] ; then
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment