commit | 8c974f76411cb40f2c9c25cddd86814087d0eddf | [log] [tgz] |
---|---|---|
author | Tyson Tuckerbear <ttucker@google.com> | Mon Sep 19 15:49:06 2022 -0700 |
committer | Tyson Tuckerbear <ttucker@google.com> | Thu Mar 20 20:14:20 2025 +0000 |
tree | 2373c634e430cc3e27884d9aa695d4935c6ab053 | |
parent | 7acc8a2de959c7600bd38d65d8c5d21f488a45c6 [diff] |
ipmid: Switch to /var/run for lockfiles - This prevents IPMI connections from the host to the BMC from failing if the BMC's root ('/') partition fills up or is otherwise unwriteable. - In the full filesystem case, this error only happens if the filesystem fills up prior to the first operation after flashing an image. This is because lockfiles are only created at connection time (e.g. see cacheUserDataFile() in user_channel/user_mgmt.cpp), so the failure only happens if no other operation has been performed since the image was first flashed. - For the "root is otherwise unwriteable" case, all locking operations would fail, since even though the files may exist, they can't be opened as writeable. - This approach is chosen since (a) `/var/run` is arguably the correct place for daemons to write runtime info, and (b) `/var/run` uses `tmpfs` so it should always be able to mount `rw`. - Note that this does not prevent the "full filesystem" failure entirely, since other things may fill up `tmpfs`. The complete solution would include creating the files at start time (e.g. using systemd), which I will do in a followup change. Tested: Flashed BMC with new image containing updated IPMI daemons. Verified that IPMI operations work and that lock files are now created in `/var/run/ipmi/` instead of `/var/lib/ipmi/`. Signed-off-by: Tyson Tuckerbear <ttucker@google.com> Change-Id: I33eb33ddb0009a978d5cea3fcd5615c45ce4416c
meson builddir ninja -C builddir
meson builddir -Dbuildtype=minsize -Db_lto=true -Dtests=disabled ninja -C builddir
If any of the dependencies are not found on the host system during configuration, meson automatically gets them via its wrap dependencies mentioned in ipmid/subprojects
.
meson builddir -Dwrap_mode=nofallback ninja -C builddir
meson builddir -Dbuildtype=debug ninja -C builddir
meson builddir -Db_coverage=true -Dtests=enabled ninja -C builddir test ninja -C builddir coverage