Bug #3727

Downloads can fail, but still not return in error

Added by Roy Keene over 6 years ago. Updated almost 6 years ago.

Status:PendingStart date:03/30/2015
Priority:NormalDue date:
Assignee:Javi Fontan% Done:


Category:Drivers - Storage
Target version:-
Resolution: Pull request:
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.

opennebula-4.12.0-fixdownloader-2exitcorrectly.diff Magnifier (2.08 KB) Roy Keene, 03/30/2015 06:41 PM


#1 Updated by Roy Keene over 6 years ago

The originally included patch does not work, testing errors out.

A new patch will be tested and attached to this ticket.

#2 Updated by Ruben S. Montero almost 6 years ago

  • Category set to Drivers - Storage
  • Assignee set to Javi Fontan

Also available in: Atom PDF