Niels de Vos 2673a0b97a ci: prevent ERR trap inheritance for kubectl_retry
`bash -E` causes inheritance of the ERR trap into shell functions,
command substitutions, and commands executed in a subshell environment.
Because the `kubectl_retry` function depends on detection an error of a
subshell, the ERR trap is not needed to be executed. The trap contains
extra logging, and exits the script in the `rook.sh` case. The aborting
of the script is not wanted when a retry is expected to be done.

While checking for known failures, the `grep` command may exit with 1,
if there are no matches. That means, the `ret` variable will be set to
0, but there will also be an error exit status. This causes `bash -E` to
abort the function, and call the ERR trap.

Signed-off-by: Niels de Vos <ndevos@redhat.com>
(cherry picked from commit 4891e534d33b373aa63922e54e51a803b6fb2a74)
2022-05-18 10:08:43 +00:00
..
2022-05-10 06:45:16 +00:00
2019-03-04 19:01:16 +05:30
2020-01-22 08:19:42 +00:00