@norskvideo/ctl-dev-kit 0.1.65 → 0.1.66
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/conventions/smoke.yml +32 -22
- package/package.json +1 -1
package/conventions/smoke.yml
CHANGED
|
@@ -102,37 +102,47 @@ jobs:
|
|
|
102
102
|
# gracefully, and this workflow cancels its own superseded runs -- a killed
|
|
103
103
|
# daemon reaps nothing and the port stays held for every later job here.
|
|
104
104
|
#
|
|
105
|
-
# On 2026-08-30 something held it on
|
|
105
|
+
# On 2026-08-30 something held it on ar-arm-vm from 11:18 to ~16:00 and
|
|
106
106
|
# took out the next nine smoke and integration jobs across four repos.
|
|
107
107
|
# What held it was never established: the job that last bound it PASSED
|
|
108
|
-
# and shut down cleanly,
|
|
109
|
-
#
|
|
110
|
-
# "already allocated"
|
|
111
|
-
#
|
|
112
|
-
# occurrence as much of a mystery as this one.
|
|
108
|
+
# and shut down cleanly, and every add-path failure already removes its
|
|
109
|
+
# own container -- so the holder may not have been a control plane at all.
|
|
110
|
+
# "already allocated" is also what a dangling endpoint or a stranded
|
|
111
|
+
# docker-proxy reports after an unclean removal.
|
|
113
112
|
#
|
|
114
|
-
#
|
|
115
|
-
#
|
|
116
|
-
#
|
|
113
|
+
# Hence: kill by PORT rather than by name, prune the endpoints a removal
|
|
114
|
+
# can strand, and then PROVE the port binds instead of assuming it. This
|
|
115
|
+
# branch only runs where the docker daemon is this runner's own and jobs
|
|
116
|
+
# are serial, so there is nothing else here to protect. The GPU box runs
|
|
117
|
+
# several runners as sibling CONTAINERS against one host daemon and is
|
|
118
|
+
# excluded -- there, a blanket reap would kill a concurrent job.
|
|
117
119
|
- name: Reap a stranded product control plane
|
|
118
120
|
if: ${{ env.NORSK_RUNNER_OWNS_DOCKER == 'true' }}
|
|
119
121
|
run: |
|
|
120
122
|
set -uo pipefail
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
123
|
+
port=14321
|
|
124
|
+
bindable() { docker run --rm -p "127.0.0.1:$port:1" alpine true >/dev/null 2>&1; }
|
|
125
|
+
|
|
126
|
+
held="$(docker ps -a --filter "publish=$port" --format '{{.Names}} {{.Status}} {{.Image}}')"
|
|
127
|
+
if [ -n "$held" ]; then
|
|
128
|
+
echo "::warning::$port was held on entry by: $held"
|
|
129
|
+
docker rm -f $(docker ps -aq --filter "publish=$port") || true
|
|
126
130
|
fi
|
|
127
|
-
#
|
|
128
|
-
#
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
131
|
+
# A control plane that is stopped, or one whose publish docker no
|
|
132
|
+
# longer reports, still gets removed: nothing here outlives a job.
|
|
133
|
+
leftover="$(docker ps -aq --filter 'name=^norsk-product-')"
|
|
134
|
+
[ -z "$leftover" ] || docker rm -f $leftover || true
|
|
135
|
+
|
|
136
|
+
if ! bindable; then
|
|
137
|
+
echo "::warning::$port still not bindable after removing containers -- pruning dangling endpoints"
|
|
138
|
+
docker network prune -f || true
|
|
139
|
+
fi
|
|
140
|
+
if ! bindable; then
|
|
141
|
+
echo "::error::cannot bind 127.0.0.1:$port; the journey would fail later and more obscurely"
|
|
142
|
+
docker ps -a --filter "publish=$port" || true
|
|
143
|
+
exit 1
|
|
135
144
|
fi
|
|
145
|
+
echo "$port is bindable"
|
|
136
146
|
|
|
137
147
|
- name: Write the Norsk license (from the org secret)
|
|
138
148
|
env:
|