mirror of
https://github.com/floci-io/floci.git
synced 2026-12-01 09:22:49 -05:00
fix(opensearch): start domain containers again when Floci restarts (#9434)
Floci's shutdown removes every OpenSearch domain's container, and nothing started them again, so after a restart with persistent storage a domain reported an endpoint nothing answered on. At startup, each domain goes back to Processing, and its container comes back in the background. A container that outlived Floci, kept running across the shutdown or left behind by a killed Floci, is kept: found by the container ID the record names, started again if it stopped, and its host port reserved again. Otherwise the domain gets a new container on the data it kept, so its indices are back, and the readiness poller reports it ready once it answers. A domain started again keeps the storage its record names, whatever the data-volume setting says then: the operator's volume, or bind-mounted directory, whose path the record now keeps, or its own Floci-managed volume. With no Docker daemon reachable, a domain has no container, as one created then has. A domain deleted during its restore reads Deleted, keeps its name, and is removed with its container and data once the restore's start is through; one still Deleted at the next start is removed then. Each removal is confirmed with Docker, and deleting again a domain whose delete Docker kept the container of confirms it the same way, one retry at a time, on the record still stored. A start that shutdown overtakes removes its container. Part of #5664.
This commit is contained in:
1 parent
93cab8398d
commit
c843dcbdfc
11 files changed
+1261
-12
No files matched your search
@@ -77,7 +77,8 @@ starts ContainerHostNetworkDockerIntegrationTest ContainerBindDirectoryDockerInt
|
||||
EcsExecChannelDockerIntegrationTest EcsImagePullDockerIntegrationTest EcsLeftoverContainersDockerIntegrationTest \
|
||||
BatchDockerRunnerDockerIntegrationTest SageMakerDockerNightlyIntegrationTest DockerPoolSaturationNightlyIntegrationTest \
|
||||
&& [ -n "$BUSYBOX_IMAGE" ] && pull "$BUSYBOX_IMAGE"
|
||||
# Bind-directory ownership uses the default OpenSearch image, whose cold pull can outlast a test.
|
||||
# Bind-directory ownership uses the default OpenSearch image, whose cold pull can outlast a test, and the nightly
|
||||
# OpenSearchDomainRestartNightlyIntegrationTest runs a domain on it.
|
||||
OPENSEARCH_VERSIONS="$(find src/main/java -name OpenSearchVersions.java -print -quit)"
|
||||
opensearch_default_image() {
|
||||
file="${OPENSEARCH_VERSIONS:-/dev/null}"
|
||||
@@ -91,7 +92,8 @@ opensearch_default_image() {
|
||||
echo "$image"
|
||||
}
|
||||
OPENSEARCH_IMAGE="$(opensearch_default_image)"
|
||||
starts ContainerBindDirectoryDockerIntegrationTest && [ -n "$OPENSEARCH_IMAGE" ] && pull "$OPENSEARCH_IMAGE"
|
||||
starts ContainerBindDirectoryDockerIntegrationTest OpenSearchDomainRestartNightlyIntegrationTest \
|
||||
&& [ -n "$OPENSEARCH_IMAGE" ] && pull "$OPENSEARCH_IMAGE"
|
||||
# EcsImagePullDockerIntegrationTest runs its own registry to move a tag in; the /ecr/ line below
|
||||
# covers the shards that run the ECR tests.
|
||||
REGISTRY_IMAGE="$(test_image REGISTRY)"
|
||||
|
||||
Reference in new issue
Block a user