Help! My XRd is not booting!
I recently faced an issue where my XRd device was not booting on a brand new ubuntu VM, and I wanted to share the solution with 0.0.0.0/0.
The issue
I was playing with containerlab (https://github.com/srl-labs/containerlab), and tried to boot up a cool XRd lab. Unfortunately, the XRd was not rechable. Took me a while to troubleshoot this. In a nutshell :
- XRd was not booting
- I downloaded xrd-tool, to try to boot a single container with some more logs easily (https://github.com/ios-xr/xrd-tools)
- Found some dirty logs :
ctrace_enable_configuration(): inotify_init() failed. Too many open files (24)
ctrace_enable_configuration2 failed with error 0x2
shelfmgr: infra/infra/lw_messaging/linux/src/lw_mess_socket_ds_funcs.c:633: void lwm_ds_connect(event_mgr_p): Assertion `0' failed.
The solution
It turns out it is the ubuntu max user instance that is breaking the XRd boot sequence, by limiting the number of inotify instances. You can check the current value with the following command :
cat /proc/sys/fs/inotify/max_user_instances
I used to have 128. I tried with 256 and 512, but it wasn’t enough. I finally set it to 8192, and it worked.
Temporary change :
sudo sysctl fs.inotify.max_user_instances=8192
Definitive change :
sudo vim /etc/sysctl.conf
fs.inotify.max_user_instances = 8192
And that’s it! XRd is booting on ubuntu 22.04!
Note : If you were also playing with containerlab, don’t forget to delete all the existing XRd file before trying to deploy a new lab once again : the config file are probably incomplete.
To be continued
I may write a follow up post about how to use containerlab with XRd to test your configurations ;).