hellt / vrnetlab

Make VM-based Network OSes run in Containerlab
https://containerlab.dev
MIT License
126 stars 86 forks source link

failed to Statfs "/proc/0/ns/net": no such file or directory" error when using nxos #280

Closed nagraj-kulkarni closed 5 days ago

nagraj-kulkarni commented 5 days ago

Hello,

built a docker image for nxos with did not see any errors when building the docker image of nxos, but when i try to use this image with netlab, getting below error :

ERRO[0003] failed deploy links for node "router": failed to Statfs "/proc/0/ns/net": no such file or directory

Appreciate any pointers on this. built many other images but facing this only with nxos

hellt commented 5 days ago

this is due to a prematurely exited container. Check out container logs with docker logs <container name>

I am closing this as this is not related to vrnetlab specifically, you can check out what caused the container to crash and update the thread

nagraj-kulkarni commented 5 days ago

ok, this is what is gettnig it. clab is the provider for netlab. I built a new container for cisco xrv router with vrnetlab and tried to use it. Got same situation as that nxos..

2024-11-08 09:36:52,648: launch DEBUG acting flags: username 'vrnetlab', password 'VR-netlab9', connection-mode 'vrxcon' 2024-11-08 09:36:52,649: launch DEBUG Environment variables: environ({'PATH': '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', 'HOSTNAME': 'router', 'TERM': 'xterm', 'CLAB_LABEL_CONTAINERLAB': 'ml_4', 'CLAB_LABEL_CLAB_NODE_KIND': 'cisco_xrd', 'CLAB_INTFS': '2', 'XR_FIRST_BOOT_CONFIG': '/etc/xrd/first-boot.cfg', 'XR_INTERFACES': 'linux:Gi0-0-0-0,xr_name=Gi0/0/0/0;linux:Gi0-0-0-1,xr_name=Gi0/0/0/1;', 'CLAB_LABEL_CLAB_NODE_GROUP': '', 'CLAB_LABEL_CLAB_TOPO_FILE': '/home/admin/iosxr/clab.yml', 'CLAB_LABEL_CLAB_OWNER': 'root', 'XR_MGMT_INTERFACES': 'linux:eth0,xr_name=Mg0/RP0/CPU0/0,chksum,snoop_v4,snoop_v6', 'CLAB_LABEL_CLAB_NODE_LAB_DIR': '/home/admin/iosxr/clab-ml_4/router', 'CLAB_LABEL_CLAB_NODE_NAME': 'router', 'CLAB_LABEL_CLAB_NODE_TYPE': '', 'HOME': '/root', 'LC_CTYPE': 'C.UTF-8'}) Traceback (most recent call last): File "/launch.py", line 275, in vr = XRV(args.hostname, args.username, args.password, args.connection_mode) File "/launch.py", line 238, in init self.vms = [XRV_vm(hostname, username, password, conn_mode)] File "/launch.py", line 49, in init username, password, disk_image=disk_image, ram=3072 UnboundLocalError: local variable 'disk_image' referenced before assignment

hellt commented 5 days ago

the log shows that the kind for this image is cisco_xrd XRd is a container NOS, not a VM, you shouldn't have used vrnetlab to build it.

Maybe you used the wrong kind

nagraj-kulkarni commented 5 days ago

oh ok, Thanks a lot, did not notice that, guess something similar might have happened with nxos also..

nagraj-kulkarni commented 4 days ago

For nxos, did not see any error while building the docker image. When i use it, get below error in the docker logs:

Traceback (most recent call last): File "/launch.py", line 174, in vr = NXOS( File "/launch.py", line 145, in init self.vms = [NXOS_vm(hostname, username, password, conn_mode)] File "/launch.py", line 47, in init username, password, disk_image=disk_image, ram=4096, smp="2" UnboundLocalError: local variable 'disk_image' referenced before assignment