diff --git a/node-daemon/pvcd/NodeInstance.py b/node-daemon/pvcd/NodeInstance.py index e2e4f081..2ba41c87 100644 --- a/node-daemon/pvcd/NodeInstance.py +++ b/node-daemon/pvcd/NodeInstance.py @@ -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(