We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
A job can be in a failed state and not have the status field that the panos_check module requires. This causes it to never return ready.
It should count failed jobs the same as those that are done.
If there are jobs with type Failed-Job then the panos_check module times out waiting for ready.
Debugging shows a job that is a type of Failed-Job but it doesn't have a status element. The check
<response status="success"> <result> <job> <type>Failed-Job</type> <details> <line>job failed because of configd restart</line> </details> <warnings/> </job> <job> <tenq>2024/01/25 18:15:25</tenq> <tdeq>18:15:25</tdeq> <id>57</id> <user>taylorjohn</user> <type>Commit</type> <status>FIN</status> <queued>NO</queued> <stoppable>no</stoppable> <result>OK</result> <tfin>2024/01/25 18:17:09</tfin> <description/> <positionInQ>0</positionInQ> <progress>100</progress> <details> <line>Configuration committed successfully</line> </details> <warnings/> </job>
A fix could be to return True in check_jobs for job_type == "Failed-Job".
def check_jobs(jobs): if len(jobs) == 0: return False for j in jobs: job_type = j.findtext(".//type") job_result = j.findtext(".//result") if job_type == "Failed-Job": return True if job_type is None or job_result is None: return False if job_type == "AutoCom" and job_result == "OK": return True elif job_type == "AutoCom": return False
The text was updated successfully, but these errors were encountered:
Successfully merging a pull request may close this issue.
Describe the bug
A job can be in a failed state and not have the status field that the panos_check module requires. This causes it to never return ready.
Expected behavior
It should count failed jobs the same as those that are done.
Current behavior
If there are jobs with type Failed-Job then the panos_check module times out waiting for ready.
Possible solution
Debugging shows a job that is a type of Failed-Job but it doesn't have a status element.
The check
A fix could be to return True in check_jobs for job_type == "Failed-Job".
Your Environment
The text was updated successfully, but these errors were encountered: