Discard time-sync for some envs

If env is not Fuel, we can't know slaves IPs,
that is why we should not start time-sync procedure.

Change-Id: I15770841ee1c886544cc734ee1ff1674ce2aa3af
Closes-Bug: 1609006
This commit is contained in:
Dmitry Belyaninov 2017-02-17 12:26:25 +00:00
parent cf84272a14
commit 891559577e
1 changed files with 3 additions and 0 deletions

View File

@ -159,6 +159,9 @@ class Shell(object):
print(' '.join(slave_ips))
def do_time_sync(self):
if not self.env.has_admin():
print('There is no FuelAdmin node. It is impossible to sync time')
return
node_name = self.params.node_name
node_names = [node_name] if node_name else None
cur_time = self.env.get_curr_time(node_names)