Links
- used in https://github.com/openshift/oc/blob/a4a051198b64f2e8bbfe9fc08c9a2728c7628e0e/pkg/cli/admin/mustgather/mustgather.go#L543
- trap docs https://linuxhint.com/bash_trap_command/
- colon meaning (true/pass, but preserves context) https://stackoverflow.com/questions/3224878/what-is-the-purpose-of-the-colon-gnu-bash-builtin
Notes
Asked Maciej S. and Luiz S. (author of that part of code). The trap does allows more reliable and faster kill of the copy container (: is just a no-op)..
Got recommendations:
- ensure rsync is installed on the image (it is) to allow use it on oc rsync data gather cmd
- try execute manual rsync from the copy container (
oc rsync must-gather-8vmfg:/must-gather . -n openshift-must-gather-5nqkj
worked)
Need investigate why the progress hang up, but some irregular behavior was known to Luiz from the past.