fix(recording): give RAP services a valid HOME so Bundler stops warni… - #18
Open
antobinary wants to merge 1 commit into
Open
fix(recording): give RAP services a valid HOME so Bundler stops warni…#18antobinary wants to merge 1 commit into
antobinary wants to merge 1 commit into
Conversation
…ng (bigbluebutton#16374) The `bigbluebutton` system user is created with home `/home/bigbluebutton` (build/deb-helper.sh `addUser` -> `useradd -d` without `--create-home`), but that directory is never created on disk. The record-and-playback services run as this user and load `bundler/setup`, so Bundler finds HOME missing and logs "`/home/bigbluebutton` is not a directory", falling back to a temp dir. It is cosmetic (recordings keep working) but shows up red in the journal / `bbb-record --watch`. Point HOME at a real, package-owned directory (`/var/lib/bigbluebutton`) in the three RAP systemd units, and create + chown that directory in the bbb-record-core postinst so it exists and is writable by the user. This follows the maintainer's suggested direction from the issue (redirect HOME rather than materialize a `/home` dir for a daemon account), but ships inside the package so it also survives upgrades — unlike the manual systemd override, which gets wiped on the next install. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
🚨 Automated tests failed |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Title: fix(recording): give RAP services a valid HOME so Bundler stops warning about /home/bigbluebutton
What
The three record-and-playback (RAP) systemd services now run with
HOME=/var/lib/bigbluebutton(a real, package-owned directory) instead of inheriting thebigbluebuttonuser's non-existent/home/bigbluebutton. Thebbb-record-corepostinst creates andchowns that directory.Closes bigbluebutton#16374.
Why
On startup,
bbb-record --watchand the service journals show a red error:It is cosmetic — recordings process fine — but it's noisy, reads like a failure, and has been reported repeatedly across 2.6 → 3.0 → 3.0.1.
Root cause
The
bigbluebuttonsystem user is created with home/home/bigbluebutton:but the
addUserhelper runsuseradd -d <home>without--create-home, so the directory is never created on disk:The RAP services run as this user and
require 'bundler/setup', so Bundler resolves$HOME, finds/home/bigbluebuttonmissing, prints the warning, and falls back to a temp dir. (By contrast, theetherpadandfreeswitchdaemon users don't hit this — their homes/usr/share/etherpad-liteand/opt/freeswitchactually exist.)All three RAP services are affected because each loads
bundler/setup:bbb-rap-resque-worker.service— runsbundle exec rake … resque:workersbbb-rap-starter.service—rap-starter.rbbbb-rap-caption-inbox.service—rap-caption-inbox.rbHow
Environment=HOME=/var/lib/bigbluebuttonin the three RAP unit files:chownthe directory inbbb-record-core's postinst, inside the existingif id $BBB_USERguard:Decision — why this approach
In the issue, @ffdixon proposed redirecting
HOMEvia a systemd override rather than creating/home/bigbluebutton:This PR follows that same intent — redirect
HOME, don't materialize a/homedirectory for a daemon account — but hardens it in two ways:HOMEinto the packaged units plus creating the dir in postinst means it's applied on every install/upgrade automatically./var/lib/bigbluebuttoninstead of/tmp./tmpis world-writable and can be cleaned out from under a long-running service;/var/lib/<pkg>is the FHS-standard location for a daemon's private state, is user-owned, and persists.Alternatives considered
/home/bigbluebutton— simplest one-liner, but a system/daemon account conventionally shouldn't own a/homedirectory (FHS expects/var/lib), and it opts into persistent writable state under/home. Rejected in favor of the maintainer's redirect approach.--create-hometo the sharedaddUserhelper — would only fix fresh installs (not already-created users on upgrade) and would change user creation for every other package. Too broad a blast radius for this bug.Testing
bash -n build/packages-template/bbb-record-core/after-install.shpasses./home/bigbluebuttonwarning and the RAP processes'HOMEresolves to/var/lib/bigbluebutton.