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
ignore_warnings causing "'str' object has no attribute '_root'" #1245
Comments
Hi @kpetremann Thanks & Regards |
Hi @chidanandpujar, Thanks for your response. So far, we had the issue only when using Saltstack scheduler:
Our code base is open-source:
The Salt proxy-minion is setting I can try to create a docker compose based lab to reproduce the issue on demand. But I will be on vacation starting tomorrow, so I won't be able to provide you this before June :/ Note: I don't know why it only happens in a schedule context, which is weird. Maybe it happens after multiple execution. We did not run the state manually a lot. FYI, we deployed this workaround which works. But it is not a proper way to fix the issue. |
The loaded configuration looks like this: https://github.com/criteo/openconfig-saltstack/blob/main/tests/states/openconfig_routing_policy/data/functional_tests/expected_result_junos.txt It happens even if the configuration is already up to date. |
Additional information, we saw the issue on QFX 5100 & 5110, at least on version 18.4 and 20.2. |
Hi @kpetremann , set system services netconf ssh Thanks & Regards |
@chidanandpujar, I reverted my fix to retrigger the issue, but so far no occurrence. I'll check the result in June after my vacations. |
hi @chidanandpujar,
|
hi @chidanandpujar any update? |
Hi @kpetremann Thanks & Regards |
Hi @kpetremann
|
Hi @chidanandpujar, For the config file example, the a directory has been renamed, here the new link: https://github.com/criteo/afk-saltstack/blob/main/tests/states/openconfig_routing_policy/data/integration_tests/expected_result_junos.txt
As we set the ignore_warning parameter to true, the warning should be ignore, am I right? |
Hi @kpetremann I will try to replicate the issue on local test setup . Thanks |
Hi @kpetremann
Thanks |
Hi @kpetremann with following config statements , I am able to ignore the warnings .
Thanks |
Hi @chidanandpujar, I had a look to your stacktrace when you trigger the exception, I do not think this is the same one. The issues we have is that a warning triggers an unhandled exception because the warning is supposed to be an XML message with _root, but according the stacktrace we get, the message it is a string, which of course does not have _root attribute. at line 125: it checks if it is a warning or an error. If it is an error it raises an exception at line 145 and so exits the function, which is fine. With the hacky patch, we do have an exception when there is an error and it is ok. I'll try to set up a lab today to reproduce the issue, as I cannot reproduce the issue because of business freeze. |
Hi @kpetremann ,
Thanks |
Hi @kpetremann, |
Hi @apurvaraghu, I've given it a try but it was not enough. I'll also check the differences in eznc usage between salt (via napalm) and your script), and I'll try with both the script and salt at the same time. |
Thanks, Please update the results. |
Hi @kpetremann Please refer the following PyEZ script .
Thanks |
Hello team,
We are encountering this issue when loading a configuration with ignore_warning feature enabled:
This is causing an exception resulting, and the commit is discard.
The code in pyeznc
is calling NCElement with an argument with the wrong type:
Bypassing the error with a try except block confirms this is the root cause.
I don't know what can be passed to NCElement instead of a string. I am not familiar with ncclient.
Can you help please?
Tested versions:
junos-eznc=2.6.5 and 2.6.7
The text was updated successfully, but these errors were encountered: