diff --git a/.github/workflows/dependabot-plus-plus.yml b/.github/workflows/dependabot-plus-plus.yml index 6062af4..5b91cd7 100644 --- a/.github/workflows/dependabot-plus-plus.yml +++ b/.github/workflows/dependabot-plus-plus.yml @@ -18,7 +18,7 @@ jobs: - uses: actions/checkout@v7 - name: Install uv - uses: astral-sh/setup-uv@1c37ad07a6a961277cf70c0d37d6f313000f5884 # v10.3.0 + uses: techcode-io/github-actions/setup-uv@setup-uv/v1 - name: Upgrade versions id: upgrade @@ -36,7 +36,7 @@ jobs: - name: Create Pull Request if: steps.upgrade.outputs.has_changes == 'true' - uses: peter-evans/create-pull-request@v8 + uses: techcode-io/github-actions/create-pull-request@create-pull-request/v1 with: token: ${{ secrets.GITHUB_TOKEN }} commit-message: | diff --git a/.github/workflows/env-install/action.yml b/.github/workflows/env-install/action.yml index 103f6be..e397bd6 100644 --- a/.github/workflows/env-install/action.yml +++ b/.github/workflows/env-install/action.yml @@ -5,7 +5,7 @@ runs: using: "composite" steps: - name: Install uv - uses: astral-sh/setup-uv@1c37ad07a6a961277cf70c0d37d6f313000f5884 #v10.3.0 + uses: techcode-io/github-actions/setup-uv@setup-uv/v1 - name: Install dependencies run: | diff --git a/src/etc/s6/boot/stage3 b/src/etc/s6/boot/stage3 index 44d9701..fad1368 100755 --- a/src/etc/s6/boot/stage3 +++ b/src/etc/s6/boot/stage3 @@ -20,8 +20,13 @@ foreground { importas -D 16000 -u IGNITY_SERVICES_GRACETIME IGNITY_SERVICES_GRACETIME # s6-svwait -t 0 waits forever: a grace time of 0 means do not wait if { eltest ${IGNITY_SERVICES_GRACETIME} -gt 0 } - elglob SERVICES /run/ignity/services-state/* - foreground { s6-svwait -D -t ${IGNITY_SERVICES_GRACETIME} ${SERVICES} } + # No service: nothing to wait for, the pattern must not reach s6-svwait + elglob -0 SERVICES /run/ignity/services-state/* + foreground { + forx -p d { ${SERVICES} } + importas -ui d d + s6-svwait -D -t ${IGNITY_SERVICES_GRACETIME} ${d} + } s6-sleep -m 200 } diff --git a/tests/test_boot.py b/tests/test_boot.py index f1254c1..e24546c 100644 --- a/tests/test_boot.py +++ b/tests/test_boot.py @@ -173,3 +173,9 @@ def test_accounts_never_duplicate_an_existing_id(image): assert result.returncode == 0, result.stdout + result.stderr assert "/accounts/passwd:0" in result.stdout assert "/accounts/group:0" in result.stdout + + +def test_shutdown_without_services_is_clean(image): + result = run_in_container(image, "true") + assert result.returncode == 0 + assert "s6-svwait" not in result.stderr diff --git a/tests/test_services.py b/tests/test_services.py index 8c50f06..87ff39b 100644 --- a/tests/test_services.py +++ b/tests/test_services.py @@ -26,3 +26,9 @@ def test_no_start_at_runtime_can_be_started(image): cmd = "rm -f /run/ignity/services-state/no-start-at-runtime/down && s6-svc -u /run/ignity/services-state/no-start-at-runtime && sleep 1" result = run_in_container(image, cmd) assert "no-start service at runtime" in result.stdout + + +def test_shutdown_waits_for_services(image): + result = run_in_container(image, "true") + assert result.returncode == 0 + assert "s6-svwait" not in result.stderr