From 7c435451f081f851e08152a5a9c1b361cb970e7c Mon Sep 17 00:00:00 2001 From: Sergey Reshetnyak Date: Wed, 16 Sep 2015 14:54:50 +0300 Subject: [PATCH] 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 --- sahara/service/ntp_service.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/sahara/service/ntp_service.py b/sahara/service/ntp_service.py index fcc0af4e..5e4d36d7 100644 --- a/sahara/service/ntp_service.py +++ b/sahara/service/ntp_service.py @@ -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"))