Fix problem with create cluster w/o internet

If cluster created on lab without internet connection then cluster
creation failed

Change-Id: I108b37c3aa15119ca443f20bfd1bb8c7d990f0e9
Closes-bug: #1496364
This commit is contained in:
Sergey Reshetnyak 2015-09-16 14:54:50 +03:00
parent ea993f12c2
commit 7c435451f0

View File

@ -88,7 +88,10 @@ def _configure_ntp_on_instance(instance, url):
"/etc/ntp.conf", "server {url}".format(url=url),
run_as_root=True)
_restart_ntp(r)
_sudo(r, "ntpdate -u {url}".format(url=url))
try:
_sudo(r, "ntpdate -u {url}".format(url=url))
except Exception as e:
LOG.debug("Update time on VM failed with error: %s", e)
LOG.info(_LI("NTP successfully configured"))