[
https://issues.apache.org/jira/browse/CASSANDRA-6232?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Brandon Williams resolved CASSANDRA-6232.
-----------------------------------------
Resolution: Fixed
Fix Version/s: 2.0.3
1.2.12
I don't see any harm with adding -f, done in 1f4070dbf2
> 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)