Right now expect always return true, even when spawned command fail. Same with ssh command in postinstall/update/validate (all of them use ssh_exec function) which was combined with || true to always return true.
This behaviour is stupid and dangerous ("mea culpa"), because after fail next commands are executed and we lost control and information about what exactly was wrong with our scripts (It make debugging process difficult).
The build box process must be predictable and repeatable, that mean I will be alarm when one of my postinstall scripts fail and the job won't be continued.
If I expect that given command/script/scripts should fail and I'm happy with this, e.g. validate scripts which inform me what more should be done on my box, then inside that script I use || true and I have full control on return status.
Example:
this pass: postinstall_launch=( "false || true" "echo 'hello'")
this fail: postinstall_launch=("false" "echo 'hello'")
After fix you can safely use vbkick as a test to your bootstrapping scripts (kickstart files, etc.).
Right now
expect
always return true, even when spawned command fail. Same withssh
command inpostinstall/update/validate
(all of them use ssh_exec function) which was combined with|| true
to always return true.This behaviour is stupid and dangerous ("mea culpa"), because after fail next commands are executed and we lost control and information about what exactly was wrong with our scripts (It make debugging process difficult). The build box process must be predictable and repeatable, that mean I will be alarm when one of my postinstall scripts fail and the job won't be continued.
If I expect that given command/script/scripts should fail and I'm happy with this, e.g. validate scripts which inform me what more should be done on my box, then inside that script I use
|| true
and I have full control on return status. Example:After fix you can safely use vbkick as a test to your bootstrapping scripts (kickstart files, etc.).