Bug 252610 - databases/cassandra3: use daemon for automatic restart
Summary: databases/cassandra3: use daemon for automatic restart
Status: Closed FIXED
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: patch
Depends on:
Blocks:
 
Reported: 2021-01-12 14:12 UTC by Lapo Luchini
Modified: 2021-02-15 09:26 UTC (History)
2 users (show)

See Also:
language.devel: maintainer-feedback+


Attachments
unified patch (577 bytes, patch)
2021-01-12 14:12 UTC, Lapo Luchini
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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).