fuel-client tests fail silently when curl is not installed.
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Fuel for OpenStack |
Fix Committed
|
High
|
Marcellin Fom Tchassem | ||
8.0.x |
Won't Fix
|
High
|
MOS Maintenance | ||
Mitaka |
Won't Fix
|
High
|
Marcellin Fom Tchassem |
Bug Description
Detailed bug description:
On debian based distributions ( tested on Mint 17.2 and Ubuntu 14.04 ), where "curl" program is not installed, the script prepare_nailgun.sh fails silently and the user does not know what was wrong:
/tmp/fuel_
(util.
ERROR: InvocationError: '/bin/bash /home/cnn/
cleanup develop-
This issue is not happening in RH based distributions, and may be others, where "which" command prints a message in the case that the program is not present:
>> which curl
/usr/bin/which: no curl in (/home/
Steps to reproduce:
- This issue is only present when the "which" command doesn't print any message when "curl" ( or any other ) is not present.
- Remove curl:
apt-get remove curl
- Run python-fuelclient tests
./run_tests.sh
Expected results:
There should be some information about "curl" is not present.
Actual result:
The script fails silently and the user doesn't know why. The only message is:
ERROR: InvocationError: '/bin/bash /home/cnn/
Reproducibility:
Allways if "which" command is not printing a message when "curl" ( or any other ) is not present.
Workaround:
No
Impact:
The user doesn't know what was wrong.
Description of the environment:
- Mint 17.2
- Fuel 8.0.0
Aditional information:
The script prepare_nailgun.sh has -e flag in order to end on any error.
"which curl" fails in the case that curl is not present, and return code is 1, but it doesn't print any information.
Proposed fix:
Disable temporally the -e flag and print a proper message. Something like:
# Wait for server's availability
set +e
which curl > /dev/null
err=$?
if [[ $err != 0 ]]; then
echo "ERROR: curl command does not exist"
exit $err
fi
set -e
Ideally, that error should be printed only when the "which" version used is not doing it already.
Changed in fuel: | |
assignee: | nobody → Marcellin Fom Tchassem (mf6510) |
Changed in fuel: | |
importance: | Undecided → High |
milestone: | none → 9.0 |
status: | New → Confirmed |
description: | updated |
tags: | added: low-hanging-fruit |
Changed in fuel: | |
milestone: | 9.0 → 10.0 |
tags: | added: tech-debt |
Fix proposed to branch: master /review. openstack. org/308538
Review: https:/