Bug 252610

Summary: databases/cassandra3: use daemon for automatic restart
Product: Ports & Packages Reporter: Lapo Luchini <lapo>
Component: Individual Port(s)Assignee: freebsd-ports-bugs (Nobody) <ports-bugs>
Status: Closed FIXED    
Severity: Affects Some People CC: fernape, language.devel
Priority: --- Keywords: patch
Version: LatestFlags: language.devel: maintainer-feedback+
Hardware: Any   
OS: Any   
Attachments:
Description Flags
unified patch none

Description Lapo Luchini 2021-01-12 14:12:10 UTC
Created attachment 221492 [details]
unified patch

Maybe it's just me, as I have a couple of nodes which are a little memory challenged and at times die in OutOfMemory errors… but seems a nice idea to auto-restart Cassandra if/when it dies anyways.

PS: this is against databases/cassandra3 but the same patch could be useful in databases/cassandra4 as well.
Comment 1 Fernando ApesteguĂ­a freebsd_committer freebsd_triage 2021-01-13 12:33:10 UTC
^Triage: [tags] in issue Titles are deprecated.

^Triage: Simplifying title
Comment 2 Angelo Polo 2021-01-13 17:38:23 UTC
The second '-f' flag in the command_args is to put cassandra into the foregroung? The first '-f' to daemon redirects all IO to /dev/null, so what is the overall effect?
Comment 3 Lapo Luchini 2021-01-14 12:52:10 UTC
Yes, Cassandra needs to remain in the foreground, as without `-f` parameter it starts a (separated) daemon process and the launch program closes immediately (and thus `daemon` would think it died and re-start it immediately).
Comment 4 Lapo Luchini 2021-01-14 16:23:45 UTC
The first `-f` does the same that `>/dev/null 2>/dev/null` does in the current version.
Comment 5 Lapo Luchini 2021-02-15 09:26:51 UTC
Already committed by bug #253312 (in r564833).