06-19-2025 07:42 AM
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
Solved! Go to Solution.
06-20-2025 03:53 AM
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.
06-19-2025 08:25 AM
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
06-19-2025 09:19 AM
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
06-20-2025 03:53 AM
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.
06-20-2025 06:10 AM
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
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