Comments (11)
Hi @cyrilleo ,
thanks for reporting this, indeed the INFO
level messages are not considered to be an error in our code. We will look into ways to solve this shortly.
@wisotzky I propose we add a new element to the list of stderr markers (example):
[\r\n]INFO.*Configuration failed .*[\r\n]+
to handle cases like that. What is your opinion? I can send a PR if you are ok with that proposal.
from ansible-networking-collections.
Hi @hellt,
From my understanding "INFO" or "WARNING" should not be used if something is failing. It might be used as an indication that a change/operation was accepted, but does likely not have the expected result for some reason. I would ask @jgcumming to dump his opinion on the case above.
Filtering not just by the severity level but also for the content of the message to me is not a good approach at all. This easily leads to a never-ending debate where everybody has an opinion on what patterns need to be treated like errors. Also not sure, how big the risk would be, that error texts get updated release over release.
from ansible-networking-collections.
I fail to see any other viable solution to this problem. And this IS a problem, since we report a failed configuration action as a non-failed task. It's not a false positive, it's a negative behavior of the plugin.
We need to consider the fact that even if this gets fixed to MINOR level in the future releases it will still behave wrongly for the thousands of devices running the current and older sw versions. Today we discovered a single case for such a behavior, there could be more.
I would disagree that the proposed match expression can lead to a potential dispute, it is a mitigation of a specific situation where an info level message contains a clean indication of a failed configuration.
I'd even claim that it is safer to raise an error in a task that has succeeded, rather than declare something that failed as passed. With this being said I don't think the potential risk of a changed wording for the cases like that defeats the proposed fix. We can look into the issues that might come once and if they come.
from ansible-networking-collections.
@hellt, I do not disagree with what you are saying - but would avoid to open a never-ending discussion to have more exceptions added. A viable solution might be, to consider all WARNING and INFO responses as fault. But for this it would be good to confirm with @jgcumming if this would not cause any bigger issues - aka is there regular situations where INFO is raised that can not be avoided.
Side note: In Nokia NSP WFM the problem does not exists, as we've decided allow overriding the error regexp in the workflow if needed. That way, one can decide to ignore or fail on errors as needed.
from ansible-networking-collections.
Hi,
Considering an ansible module, as a network operator, the main important behaviour to fix is the missing message (= no "msg" variable" in the registered output) in case of INFO messages.
Then, choosing the setting value of "failed" variable is another discussion.
First of all, we could ask why a config error such as the given BGP group example, is raised as an INFO message and not a MINOR one...
from ansible-networking-collections.
@cyrilleo check what you have in stdout of
debug:
var: output2
I think you will find the INFO message there.
The reason there is no msg
I guess is because it was not captured as an error, therefore msg
is empty
from ansible-networking-collections.
@hellt, no, I confirm we can't find the INFO message in the output2:
ok: [LABROUTER] => {
"output2": {
"ansible_facts": {
"discovered_interpreter_python": "/usr/bin/python"
},
"changed": false,
"failed": false,
"warnings": [
"Platform linux on host LABROUTER is using the discovered Python interpreter at /usr/bin/python, but future installation of another Python interpreter could change this. See https://docs.ansible.com/ansible/2.9/reference_appendices/interpreter_discovery.html for more information."
]
}
}
from ansible-networking-collections.
@hellt, @cyrilleo, it would be great to have your view on how to take this forward... In the case of cli_command
messages of severity INFO are treated like every other output and those become consumable by the playbook. It looks the netcommon cli_config
however works differently. There might be ways to pass through the message, but this requires deeper investigation. Treating INFO like an error is clearly not recommended, because typically it is not seen as error message but rather informational Information to the operator.
from ansible-networking-collections.
in my opinion this INFO message doesn't bear the informational meaning, since it encloses an actual config error
I would still use a regext for that particular INFO with error string to be marked as an error
from ansible-networking-collections.
@hellt, I would not mind doing it the way you've described... However, it would be great to have some proof-points that a regular expression built around an INFO message would capture the majority when not all of similar cases:
To remind, the error was looking like this:
INFO: BGP #1001 Configuration failed because of inconsistent values - Peer 10.10.127.1 already belongs to group "GRP-IBGP-RR" (VR 1): cannot be changed!
I think your proposal was to check for "INFO[...]Configuration failed"... Maybe let's check if we find someone in the SROS team, that can grep for all potential INFO messages that can be raised by the router in one of the latest releases. That should help us to find a reasonable regular expression that covers those cases.
As I've said before, I would try to avoid getting those cases being added per individual occurrence, because this would not be generic with never ending changes required even for future releases.
I still believe we should work with SROS team to ensure that real errors are never reported with INFO severity.
from ansible-networking-collections.
@hellt, I've checked with Nokia SROS team... It looks the catch above is an exception. My initial readout was correct, aka errors should never raised with "INFO" severity level. If people find issues like that, they should raise bug reports to get it fixed. While the error mentioned here is about classic CLI, and we don't have full visibility who are all the customers who are impacted by this (either today or in the future) even with older releases deployed, it seems to be reasonable to add the specific condition (regular expression) to the code, to pass this as an error.
from ansible-networking-collections.
Related Issues (20)
- [Py3.8] dictionary keys changed during iteration. HOT 1
- Usage of CONFIG in gNMI SetRequest() HOT 3
- Cannot use cli_command when VSR does not have license installed
- Modules fail to exucute successfully on ISAM devices HOT 11
- Automatic revert time-out when subscribers are active HOT 7
- communication fails on SROS version 21.2.R1 HOT 10
- Collection does not appear to support FQCN HOT 6
- Handling /file portion of the CLI possible? HOT 2
- playbook crash with md-cli config HOT 4
- cli_command does not return failed commands to ansible HOT 3
- Python package dependencies not installed when installing Galaxy collection
- Ansible Galaxy package has not been updated for 2 years
- Need custom "origin" support for Cisco devices
- admin save config doesn't seem to work in classic mode
- Generated pb2 file is incompatible with newer protobuf versions
- network os nokia.sros.md is not supported
- cli_command etc. cannot be fully qualified HOT 2
- Please update collection!
- ansible 2.10 No module named 'ansible.module_utils.network' HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ansible-networking-collections.