Fail the setup if we can't connect to VPP; exit the daemon with non-zero value to force restart by systemd
This commit is contained in:
@ -38,7 +38,9 @@ class Agent(object):
|
|||||||
|
|
||||||
def run(self):
|
def run(self):
|
||||||
self.logger.info('Calling setup')
|
self.logger.info('Calling setup')
|
||||||
self.setup()
|
if not self.setup():
|
||||||
|
self.logger.error('Setup failed - exiting')
|
||||||
|
return
|
||||||
|
|
||||||
self.logger.info('Initial update')
|
self.logger.info('Initial update')
|
||||||
self._update()
|
self._update()
|
||||||
|
@ -238,5 +238,7 @@ def main():
|
|||||||
except KeyboardInterrupt:
|
except KeyboardInterrupt:
|
||||||
a.stop()
|
a.stop()
|
||||||
|
|
||||||
|
sys.exit(-1)
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
main()
|
main()
|
||||||
|
Reference in New Issue
Block a user