07-03-2019 09:06 AM
How can we setup HA amongst NSO nodes via a curl command? We are using NSO 5.1
07-03-2019 09:32 AM
So, need a little more information before we can help here:
Are you asking:
How to configure the tailf-hcc HA package from RESTCONF command(s)?
or
How to control activate/deactivate tailf-hcc HA on the node via RESTCONF
or
You are not using tailf-hcc package at all and want to control NSO HA via the HA API via RESTCONF directly using an HA Framework that you are providing?
07-03-2019 09:35 AM - edited 07-03-2019 09:43 AM
We are using tailf-hcc package. In our case, CLI will be turned off so want to know:-
How to configure the tailf-hcc HA package from RESTCONF command(s)?
and/or
How to control activate/deactivate tailf-hcc HA on the node via RESTCONF
For Example these commands:-
In config mode:
ha token test
ha member XYZ address someipaddress1 default-ha-role master
ha member ABC address someipaddress2 default-ha-role slave failover-master true
07-03-2019 11:50 AM - edited 07-03-2019 11:57 AM
Right, you'd configure HA just like configuring any other NSO configuration in CDB... point your URI to config and provide the config data, in-line or in a data file:
$ curl -X POST -u admin:admin -T ha-cfg.json -H "Content-type:application/yang-data+json" http://127.0.0.1:8080/restconf/data
save your ha config data from CDB in json format to ha-cfg.json (need to remove the 'data' container from the resulting file)
To activate HA, it's an action so invoke from RESTCONF like other actions, point your URI at the action you want to invoke:
$ curl -X POST -u admin:admin -H "Content-type:application/yang-data+json" http://127.0.0.1:8080/restconf/operations/ha/commands/activate
{
"tailf-hcc:output": {
"status": "activated"
}
}
HA Status:
07-03-2019 01:24 PM
<errors xmlns="urn:ietf:params:xml:ns:yang:ietf-restconf">
<error>
<error-tag>access-denied</error-tag>
<error-type>protocol</error-type>
</error>
</errors>
This is what I get although I have restconf enabled and tcp port 8080 is enabled in ncs.conf.
07-03-2019 01:45 PM
That appears to be a quite different problem than how to config HA.
Seem's you'd have an access problem from any RESTCONF command toward NSO...
A few questions:
Did you restart NSO after setting changes in ncs.conf?
Are you attempting RESTCONF commands from the same server that NSO is running on?
If not, try the curl commands locally... any different results?
If from remote, does the NSO server have a firewall enabled, that may be rejecting the call?
Try using telnet to determine if the port is accessible from the remote node - should connect to NSO
$ telnet 192.168.56.101 8080
Trying 192.168.56.101...
Connected to 192.168.56.101.
Escape character is '^]'.
^]
telnet> quit
Connection closed.
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