cloud/shepherd/equinix: implement recoverer
This implements basic recovery functionality for 'stuck' agents. The
shepherd will notice machines with a agent that either never sent a
heartbeat, or stopped sending heartbeats, and will remove their agent
started tags and reboot the machine. Then, the main agent start logic
should kick in again.
More complex recovery flows can be implemented later, this will do for
now.
Change-Id: I2c1b0d0465e4e302cdecce950a041581c2dc8548
Reviewed-on: https://review.monogon.dev/c/monogon/+/1560
Tested-by: Jenkins CI
Reviewed-by: Tim Windelschmidt <tim@monogon.tech>
diff --git a/cloud/shepherd/equinix/manager/BUILD.bazel b/cloud/shepherd/equinix/manager/BUILD.bazel
index d6554e0..a4e5255 100644
--- a/cloud/shepherd/equinix/manager/BUILD.bazel
+++ b/cloud/shepherd/equinix/manager/BUILD.bazel
@@ -7,6 +7,7 @@
"initializer.go",
"manager.go",
"provisioner.go",
+ "recoverer.go",
"shared_config.go",
"ssh.go",
],
@@ -36,6 +37,7 @@
"fakequinix_test.go",
"initializer_test.go",
"provisioner_test.go",
+ "recoverer_test.go",
],
data = [
"//cloud/shepherd/equinix/manager/test_agent",