cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Faidon Liambotis (JIRA)" <>
Subject [jira] [Commented] (CASSANDRA-6232) Installation shouldn't fail if /etc/sysctl.d/cassandra is deleted
Date Thu, 24 Oct 2013 20:36:04 GMT


Faidon Liambotis commented on CASSANDRA-6232:

-f works and is a good idea nevertheless, but the warnings mentioning OpenVZ are still echo'ed
if the file doesn't exist, which can be confusing.

I'd suggest also making the
        if ! sysctl -p /etc/sysctl.d/cassandra.conf; then

line into
        if [ -r /etc/sysctl.d/cassandra.conf ] && ! sysctl -p /etc/sysctl.d/cassandra.conf;

> Installation shouldn't fail if /etc/sysctl.d/cassandra is deleted
> -----------------------------------------------------------------
>                 Key: CASSANDRA-6232
>                 URL:
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Packaging
>            Reporter: Faidon Liambotis
>            Assignee: Brandon Williams
>            Priority: Minor
>             Fix For: 1.2.12, 2.0.3
> The Debian package's postinst currently has this snippet code, under the "configure"
action (i.e. what runs when installing or upgrading):
> {code:none}
>         if ! sysctl -p /etc/sysctl.d/cassandra.conf; then
>             [...]
>             rm -v /etc/sysctl.d/cassandra.conf
>         fi
> {code}
> /etc/sysctl.d/cassandra.conf is a conffile and might be removed by the system administrator.
The sysadmin might not want this sysctl setting or have an entirely different system of managing
the /etc/sysctl.d hierarchy (in our case that would be puppet).
> Since this piece of code doesn't check for the existence and doesn't use rm's "-f" argument,
if the file doesn't exist the rm call fails and the package installation is aborted.
> I'd propose checking for the file's existence instead of just "sysctl -p", so that you
can avoid the nasty warnings too, but adding -f to rm shouldn't hurt either.
> Note that this would probably fail on package upgrades under OpenVZ too, which according
to the error message should be a supported configuration.

This message was sent by Atlassian JIRA

View raw message