cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
943
Views
5
Helpful
2
Replies

Logging commit errors within python service

tcragg1
Cisco Employee
Cisco Employee

I have a python service that is called through RESTCONF, and ran into an issue where the service was failing to create certain instances, but did not log any details of the failure in the service python vm log. When I re-created the issue through the NCS CLI instead of RESTCONF, I got a CLI error message showing that the device was rejecting the configuration when NSO attempted to apply it rather than there being a problem with the service itself. Is there a way to add logging for this kind of commit error within the python service code?

2 Replies 2

Alexander Stevenson
Cisco Employee
Cisco Employee

Hello,

 

I'm not an NSO expert but please allow me to shine some light on some similar discussion, which may be of relevance in your case:

 

Turn off console logging in NSO

NSO Dev Days: Tips and Tricks for Troubleshooting with NSO (without screen capture)

NSO Developer Days Troubleshooting presentation

NSO Configuration Errors and Rollbacks Due to Device Prompt Following Write Command

 

I'm fairly certain none of these are a perfect fit, but they may give you some ideas and/or you can see who in the community is responding and solving these issues.

 

Finally, I would recommend checking for device / software bugs using the Cisco Bug Search Tool.

 

Hope this helps!

 

rogaglia
Cisco Employee
Cisco Employee

the problem is that the error happened after the create() code was executed, that is why in neither cases you get something on the python-vm log. The same message you see in the CLI, you should have received in the RESTCONF JSON/XML body together with a en error HTTP code.

Was that not the case?

From a log perspective, you will see the ERROR message in the develop.log file.