Bug 262733 - databases/py-carbon: within jail: early start failure due to rc-script issue
Summary: databases/py-carbon: within jail: early start failure due to rc-script issue
Status: New
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: freebsd-ports-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-03-23 09:36 UTC by O. Hartmann
Modified: 2022-05-06 08:56 UTC (History)
0 users

See Also:
ohartmann: maintainer-feedback+


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description O. Hartmann 2022-03-23 09:36:39 UTC
Running databases/py-carbon (with Python 3.8 as default) within a jail (base host is running 13.0-RELENG-p10, jail is running the same OS version: 13.0-RELEASE-p10 FreeBSD 13.0-RELEASE-p10 releng/13.0-n244791-312522780e8 KIPMON  amd64.

Starting within a jail databases/py-carbon from /etc/rc.conf.local fails, the host's log reports:

[...]
Starting carbon.
ld-elf.so.1: Shared object "libpython3.8.so.1.0" not found, required by "python3.8"
/etc/rc: WARNING: failed to start carbon
ELF ldconfig path: /lib /usr/lib /usr/lib/compat /usr/local/lib /usr/local/lib/compat/pkg /usr/local/lib/compat/pkg /usr/local/lib/perl5/5.32/mach/CORE
32-bit compatibility ldconfig path: /usr/lib32
Starting Network: lo0 epair40a.
[...]

It seems the carbon cache is started too early so the ldconfig utility doesn't has the expanded paths in "LD_LIBRARY_PATH" as expected and the above log snippet indicates this fact - the expansion of ldconfig towards /usr/local/lib comes too late for carbon; after the jail is up and running, the carbon cache can be started manually without any problems.

My naive thinking let me expand the carbon's rc script with "# REQUIRE: lfconfig", but this did not resolve the issue, I could watch the ldconfig paths being resolved prior the carbon cache script startup, but hen the script simply fails to start - no matter why. Even being total pessimistic and enforcing "' REQUIRE: LOGIN" did not resolve anything, I can see carbon being started in the jail-hosts log, but switching over to the jail and checking the service about its state reveals that the carbon cache is not running. Starting the carbon cache manually after login works nicely.
Comment 1 O. Hartmann 2022-03-23 09:39:53 UTC
Addendum: 

my bad - with 

# REQUIRE: LOGIN

in /usr/local/etc/rc.d/carbon the service is starting as expected at jail's boot time.
Comment 2 O. Hartmann 2022-05-06 08:55:46 UTC
This issue is still open and problematic for carbon cache running within a jail (in our cases).