Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Properly set FD_LIMIT in sysv init when installing from package #201

Merged
merged 1 commit into from
Jul 27, 2015

Conversation

richid
Copy link
Contributor

@richid richid commented Jul 23, 2015

The default['cassandra']['limits']['nofile'] attribute is not used when
installing from a package on Debian/Ubuntu. This change uses Chef's
FileEdit utility to replace the existing value with the value specified
in the attribute.

Tests pass with rake. This has no impact on CentOS 6.5 as it already respects the attribute and it's not defined in /etc/init.d/cassandra. I tested on Ubuntu 11.04, 12.04, and 14.04 and verified that the FD_LIMIT variable is modified as expected.

Thanks for the fantastic coobook!

@richid richid changed the title Properly set FD_LIMIT in sysv init when install from package Properly set FD_LIMIT in sysv init when installing from package Jul 23, 2015
@richid richid force-pushed the set-fd-limit-package branch from 62199c1 to d7768de Compare July 23, 2015 17:52
@michaelklishin
Copy link
Owner

May I ask you to consider using Chef's replacement utility? Or confirm that this change is portable between *nix OSes.

@richid
Copy link
Contributor Author

richid commented Jul 24, 2015

Good call, didn't even think to use FileEdit. I'll use that and push up a new version.

@michaelklishin
Copy link
Owner

Thank you!

…bian

The default['cassandra']['limits']['nofile'] attribute is not used when
installing from a package on Debian/Ubuntu. This change uses Chef's
FileEdit utility to replace the existing value with the value specified
in the attribute.
@richid richid force-pushed the set-fd-limit-package branch from d7768de to 8330f01 Compare July 27, 2015 15:21
@richid
Copy link
Contributor Author

richid commented Jul 27, 2015

Updated with your recommendations and additional testing. I also made some minor changes to the Vagrantfile as it wasn't working as-is. Let me know if want me to pull those out.

Thanks!

michaelklishin added a commit that referenced this pull request Jul 27, 2015
Properly set FD_LIMIT in sysv init when installing from package
@michaelklishin michaelklishin merged commit d2194f6 into michaelklishin:master Jul 27, 2015
@michaelklishin
Copy link
Owner

Thank you!

@michaelklishin
Copy link
Owner

In 3.4.0, available in your local Chef supermarket!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants