From 257d1fc46d8218a822e13ef16466c002bb64e73d Mon Sep 17 00:00:00 2001 From: Zev Weiss Date: Wed, 20 May 2020 17:14:10 -0500 Subject: [PATCH] cli: add top-level retry loop. We've been hitting some intermittent crashes of the following form recently: Traceback (most recent call last): File "/usr/local/bin/packet-networking", line 11, in sys.exit(cli()) File "/usr/local/lib/python3.5/dist-packages/click/core.py", line 722, in __call__ return self.main(*args, **kwargs) File "/usr/local/lib/python3.5/dist-packages/click/core.py", line 697, in main rv = self.invoke(ctx) File "/usr/local/lib/python3.5/dist-packages/click/core.py", line 895, in invoke return ctx.invoke(self.callback, **ctx.params) File "/usr/local/lib/python3.5/dist-packages/click/core.py", line 535, in invoke return callback(*args, **kwargs) File "/usr/local/lib/python3.5/dist-packages/packetnetworking/cli.py", line 107, in cli tasks = builder.run(rootfs) File "/usr/local/lib/python3.5/dist-packages/packetnetworking/builder.py", line 67, in run return builder.run(rootfs_path) File "/usr/local/lib/python3.5/dist-packages/packetnetworking/distros/distro_builder.py", line 163, in run rendered_tasks = self.render() File "/usr/local/lib/python3.5/dist-packages/packetnetworking/distros/distro_builder.py", line 156, in render rendered_tasks[path] = template.render(self.context()) File "/usr/local/lib/python3.5/dist-packages/jinja2/environment.py", line 1008, in render return self.environment.handle_exception(exc_info, True) File "/usr/local/lib/python3.5/dist-packages/jinja2/environment.py", line 780, in handle_exception reraise(exc_type, exc_value, tb) File "/usr/local/lib/python3.5/dist-packages/jinja2/_compat.py", line 37, in reraise raise value.with_traceback(tb) File "