rancher / k3os

Purpose-built OS for Kubernetes, fully managed by Kubernetes.
https://k3os.io
Apache License 2.0
3.5k stars 403 forks source link

k3os config.yaml skips subsequent run_cmd steps after command failure #630

Open dsb3 opened 3 years ago

dsb3 commented 3 years ago

Version (k3OS / kernel)

k3os version 0.11.1

Architecture

x86_64

Describe the bug

If multiple commands are given to run_cmd: in k3os' config.yaml, processing stops after/if a command fails.

To Reproduce

... run_cmd:

Expected behavior

Both echo commands should print to screen.

Actual behavior

Only the first gets printed; the commands after /bin/false are skipped.

Additional context

dweomer commented 3 years ago

The simple work-around to to ensure your commands always return 0, e.g.:

run_cmd:
- /bin/false || /bin/true
dsb3 commented 3 years ago

That's a great workaround, and one I've used before in other places.

But - if it's expected to be used, can I suggest the docs say as much, and more importantly the boot sequence should indicate that commands are being skipped.