Actually disable the pvcapid service

Prevents it from trying to start itself during updates or reboots on
non-primary coordinators.
This commit is contained in:
Joshua Boniface 2021-06-14 17:13:22 -04:00
parent 0a9c0c1ccb
commit 08dc756549
1 changed files with 2 additions and 0 deletions

View File

@ -503,6 +503,7 @@ class NodeInstance(object):
# 6. Start client API (and provisioner worker)
if self.config['enable_api']:
self.logger.out('Starting PVC API client service', state='i')
common.run_os_command("systemctl enable pvcapid.service")
common.run_os_command("systemctl start pvcapid.service")
self.logger.out('Starting PVC Provisioner Worker service', state='i')
common.run_os_command("systemctl start pvcapid-worker.service")
@ -567,6 +568,7 @@ class NodeInstance(object):
if self.config['enable_api']:
self.logger.out('Stopping PVC API client service', state='i')
common.run_os_command("systemctl stop pvcapid.service")
common.run_os_command("systemctl disable pvcapid.service")
# 4. Stop metadata API
self.metadata_api.stop()
time.sleep(0.1) # Time fir new writer to acquire the lock