cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Faidon Liambotis (JIRA)" <j...@apache.org>
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

    [ https://issues.apache.org/jira/browse/CASSANDRA-6232?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13804645#comment-13804645
] 

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
{code:none}
        if ! sysctl -p /etc/sysctl.d/cassandra.conf; then
{code}

line into
{code:none}
        if [ -r /etc/sysctl.d/cassandra.conf ] && ! sysctl -p /etc/sysctl.d/cassandra.conf;
then
{code}

> Installation shouldn't fail if /etc/sysctl.d/cassandra is deleted
> -----------------------------------------------------------------
>
>                 Key: CASSANDRA-6232
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-6232
>             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
(v6.1#6144)

Mime
View raw message