From d3f9821895e9f3d4e957f6df795a95a8abdc8cb9 Mon Sep 17 00:00:00 2001 From: Balena CI Date: Mon, 5 Jun 2023 18:53:19 +0000 Subject: [PATCH] v14.11.2 --- .versionbot/CHANGELOG.yml | 52 +++++++++++++++++++++++++++++++++++++++ CHANGELOG.md | 5 ++++ VERSION | 2 +- balena.yml | 2 +- package-lock.json | 4 +-- package.json | 4 +-- 6 files changed, 63 insertions(+), 6 deletions(-) diff --git a/.versionbot/CHANGELOG.yml b/.versionbot/CHANGELOG.yml index c222f6ff..ea264914 100644 --- a/.versionbot/CHANGELOG.yml +++ b/.versionbot/CHANGELOG.yml @@ -1,3 +1,55 @@ +- commits: + - subject: Handle Engine-host race condition for "always" and "unless-stopped" + restart policy + hash: 7f3214195838a8bf3242ef7540b4487338687e4c + body: > + There exists a race condition between Engine and a host resource that + may not + + be immediately created. In this race condition, if a container's compose config + + depends on the existence of that host resource, such as a network interface, and the + + Engine tries to create & start the container before the host resource is created, the + + Engine will not reattempt to start the container, regardless of the restart policy. + + This is undesireable behavior but seems to be the behavior as implemented by Docker. + + + To rectify this, the Supervisor state funnel noops for a grace period of 1 minute + + after starting a container to see that the container's status has become 'running`. + + If the container exits because of the race condition, the status becomes 'exited' and the + + Supervisor will attempt to generate another start step. This noop-wait-start step loop + + will repeat until the container is able to start. + + + If the container is never able to start, there was a problem in the host in the creation of the + + host resource, and that should be fixed at the host level. + + + This commit does not handle the case of services with restart policies "no" or "on-failure" + + which encounter this host race, as metadata from container inspects needs to be introduced + + during step calculation in order to figure out whether services with those restart policies + + need to be started. This will be fixed in a future PR. + footer: + Change-type: patch + change-type: patch + Signed-off-by: Christina Ying Wang + signed-off-by: Christina Ying Wang + author: Christina Ying Wang + nested: [] + version: 14.11.2 + title: "" + date: 2023-06-05T18:53:18.287Z - commits: - subject: Fix `sw.arch` typo when testing contracts hash: 2758e190b28ea07d5b40daaa9e59434f2bfc28e9 diff --git a/CHANGELOG.md b/CHANGELOG.md index a6c33547..8fd28de6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,11 @@ All notable changes to this project will be documented in this file automatically by Versionist. DO NOT EDIT THIS FILE MANUALLY! This project adheres to [Semantic Versioning](http://semver.org/). +# v14.11.2 +## (2023-06-05) + +* Handle Engine-host race condition for "always" and "unless-stopped" restart policy [Christina Ying Wang] + # v14.11.1 ## (2023-05-11) diff --git a/VERSION b/VERSION index 20895471..8b6bf530 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -14.11.1 \ No newline at end of file +14.11.2 \ No newline at end of file diff --git a/balena.yml b/balena.yml index 2dea047a..535a65b3 100644 --- a/balena.yml +++ b/balena.yml @@ -2,6 +2,6 @@ name: balena-supervisor description: 'Balena Supervisor: balena''s agent on devices.' joinable: false type: sw.application -version: 14.11.1 +version: 14.11.2 provides: - slug: sw.compose.long-volume-syntax diff --git a/package-lock.json b/package-lock.json index da5d0cbd..72dde34d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "balena-supervisor", - "version": "14.11.1", + "version": "14.11.2", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "balena-supervisor", - "version": "14.11.1", + "version": "14.11.2", "license": "Apache-2.0", "dependencies": { "@balena/happy-eyeballs": "0.0.6", diff --git a/package.json b/package.json index e6503ebf..12e63811 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "balena-supervisor", "description": "This is balena's Supervisor, a program that runs on IoT devices and has the task of running user Apps (which are Docker containers), and updating them as the balena API informs it to.", - "version": "14.11.1", + "version": "14.11.2", "license": "Apache-2.0", "repository": { "type": "git", @@ -146,6 +146,6 @@ } }, "versionist": { - "publishedAt": "2023-05-11T22:07:33.587Z" + "publishedAt": "2023-06-05T18:53:18.956Z" } }