ssh commands error return codes ignored

Bug #1035227 reported by Javier Collado
6
This bug affects 1 person
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-quantal-amd64 INFO: Running command through SSH: utah -r /tmp/master.run -o /var/log/utah/utah-24-quantal-amd64_master.run_tmp
2012-08-10 10:41:50,236 utah-24-quantal-amd64 DEBUG: Closing SSH connection
2012-08-10 10:41:50,237 utah-24-quantal-amd64 DEBUG: Standard output follows:
2012-08-10 10:41:50,237 utah-24-quantal-amd64 DEBUG: Standard error follows:
2012-08-10 10:41:50,237 utah-24-quantal-amd64 DEBUG: bash: utah: command not found

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

Changed in utah:
status: New → Triaged
importance: Undecided → Medium
summary: - utah client error ignored
+ ssh commands error return codes ignored
Revision history for this message
Javier Collado (javier.collado) wrote :

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.

Revision history for this message
Javier Collado (javier.collado) wrote :

I haven't seen any other command for which a return code check should be needed, so I'll check just utah-client output for now.

Revision history for this message
Javier Collado (javier.collado) wrote :

Code is ready but it depends on the changes for bug1035198, so I'll wait until it's merged to test it properly.

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
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.