Docker taking ages to start #7
snaens
started this conversation in
Docs-Notes
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
For a long time I had no idea why the docker daemon on all out robots was taking so long to boot up.
This was a serious problem, as rebooting a robot after a critical failure would take minutes of precious competition time.
Turns out it's because of us using
systemd-networkdfor CAN setup!How I came across this problem:
internetted "linux service slow start", execute suggested command
huh, that's odd, what's the holdup?
Hold up, everything is waiting for
systemd-networkd-wait-online.service?!I enabled
systemd-networkdfor our automagic CAN setup!helpful: https://www.baeldung.com/linux/systemd-networkd-wait-online-service-timeout-solution
ok, two options:
systemd-networkd-wait-online.serviceto not do the timeout thingyFixing it
I first chose Option 2: doing it the way Prof. May did it in edu_drive_ros2 - with udev rules.
But unlike his approach, I really didn't wanna construct some intricate mess of services, so I simply made udev run the commands.
/etc/udev/rules.d/99-EduArt_canbus.rules
But soon I realized that naming is necessary, as the names are random by default.
And with udev you can't use original, lowercase letters, as they clash with each other when they get
renamed one after another.
Plus, I'd have to make another config for Bento-Box's usb-based CAN comms.
So I went back to Option 1.
I suppose systemd-networkd somehow takes ids and stuff into account, as the CAN names are always the same.
We modify the service with
sudo systemctl edit systemd-networkd-wait-online.serviceand add this content:(what the linked website suggested)
This creates a file under
/etc/systemd/system/systemd-networkd-wait-online.service.d/override.conf.I copied it to the robot repos, and changed the setup scripts to install it back.
Fixed!
Beta Was this translation helpful? Give feedback.
All reactions