Problem
This command takes 12 seconds to run on this system (normally it is quicker)
[root@server ~]# time /opt/dell/srvadmin/sbin/racadm jobqueue view | tail
[Job ID=JID_060702358956]
Job Name=Configure: Import system configuration XML file
Status=Completed with Errors
Start Time=[Not Applicable]
Expiration Time=[Not Applicable]
Message=[SYS055: Import of system configuration XML file operation completed with errors.]
Percent Complete=[100]
----------------------------------------------------------
real 0m12.763s
user 0m0.009s
sys 0m0.012s
When running it via goss, it times out after 10 seconds
[root@server ~]# time sudo goss -g /root/dell_check.yaml v
FF
Failures/Skipped:
Title: You need to reboot this server to get it to pass this check
/opt/dell/srvadmin/sbin/racadm jobqueue view |grep 'Complete='|tail -1: exit-status: Error: Command execution timed out (10s)
/opt/dell/srvadmin/sbin/racadm jobqueue view |grep 'Complete='|tail -1: stdout: Error: Command execution timed out (10s)
Total Duration: 10.000s
Count: 2, Failed: 2, Skipped: 0
real 0m10.014s
user 0m0.006s
sys 0m0.002s
Solution
Add timeout: 30000
to increase the timeout to 30,000 milliseconds (or 30 seconds)
[root@server ~]# cat /root/dell_check.yaml
command:
/opt/dell/srvadmin/sbin/racadm jobqueue view |grep 'Complete='|tail -1:
title: You need to reboot this server to get it to pass this check
exit-status: 0
stdout:
- 'Complete=[100]'
- '!Complete=[0]'
- '!Complete=[NA]'
timeout: 30000
[root@server ~]# time sudo goss -g /root/dell_check.yaml v
..
Total Duration: 11.270s
Count: 2, Failed: 0, Skipped: 0
real 0m11.339s
user 0m0.011s
sys 0m0.020s