Robust maas-rack readiness probe
With the existing readiness probe mechanism, if log rotation occurs then it may lead maas rack pod to show false not ready. Instead save the success message of rack registration to a file and then use it in the readiness probe. Change-Id: I569b99186d398db44a10824dc3fe8c745b13a4ac
This commit is contained in:
parent
0a8b01bb72
commit
1e035afc2c
|
@ -20,6 +20,7 @@ register_maas_rack() {
|
|||
if maas-rack register --url="${MAAS_ENDPOINT}" --secret="${MAAS_REGION_SECRET}";
|
||||
then
|
||||
echo "Successfully registered with MaaS Region Controller"
|
||||
touch '/tmp/maas-rack.done'
|
||||
break
|
||||
else
|
||||
echo "Unable to register with ${MAAS_ENDPOINT}... will try again"
|
||||
|
|
|
@ -99,9 +99,8 @@ spec:
|
|||
timeoutSeconds: 60
|
||||
exec:
|
||||
command:
|
||||
- /bin/bash
|
||||
- -c
|
||||
- journalctl -u register-rack-controller -n 5 | grep -q 'Successfully registered with MaaS Region Controller'
|
||||
- ls
|
||||
- /tmp/maas-rack.done
|
||||
volumeMounts:
|
||||
- mountPath: /sys/fs/cgroup
|
||||
name: host-sys-fs-cgroup
|
||||
|
|
Loading…
Reference in New Issue