mirror of
https://github.com/floci-io/floci.git
synced 2026-11-24 22:37:55 -05:00
Floci's shutdown removes every broker container, and nothing started them again, so after a restart with persistent storage a broker still reported RUNNING while nothing answered on its endpoints. A new container would not have helped either: RabbitMQ keeps its data under the node name, which defaults to the hostname Docker sets to the container id, so a new container on the same volume started an empty node without the broker's users. Broker containers now run as the fixed node name rabbit@localhost. At startup, each broker that was RUNNING or still starting goes back to CREATION_IN_PROGRESS, and its container starts in the background. A container that outlived Floci is kept when it still answers. Otherwise the broker gets a new container on its volume, without seeding the admin user, whose password is never stored, and on the host ports it had when they are free. The readiness poller reports it RUNNING once the console it probed answers. A broker from before fixed node names with no surviving container is reported CREATION_FAILED. One whose restore fails is reported CREATION_FAILED and tried again at the next start, one CreateBroker failed for is left as it is, and one a crash left DELETION_IN_PROGRESS is deleted. Part of #5664.