Files
cozystack/docs
Myasnikov Daniil bb82696a2b docs(platform): keep NODE and NODE_IP in scope past the subshell
The previous round wrapped the cgroup check in ( ... ) so that
set -eu and the exit in the QoS case could not take an
interactive shell down with them. That also moved the POD_UID,
NODE and NODE_IP assignments into the subshell, while two later
uses stayed outside it: the talosctl ls fence and the kubectl
debug node/$NODE sentence. Both expanded empty.

Hoist the three lookups back to the top level and keep the
subshell around the part that needs it. Guard the values
explicitly rather than relying on set -e, which never covered
this case either: kubectl get -o jsonpath exits zero and prints
nothing when the field is absent, which is the ordinary state
of an unscheduled pod, so the old form ran talosctl -n with an
empty address.

The QoS case and the cgroup path are unchanged. Verified
against stubbed kubectl and talosctl that all four branches
render the same argv as before and that both later uses now
expand.

Assisted-By: Claude <noreply@anthropic.com>
Signed-off-by: Myasnikov Daniil <myasnikovdaniil2001@gmail.com>
2026-08-19 16:25:11 +05:00
..
2026-08-05 10:04:43 +00:00