ssh commands error return codes ignored
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
UTAH |
Fix Released
|
Medium
|
Javier Collado |
Bug Description
When running test cases from the server using run_utah_tests.py, I see that the errors for the commands executed in the VM through SSH are ignored.
For example, after a utah-client package installation failure, the utah binary isn't found:
2012-08-10 10:41:50,233 utah-24-
2012-08-10 10:41:50,236 utah-24-
2012-08-10 10:41:50,237 utah-24-
2012-08-10 10:41:50,237 utah-24-
2012-08-10 10:41:50,237 utah-24-
Running this command directly in the VM returns 127, but the server ignores that and still tries to get results file from the VM as if the client execution was successful.
Related branches
- Max Brustkern (community): Approve
- Javier Collado (community): Needs Resubmitting
-
Diff: 47 lines (+19/-0) (has conflicts)2 files modifiedutah/provisioning/provisioning.py (+4/-0)
utah/run.py (+15/-0)
Changed in utah: | |
status: | New → Triaged |
importance: | Undecided → Medium |
summary: |
- utah client error ignored + ssh commands error return codes ignored |
Changed in utah: | |
assignee: | nobody → Javier Collado (javier.collado) |
Changed in utah: | |
status: | Triaged → In Progress |
Changed in utah: | |
status: | In Progress → Fix Committed |
status: | Fix Committed → Fix Released |
In this case it seems that SSHMixin.run is properly returning the code, but it's being ignored by the caller here:
machine.run('utah' + extraopts + options, root=True)
I'm going to add a check and raise an exception if the code isn't successful.