In k8s we have two probes that are used to monitor the health and availability of a container, readiness and liveness probes. This post shows some examples on how to use them. The post will hopefully interest you in trying to take advantage of those probes when running NSO in k8s.
The more you can check in your liveness probe, the more certain you can be that NSO is actually up and running and does what it should.
NOTE, the actions in the example are toy examples, but hopefully they'll set you off with some ideas on how you can create readiness and most importantly a good liveness probe for your system. The liveness probe could in theory do a number of things, including touching devices.
The readiness probe determines when a container is ready for service. NSO can sometimes take some time before it's ready for service.
See the k8s-liveness-readiness/is-ready.sh script. It first checks if NSO is started at all, if that succeeds, the script calls a simple action (/k8s/ready).
Please see k8s-liveness-readiness/lr-test/python/lr_test/main.py
After the container has been running for a while, we need to make sure it's still alive. This is also done using an action (/k8s/alive). The example action simply creates a config transaction and writes a leaf (/k8s/last-live-check), this is to test that we can successfully commit a configuration transaction.
To run the examples, please see instructions below.
You'll need to build the NSO system install base image. This is a somewhat minimized image that installs NSO.
Please note that you need to supply your own NSO installer binary and modify the Makefile for a correct container name. See the CONTAINER and VER variables in nso-system-install-base/Makefile.
make image push
Once you have managed to build the base image, you can move on to the example.
Hi, i have some problems with a ZTE C300 OLT device.When i tried to sync the device, get stucked at loging: admin@ncs# devices device olt_zte_c300 sync-from
info Failed to connect to device olt_zte_c300: connection refused: Timeout after...
Hi:I installed nso-22.214.171.124 with nso-4.7.1-cisco-sae-core-fp-1.0.1 because I want to do a templace to configure ITD for nexus. Packages seem to be installed:
admin@ncs# show packages package oper-status packages package cisco-extension-frameworkoper-status...
I'm testing the NSO HA - BGP Anycast (L3) method, everything works as explained in the tailf_hcc.pdf except failover-master.
The SLAVE moves to MASTER, not to FAILOVERMASTER, and the failover-master templates is not applied to slave's quagga device...
According to the information on the NSO main page, in NSO 5, there will be the ability to create our own NEDs? Is this something being released soon? I see NSO 4.7 is still the only thing downloadable. Or does this feature exist in NSO 4...
I have a simple yang model which represents a netconf device. I created a new netconf NED. Then, I am trying to perform the basic NETCONF operations. I could perfom most of the operations except reading the operational data (config false...