pull swarm closures through the nix daemon: substituters in the fragment, merged root-only netrc
This commit is contained in:
parent
63ae5d6cbf
commit
ef68baa00f
1 changed files with 582 additions and 382 deletions
|
|
@ -26,13 +26,17 @@ cat >"$dir/bin/systemctl" <<STUB
|
|||
args=" \$* "
|
||||
case "\$args" in
|
||||
*" show "*) printf '%s\n' "\$STARTED" ;;
|
||||
*" is-active "*) [ "\$ACTIVE" = 1 ] ;;
|
||||
*" is-active "*)
|
||||
case "\$args" in
|
||||
*" container@"*) [ "\$ACTIVE" = 1 ] ;;
|
||||
*) [ "\$UNIT_ACTIVE" = 1 ] ;;
|
||||
esac ;;
|
||||
*" is-failed "*) [ "\$FAILED" = 1 ] ;;
|
||||
*) printf '%s\n' "\$*" >>"$calls" ;;
|
||||
esac
|
||||
STUB
|
||||
chmod +x "$dir/bin/systemctl"
|
||||
export PATH="$dir/bin:$PATH" ACTIVE=1 FAILED=0 STARTED=
|
||||
export PATH="$dir/bin:$PATH" ACTIVE=1 UNIT_ACTIVE=1 FAILED=0 STARTED=
|
||||
|
||||
export LC_ALL=de_DE.UTF-8
|
||||
|
||||
|
|
@ -106,10 +110,21 @@ check "a failed unit is reset and started" \
|
|||
refresh_unit gitea-runner-swarm.service "$path"
|
||||
FAILED=0
|
||||
|
||||
STARTED=$(systemd_ts 1791232888.193158)
|
||||
got=$(refresh_unit gitea-runner-swarm.service "$path" 2>&1)
|
||||
case="control: a running unit is said to be restarted"
|
||||
count=$((count + 1))
|
||||
if [ "$got" != "$path changed after gitea-runner-swarm.service last started — restarting it" ]; then fail "logged: $got"; fi
|
||||
|
||||
STARTED=
|
||||
check "a unit never active is restarted" \
|
||||
"try-restart --no-block gitea-runner-swarm.service" "" \
|
||||
UNIT_ACTIVE=0
|
||||
check "a unit never active is not asked to restart" "" "" \
|
||||
refresh_unit gitea-runner-swarm.service "$path"
|
||||
got=$(refresh_unit gitea-runner-swarm.service "$path" 2>&1)
|
||||
case="a unit never active is not said to be restarted"
|
||||
count=$((count + 1))
|
||||
if [ -n "$got" ]; then fail "logged: $got"; fi
|
||||
UNIT_ACTIVE=1
|
||||
|
||||
ACTIVE=0
|
||||
check "nothing while the container is down" "" "" \
|
||||
|
|
|
|||
Loading…
Reference in a new issue