mirror of
https://github.com/cozystack/cozystack.git
synced 2026-11-09 14:02:56 +09:00
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>