cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
743
Views
5
Helpful
3
Replies

NSO Automation

rengonca
Cisco Employee
Cisco Employee

Hello guys,

 

I am performing a few tests regarding NSO maintenance automation and the behaviour of NSO is not what I was expecting. During the pipeline, I stop the NSO daemon (ncs --stop) and restart it with (ncs --with-package-reload-force). I created 2 pipelines: the first is a dry-run and the second is a commit. In both cases, at the end of the pipeline, Jenkins is killing the NSO daemon. The python script to perform the injection of new configuration (push_config.py) doesn't use a daemon, it is a simple python script that sends commands using python's request library. I think I can trap the SIGTERM SIGKILL SIGQUIT in the "push_config.py" script so it would not let Jenkins kill the daemon. It would likely preclude the graceful stop with the OS too though. This is the current output --> https://pastebin.com/LEMCuNMP Do you guys have any idea regarding this behaviour, did you have this problem in the past?

3 Replies 3

yfherzog
Cisco Employee
Cisco Employee

Can you elaborate which aspect is not as expected?

What I could get is that the script push_config.py is failing at some point. Is that the issue?

Hello yfherzog,

 

Thank you for your reply.

 

I was expecting jenkins doesn't kill the ncs service.

I believe is some variable that I need to check in jenkins to dont disturb the ncs and leave it alone in case there is no changes to apply on the devices.

Regards
RG

 

 

It Doesn't seem to me as if it is related to what you're running against NSO once it's running.

Your checks also confirm that NSO is up before the pipeline ends.

I never witnessed that kind of behavior from Jenkins, but I think it is indeed related to Jenkins configs.

Have a look here:

https://stackoverflow.com/questions/39169457/how-to-tell-jenkins-not-to-kill-processes-after-successful-execution-of-job-in-m?rq=1

 

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the NSO Developer community: