Floci's shutdown removed every DocumentDB cluster's MongoDB container
and nothing started them again, so after a restart with persistent
storage a cluster reported available with nothing behind its endpoint.
At startup each cluster now reports maintenance, and its instances
starting, and its container comes back in the background on the volume
the cluster's data is kept in, with the master password the data was
set up with. Floci now keeps that password in the cluster's record,
never returned by the API, since a snapshot authenticates with it. The
cluster and its instances then report the new container's port and
available. With no Docker daemon reachable they come back available
with no container, as a cluster created then does. A cluster whose
container does not start is left with none and its instances failed,
and is tried again at the next start. The restore runs in each
cluster's own account and Region.
A cluster recorded before Floci kept the master password reads it from
the container it left, if one is there, and keeps it in its record
before that container is replaced; with none left it cannot be started,
and the restore says to create it again. One recorded before
its data was kept in a volume gets a new volume, kept in its record
before any Docker call.
Marking the clusters calls no Docker; the containers, and the removal
of a delete Floci did not live to finish, are all in the background.
A DeleteDBCluster during the restore leaves the cluster deleting until
its container has started, a second one too, and the restore removes it
then; one still deleting at the next start is removed then. The restore
applies its result only to the cluster it marked. CreateDBInstance is
refused with InvalidDBClusterStateFault for a cluster that is not
available, as RDS refuses it, so a deferred delete leaves no instance
behind. Shutdown now marks the
container manager first, after which no container starts, and a start
it overtakes removes its container.
Part of #5664.