mirror of
https://github.com/floci-io/floci.git
synced 2026-12-03 18:18:02 -05:00
A k3s node whose container exited without Floci stopping it (k3s crashing, say) stayed stopped until Floci restarted, and a container started again outside Floci had none of its attached EBS volumes' devices, so their mounts failed. Floci now watches each node container, as it watches an EC2 instance's, adopts one that exited again as a restart adopts it, and makes its volumes' devices again. Once its API server answers, the readiness poller sets it up and finalizes it as it does a replaced node, so the link-local metadata and Pod Identity addresses, the VPC routes and the log follower are made again in the started container. A node that exits more than three times within ten minutes is left stopped. The exit goes to EksService, as EC2 hands a guest's shutdown to Ec2Service, and EksService starts the node again under the cluster's capacity lock, which DeleteCluster and the first node group's replacement hold, so an exit handled while the cluster is deleted, or once it is gone, leaves the node stopped. Each restart has its own number that the poller clears only once it finalized that one, so a restart during the finalize is kept, and deleting a cluster forgets its restarts. The node restart Docker test's volume helper image is prefetched under its own class name.