06-12-2019 04:37 AM
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?
06-12-2019 05:34 AM
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?
06-12-2019 07:17 AM
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
06-12-2019 07:41 AM
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:
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide