cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
201
Views
10
Helpful
1
Replies
Highlighted
Beginner

Failed to compile Juniper-JunOS NED - Missing junos.fxs

Hi all,

 

I am encountering a issue during compiliation of Juniper-Junos-NED in Docker container.

junos.fxs is linked in load-dir directory, but junos.fxs is missed after make clean all

But junos-rpc.fxs is compiled and exists in load-dir directory.

Other NEDs, like ios-xr-cli or cisco-nx compiles correctly and works.

I added log of "make clean all" and debug log of start of NSO.

 

Juniper NED is a Netconf NED. Maybe some additional dependencies are missing?

 

OS: CentOS 7 (7.9.2009)

Java: 1.8.0_275

Ant: 1.9.4

NED: juniper-junos-nc-4.6

NSO-Version: 5.4.0

 

The log doesn't show any hints to an error and return exit code 0.

$ cd /var/opt/ncs/packages/juniper-junos-nc-4.6/src
$ make clean all rm -rf tmp-yang rm -f ../package-meta-data.xml rm -f ../load-dir/junos.fxs ../load-dir/junos-rpc.fxs rm -f ../load-dir/*.fxs rm -rf ./ncsc-out for lib in ../erlang-lib/ec_junos_ext_vlan; do \ make VLAN_CALLPOINT=_juniper-junos-nc-4.6:juniper-junos-nc-4.6#ec_ext_vlan_list_hook_cp -C $lib clean || exit 1; \ done make[1]: Entering directory `/tmp/juniper-junos-nc-4.6/erlang-lib/ec_junos_ext_vlan' make[2]: Entering directory `/tmp/juniper-junos-nc-4.6/erlang-lib/ec_junos_ext_vlan/src' rm -f ../ebin/ec_junos_ext_vlan_sup.beam ../ebin/ec_junos_ext_vlan_server.beam ../ebin/ec_junos_ext_vlan.beam ../ebin/ec_junos_ext_vlan.app erl_crash.dump core* *~ make[2]: Leaving directory `/tmp/juniper-junos-nc-4.6/erlang-lib/ec_junos_ext_vlan/src' make[1]: Leaving directory `/tmp/juniper-junos-nc-4.6/erlang-lib/ec_junos_ext_vlan' cd ../netsim && make clean make[1]: Entering directory `/tmp/juniper-junos-nc-4.6/netsim' rm -f *.fxs make -C esrc clean make[2]: Entering directory `/tmp/juniper-junos-nc-4.6/netsim/esrc' rm -f ../ec_junos_ext_vlan_netsim_hook.beam make[2]: Leaving directory `/tmp/juniper-junos-nc-4.6/netsim/esrc' make[1]: Leaving directory `/tmp/juniper-junos-nc-4.6/netsim' rm -rf ../package-meta-data.xml if [ -x /opt/ncs/ncs-5.4/support/ned-make-package-meta-data ]; then \ sed -e 's,juniper-junos,juniper-junos,g' package-meta-data.xml.in > package-meta-data.xml.in.tmp ; \ /opt/ncs/ncs-5.4/support/ned-make-package-meta-data package-meta-data.xml.in.tmp ; \ rm package-meta-data.xml.in.tmp ; \ else \ cp package-meta-data.xml.in ../package-meta-data.xml; \ fi --ncs-ned-id juniper-junos-nc-4.6:juniper-junos-nc-4.6 chmod -w ../package-meta-data.xml if [ -x /opt/ncs/ncs-5.4/support/ned-make-package-meta-data ]; then \ echo -n " is built by: "; \ echo "support/ned-make-package-meta-data"; \ fi is built by: support/ned-make-package-meta-data mkdir -p tmp-yang tools/ypp --out-dir=tmp-yang --var=JUNOS_MIN_VER=14 --var=JUNOS_MAX_VER=99 \ --var=IGNORE_DIFF_IN_UNREADABLE="" \ --var=FORCE_NTP_SINGLE_SRC_ADDR="" \ --var=FORCE_NTP_MULTI_SRC_ADDR="" yang/junos.yang rm -f ncsc-out/modules/fxs/junos.fxs mkdir -p ./ncsc-out /opt/ncs/ncs-5.4/bin/ncsc --use-description --ncs-compile-module tmp-yang/junos.yang \ --ncs-device-dir ./ncsc-out \ --ncs-skip-statistics \ --ncs-keep-callpoints \ --ncs-device-type netconf \ --ncs-ned-id juniper-junos-nc-4.6:juniper-junos-nc-4.6 | 2>&1 \ grep -v 'has no actionpoint' || true rm -f ../load-dir/junos.fxs ln -s ../src/ncsc-out/modules/fxs/junos.fxs ../load-dir/junos.fxs mkdir -p tmp-yang tools/ypp --out-dir=tmp-yang --var=JUNOS_MIN_VER=14 --var=JUNOS_MAX_VER=99 \ --var=IGNORE_DIFF_IN_UNREADABLE="" \ --var=FORCE_NTP_SINGLE_SRC_ADDR="" \ --var=FORCE_NTP_MULTI_SRC_ADDR="" yang/junos-rpc.yang rm -f ncsc-out/modules/fxs/junos-rpc.fxs mkdir -p ./ncsc-out /opt/ncs/ncs-5.4/bin/ncsc --use-description --ncs-compile-module tmp-yang/junos-rpc.yang \ --ncs-device-dir ./ncsc-out \ --ncs-skip-statistics \ --ncs-keep-callpoints \ --ncs-device-type netconf \ --ncs-ned-id juniper-junos-nc-4.6:juniper-junos-nc-4.6 | 2>&1 \ grep -v 'has no actionpoint' || true rm -f ../load-dir/junos-rpc.fxs ln -s ../src/ncsc-out/modules/fxs/junos-rpc.fxs ../load-dir/junos-rpc.fxs for lib in ../erlang-lib/ec_junos_ext_vlan; do \ make VLAN_CALLPOINT=_juniper-junos-nc-4.6:juniper-junos-nc-4.6#ec_ext_vlan_list_hook_cp -C $lib all || exit 1; \ done make[1]: Entering directory `/tmp/juniper-junos-nc-4.6/erlang-lib/ec_junos_ext_vlan' make[2]: Entering directory `/tmp/juniper-junos-nc-4.6/erlang-lib/ec_junos_ext_vlan/src' erlc -DVLAN_CALLPOINT="'_juniper-junos-nc-4.6:juniper-junos-nc-4.6#ec_ext_vlan_list_hook_cp'" +warnings_as_errors +debug_info -pa /opt/ncs/ncs-5.4/erlang/econfd/ebin -pa ../../ec_junos_ext_vlan/ebin -o ../ebin ec_junos_ext_vlan_sup.erl erlc -DVLAN_CALLPOINT="'_juniper-junos-nc-4.6:juniper-junos-nc-4.6#ec_ext_vlan_list_hook_cp'" +warnings_as_errors +debug_info -pa /opt/ncs/ncs-5.4/erlang/econfd/ebin -pa ../../ec_junos_ext_vlan/ebin -o ../ebin ec_junos_ext_vlan_server.erl erlc -DVLAN_CALLPOINT="'_juniper-junos-nc-4.6:juniper-junos-nc-4.6#ec_ext_vlan_list_hook_cp'" +warnings_as_errors +debug_info -pa /opt/ncs/ncs-5.4/erlang/econfd/ebin -pa ../../ec_junos_ext_vlan/ebin -o ../ebin ec_junos_ext_vlan.erl perl -e '$vsn=shift; $mods=""; while(@ARGV){ $_=shift; s/^([A-Z].*)$/\'\''$1\'\''/; $mods.=", " if $mods; $mods .= $_; } while(<>) { s/%VSN%/$vsn/; s/%MODULES%/$mods/; print; }' "1.0" ec_junos_ext_vlan_sup ec_junos_ext_vlan ec_junos_ext_vlan_server < ec_junos_ext_vlan.app.src > ../ebin/ec_junos_ext_vlan.app make[2]: Leaving directory `/tmp/juniper-junos-nc-4.6/erlang-lib/ec_junos_ext_vlan/src' make[1]: Leaving directory `/tmp/juniper-junos-nc-4.6/erlang-lib/ec_junos_ext_vlan' cd ../netsim && make all make[1]: Entering directory `/tmp/juniper-junos-nc-4.6/netsim' rm -f junos.fxs /opt/ncs/ncs-5.4/netsim/confd/bin/confdc --use-description --yangpath ../src/tmp-yang \ -c -o junos.fxs ../src/tmp-yang/junos.yang rm -f junos-rpc.fxs /opt/ncs/ncs-5.4/netsim/confd/bin/confdc --use-description --yangpath ../src/tmp-yang \ -c -o junos-rpc.fxs ../src/tmp-yang/junos-rpc.yang make -C esrc all make[2]: Entering directory `/tmp/juniper-junos-nc-4.6/netsim/esrc' erlc -I /opt/ncs/ncs-5.4/erlang/econfd/include -o ../ ec_junos_ext_vlan_netsim_hook.erl make[2]: Leaving directory `/tmp/juniper-junos-nc-4.6/netsim/esrc' make[1]: Leaving directory `/tmp/juniper-junos-nc-4.6/netsim'
$ cd ../load-dir
$ ls -ltr total 8 -rw-r--r-- 1 root root 1349 Jan 16 20:09 tailf-ned-id-juniper-junos-nc.fxs -rw-r--r-- 1 root root 1372 Jan 16 20:09 tailf-ned-id-juniper-junos-nc-4.6.fxs lrwxrwxrwx 1 root root 37 Jan 16 20:10 junos.fxs -> ../src/ncsc-out/modules/fxs/junos.fxs lrwxrwxrwx 1 root root 41 Jan 16 20:11 junos-rpc.fxs -> ../src/ncsc-out/modules/fxs/junos-rpc.fxs

$ ls -ltr ../src/ncsc-out/modules/fxs/junos.fxs
ls: cannot access ../src/ncsc-out/modules/fxs/junos.fxs: No such file or directory

 

NSO debug log during start of NSO

ncs[506]: - Enabling daemon log
ncs[506]: - Starting NCS vsn: 5.4
ncs[506]: - Loading file confd.fxs
ncs[506]: - Loading file ietf-yang-types.fxs
ncs[506]: - Loading file ietf-inet-types.fxs
ncs[506]: - Loading file ietf-datastores.fxs
ncs[506]: - Loading file ietf-yang-library.fxs
ncs[506]: - Loading file ietf-yang-patch.fxs
ncs[506]: - Loading file ietf-netconf.fxs
ncs[506]: - Loading file ietf-netconf-with-defaults.fxs
ncs[506]: - Loading file netconf_netmod.fxs
ncs[506]: - Loading file ietf-restconf.fxs
ncs[506]: - Loading file tailf-rest-error.fxs
ncs[506]: - Loading file tailf-rest-query.fxs
ncs[506]: - Loading file confd_cfg.fxs
ncs[506]: - Loading file config.fxs
ncs[506]: - Loading file netconf_notification.fxs
ncs[506]: - Loading file netconf_actions.fxs
ncs[506]: - Loading file yang.fxs
ncs[506]: - Loading file tailf_netconf.fxs
ncs[506]: - Loading file cli-builtin.fxs
ncs[506]: - Loading file tailf-ncs-config.fxs
ncs[506]: - Loading file /etc/ncs/ncs.conf
ncs[506]: - Consulting daemon configuration file /etc/ncs/ncs.conf
ncs[506]: - Copying NCS package from /var/opt/ncs/packages/juniper-junos-nc-4.6 to /var/opt/ncs/state/packages-in-use.new/1
ncs[506]: - Bad configuration: /etc/ncs/ncs.conf:0: "/var/opt/ncs/packages/juniper-junos-nc-4.6/load-dir/junos.fxs: Failed to copy: no such file or directory"
"Bad configuration: /etc/ncs/ncs.conf:0: \"/var/opt/ncs/packages/juniper-junos-nc-4.6/load-dir/junos.fxs: Failed to copy: no such file or directory\"\n"

 

Thanks!

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Beginner

I found the issue.

During compilation process of the Juniper NED, the compiler ran into Out-of-Memory (OOM) error due to size of the junos.yang file

Unfortunately the compiler process didn't throw any log message about the error.

My container wasis running on Docker Desktop (Docker for Windows).

The memory of Docker Engine was limited by 2 GB.

After I increased the memory limit to 4GB the compilation process finished correctly and NSO can load all necessary fxs files.

View solution in original post

1 REPLY 1
Highlighted
Beginner

I found the issue.

During compilation process of the Juniper NED, the compiler ran into Out-of-Memory (OOM) error due to size of the junos.yang file

Unfortunately the compiler process didn't throw any log message about the error.

My container wasis running on Docker Desktop (Docker for Windows).

The memory of Docker Engine was limited by 2 GB.

After I increased the memory limit to 4GB the compilation process finished correctly and NSO can load all necessary fxs files.

View solution in original post