Reorder starting clients

This commit is contained in:
Joshua Boniface 2019-12-12 23:03:34 -05:00
parent b854d53fab
commit c1b6ce0ff7
1 changed files with 9 additions and 7 deletions

View File

@ -288,13 +288,6 @@ class NodeInstance(object):
for network in self.d_network:
self.d_network[network].createGateways()
self.d_network[network].startDHCPServer()
if self.config['enable_api']:
self.logger.out('Starting PVC API client service', state='i')
common.run_os_command("systemctl start pvc-api.service")
if self.config['enable_provisioner']:
self.logger.out('Starting PVC Provisioner service', state='i')
common.run_os_command("systemctl start pvc-provisioner-worker.service")
common.run_os_command("systemctl start pvc-provisioner.service")
time.sleep(1)
# Switch Patroni leader to the local instance
@ -330,6 +323,15 @@ class NodeInstance(object):
time.sleep(1)
self.dns_aggregator.start_aggregator()
# Start the clients
if self.config['enable_api']:
self.logger.out('Starting PVC API client service', state='i')
common.run_os_command("systemctl start pvc-api.service")
if self.config['enable_provisioner']:
self.logger.out('Starting PVC Provisioner service', state='i')
common.run_os_command("systemctl start pvc-provisioner-worker.service")
common.run_os_command("systemctl start pvc-provisioner.service")
def createFloatingAddresses(self):
# VNI floating IP
self.logger.out(