-
Notifications
You must be signed in to change notification settings - Fork 344
New issue
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
Newer junos versions return a bool for config diff if there are no changes #1093
Conversation
It looks like the CI is blocked with some crypto package not about the fix. |
Looks like some openssl headers are missing from the CI runner.
|
Any chance to implement this fix? |
Closing this as it is junos bug for certain releases and should work fine for newer releases. |
I don't agree with closing this as this will break automation for anyone using PyEZ just because of the release of Junos they are using. It may be a bug with Junos but the bug shouldn't break PyEZ. The fix should be to check for if a boolean was returned and then test if it is true and then return None. There are going to be people using Junos releases with this bug and they shouldn't have to make manual modifications of PyEZ to get it to work. Currently I am running in to this for a Juniper customer and it broke their automation and took me a whole day to figure out what was going on and why the automation broke. |
@dkasten79 - If a safe-check net is to be added for this scenario, we can discuss it. I am re-opening the Issue #1082. Will analyse for more solutions. Might need help to get some desired outputs from devices throwing the error. |
I have an internal Juniper VM environment setup with gitlab, gitlab-runner, and AWX that is running in to this problem but I put in a manual fix currently to resolve the issue in my testing environment. Once I am done with using the lab for customer work I can provide access for you to test and see outputs from the failure scenario. If you want to discuss the fix and what issues this error handling could cause and why it wouldn't be backward compatible then you can message me internally at dkasten. |
Happy to provide any outputs required. I fail to see what "multiple error scenario" is not covered at a quick glance, let me know what I'm missing. |
@dangoscomb @dkasten79 - We do agree that we should return error-message or raise some warning instead of throwing system errors. Also, noticed that another pull-request 1116 has been raised for the same. Let us review the same and we will get back with the resolution soon. |
I'm not sure the bug is in a "specific version". It seems to affect many to me. Do you have the actual PR reference? I haven't noticed it anywhere. From my point of view, upgrading JUNOS for this issue alone will affect many thousands of users... adding a workaround to a management system will affect no one. My approach would be to fix, where safe to do so (and I believe the submitted fix is safe) to allow for the same error being re-introduced in future. Its great to assume that JUNOS will always be error free and I really wish this was going to be the case, believe me, but making the management system handle errors (even if not intended) is far more important IMO. |
Check return type is an etree Element, if not return None for no changes. Fixes #1082