Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 650148 - net-nds/rpcbind-02.4.-r2 will not start with systemd and USE="-warmstart"
Summary: net-nds/rpcbind-02.4.-r2 will not start with systemd and USE="-warmstart"
Status: UNCONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords: PATCH
Depends on:
Blocks:
 
Reported: 2018-03-10 21:46 UTC by Neil Bothwick
Modified: 2018-03-17 12:30 UTC (History)
4 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
fix rpcbind.service warmstart flags (0001-fix-rpcbind.service-warmstart-flags.patch,1.43 KB, patch)
2018-03-12 14:12 UTC, Benoit Gschwind
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Neil Bothwick 2018-03-10 21:46:15 UTC
The service file installed with this version tries to start "rpcbind -w -f" but this fails if rpcbind was built without warmstart support - which is the default.

% systemctl status rpcbind.service
● rpcbind.service - RPC Bind
   Loaded: loaded (/lib/systemd/system/rpcbind.service; disabled; vendor preset: disabled)
   Active: failed (Result: exit-code) since Sat 2018-03-10 21:44:13 GMT; 23s ago
     Docs: man:rpcbind(8)
  Process: 16948 ExecStart=/sbin/rpcbind $RPCBIND_OPTIONS -w -f (code=exited, status=1/FAILURE)
 Main PID: 16948 (code=exited, status=1/FAILURE)

Mar 10 21:44:13 desiato systemd[1]: Starting RPC Bind...
Mar 10 21:44:13 desiato rpcbind[16948]: usage: rpcbind [-adhilswf]
Mar 10 21:44:13 desiato systemd[1]: rpcbind.service: Main process exited, code=exited, status=1/FAILURE
Mar 10 21:44:13 desiato systemd[1]: rpcbind.service: Failed with result 'exit-code'.
Mar 10 21:44:13 desiato systemd[1]: Failed to start RPC Bind.

Rebuilding with USE=warmstart, or removing the -w option from the service file both result in a successful restart.
Comment 1 Neil Bothwick 2018-03-10 21:49:20 UTC
s/warmstart/warmstarts/
Comment 2 Neil Bothwick 2018-03-11 22:31:21 UTC
Adding this function to the ebuild fixes the issue:

pkg_preinst() {
    use warmstarts || sed -i 's:ExecStart=/sbin/rpcbind $RPCBIND_OPTIONS -w -f:ExecStart=/sbin/rpcbind $RPCBIND_OPTIONS -f:' "${D}/lib/systemd/system/rpcbind.service"
}
Comment 3 Neil Bothwick 2018-03-11 22:32:40 UTC
The contents of the function are a single line, Bugzilla helpfully wrapped them :(
Comment 4 Benoit Gschwind 2018-03-12 13:20:06 UTC
Hello,

I confirm the issue.

The proposed solution look correct (I did not tested it)

@Neil Bothwick: please submit a patch, if you want I may make one.
Comment 5 Benoit Gschwind 2018-03-12 14:12:47 UTC
Created attachment 523562 [details, diff]
fix rpcbind.service warmstart flags

Hello,

I made a patch to fix the issue. I tested it using epatch feature.

I will submit the patch to the main stream of rpcbind.

The patch add or remove the "-w" of the rpcbind.service file at configure phase according the the --enable/disable-warmstart flags.

Best regards.
Comment 6 Neil Bothwick 2018-03-13 09:12:50 UTC
rpcbind-0.2.4-r3 is in the tree, but instead of using either of the solutions given here it brute forces the problem by forcing on the warmstarts flag if systemd is set.