Closed travula closed 9 years ago
execute_command executes the command and logs the error. The error is not captured properly.
Also, ose error not defined in LabActionScript.
I tested with the sample python code and also integrated the same code in =execute_commands.py= file in ADS.
I noticed that =subprocess.check_output()= function is not returning any specific error message, but it simply returns the exit status code either "0" (if it is sucess) or "non-zero" value (if it fails).
when I ran the sample python code by passing wrong command i.e instead of =ssh username@10.4.12.24=
I have given =sssh username@10.4.12.24= then it has return non-exit status 127 which is command not found but it does not show this message as =sssh= command not found. It was simply displaying "executing sssh command failed returned non-exit status 127'.
I thought I can modify this message by reading the status code and displaying the proper messages for each error code and catch all the exceptions because there were only 8 possible error codes are available for shell commands or otherwise I can change the command itself instead of =subprocess.check_output()= I can use pipes or call functions also to capture the error messages. The same thing I discussed with anon and thirumal, about the two possible solutions I have, anon said that if I read the error code, I need to do universally for all the commands.
Then thirmal suggested me to implement this functionality with =python fabric=.
Now, I am exploring =python fabric=. It may take two days.
This issue is resolved and code was checked into =fix-error-msg= branch of ovpl
Thanks. Once tested, we will close this issue.
On Thu, May 28, 2015 at 2:40 PM, madhavipuliraju notifications@github.com wrote:
This issue is resolved and code was checked into =fix-error-msg= branch of ovpl
— Reply to this email directly or view it on GitHub https://github.com/vlead/ovpl/issues/49#issuecomment-106242889.
When a lab deployment fails due to some step(s) mentioned in the scripts provided by the lab developer, ADS does not give the exact error messages output by those steps.
ADS just says, lab script execution step returned non-zero exit status. This error message is not really helpful for the lab developer/integrator to debug their scripts.
Fix ADS to capture the output/exact error messages from those steps/scripts, so that it can be helpful for lab developers/integrators.