Wrap ntpdate to timeout

As have some problems with retry hanging ntpdate outside,
wrap it to timeout with preserve status to better exit code
manage.

Change-Id: If2967106ef7267a454ca012a444eeda9b7c05793
Closes-Bug: #1533082
This commit is contained in:
Stanislaw Bogatkin 2016-01-21 15:02:43 +03:00
parent ab7476669b
commit 6b477d5ea7

View File

@ -226,7 +226,7 @@
requires: [pre_deployment_start]
required_for: [pre_deployment_end]
parameters:
cmd: ntpdate -u -v -s $(awk '/^server/ { if ($2 !~ /127\.127\.[0-9]+\.[0-9]+/) {ORS=" "; print $2}}' /etc/ntp.conf)
cmd: timeout --foreground --preserve-status 30 ntpdate -u -v -s $(awk '/^server/ { if ($2 !~ /127\.127\.[0-9]+\.[0-9]+/) {ORS=" "; print $2}}' /etc/ntp.conf)
retries: 10
interval: 30
timeout: 180