New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
lldpcli can't lock socket, execute configuration on FreeBSD13.0-RELEASE #445
Comments
It seems FreeBSD does not allow to place a lock on Unix sockets. As advisory locks require an open file descriptor, it is not even clear if they are expected to work on Unix sockets at all. A clean solution would be to lock another file, but we don't have the rights to build a lock in the same directory as the socket. An alternative would be to build the lock in |
Could you try the latest master? |
I had to |
Maybe I could use |
MacOS does not seem to have a directory for that either. I could just use |
I'm not sure what the standard thing to do is. It seems like there may just not be a standard place:
|
I have pushed another commit (a1c9d4b) where I put the lock in the same directory as the control socket. |
Bug description
Can't load or modify configuration on FreeBSD13.0-RELEASE because
lldpcli
andlldpctl
can't lock the shared socket (e.g./var/run/lldpd.socket
by default)Steps to reproduce the problem
Either install binary via
sudo pkg install lldpd
or build via ports, both hit the bug on both my machinesRun
lldpd -d
Expected outcome
lldpcli
should lock/var/run/lldpd.socket
and execute configurationCurrent outcome
No configuration changes from the default succeed, either via config file or via manual
lldpcli
Additional information
lldpd -vv
(for the pkg version):uname -sro
:More system details:
-- Generic kernel
-- Everything installed via pkg
-- No weird build options or kernel tunables set or anything
Snippet of
truss lldpcli -u /tmp/lldpd.scoket
output when trying to executeconfigure system hostname "Foo"
while lldpd is running:(The
-u /tmp/lldpd.socket
was just to eliminate any possible strange interaction with OpenZFS, my/tmp
is just a regular tmpfs but my/var
is a ZFS dataset)I don't have a FreeBSD12.x or FreeBSD11.x VM handy so I haven't had a chance to try on earlier releases, but the bug does manifest identically on 2 different FreeBSD13.0 installs, one a DigitalOcean VM and the other a physical machine. Sorry in advance if this is a known bug that was fixed since 1.0.8, I skimmed the recent commits quickly and didn't see anything but I may just have missed it.
EDIT: Just tried building from source with the
1.0.11
tarball & creating the/usr/local/var/run/lldpd
chroot, still hit the same errorThe text was updated successfully, but these errors were encountered: