cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
220
Views
2
Helpful
4
Replies

NSO Erlang package question

sm000x
Level 1
Level 1

Hi,

Recently I copied /opt/ncs/current/examples.ncs/getting-started/developing-with-ncs/18-simple-service-erlang to create 2 packages, router and vlan.

I added logs to ec_vlan_server.erl's update_devices/3:
log(trace, "In update_devices IfListIKP ~p~n", [IfListIKP]),

Then I make the vlan package, restart ncs.

But after I run
set services vlan s1 description x iface ethX unit 1 vid 3
commit

I see the original code's log in devel.log:
<DEBUG> 17-Jun-2025::15:11:05.162 mtznjv1cnro03 ncs[3841225][<0.649.0>]: devel-econfd ec_vlan_server: create service [{<<"s1">>},
['http://example.com/vlan-service'|vlan],
['http://tail-f.com/ns/ncs'|services]]

But I do not see the log I added in the devel.log.

Does anyone know what did I do wrong?

THX
sm000x

 

1 Accepted Solution

Accepted Solutions

snovello
Cisco Employee
Cisco Employee

Restarting ncs, does not relaod the packages unless you give the --with-packages-reload option. I mention it because from your description (that one log message is there but your new one is not points to the fact that the package running is still the old one.

 

View solution in original post

4 Replies 4

cohult
Cisco Employee
Cisco Employee

Hi, did you rebuild and reload the package? In a more recent version, NSO 6.4.1 or later, you can re-run the example using the demo.sh script. See examples.ncs/service-management/rfs-service-erlang. The NSO example collection that comes with the NSO installer can also be downloaded from the GitHub nso-developer/nso-examples repo nowadays. See https://github.com/NSO-developer/nso-examples/tree/6.5/service-management/rfs-service-erlang

sm000x
Level 1
Level 1

Hi, Cohult:

Thank you for the replying. Yes, I re-builded and reloaded the package. I am using 6.2.12, not sure if that makes difference.

I will use 6.4.1 or 6.5 when I have a chance.

 

THX

sm000x

snovello
Cisco Employee
Cisco Employee

Restarting ncs, does not relaod the packages unless you give the --with-packages-reload option. I mention it because from your description (that one log message is there but your new one is not points to the fact that the package running is still the old one.

 

sm000x
Level 1
Level 1

Hi, Snovello:

Thank you for your suggestion. I tried --with-package-reload-force and still did not work. However, from your suggestion (the package running is still the old one) I started from using "ncs-make-packge --erlang-skeleton package-name", copy the example erlang code to just made package, then that seems to be working. (It seems that "ncs-make-packge --erlang-skeleton package-name" does not generate package-name/load-dir, I need to manually create that.)

Thank you very much.

sm000x