Downloads can fail, but still not return in error
|Assignee:||Javi Fontan||% Done:|
|Category:||Drivers - Storage|
|Affected Versions:||OpenNebula 4.12|
If the downloader.sh script is used in a pipeline, as is common:
$DUMP | ssh host dd...
Then the exit status of the pipeline is the exit status of the last command in the pipeline (ssh, in this case) which often is not sufficient.
Downloading from the Marketplace can or other URLs can fail (for a variety of reasons) and this error will go unreported, since "ssh" did not fail.
To workaround this, "set -o pipefail" should be done before calling this idiom.
Attached is a patch that does this in the places I could find it.