bloomberg/chef-bcpc — pull request #328 by cbaenziger (2014-09-19 14:35:25+00:00)
Title: Configuration Cleanups

This PR contains a few general configuration clean-ups:

## YARN Configuration Fixes
Here the intention is to provide YARN configurables for memory, CPU and scheduler. In particular, memory and CPU are auto-tuning based on how much of a machine should be available for offer via YARN.

There are some minimums for CPU (1 VCPU) and memory (1024 MB) to be an acceptable quantity for a nodemanager to operate. Should one want to provide specific quantities, there are counts (CPU) and size (memory) attributes which will override.

In providing an attribute for the scheduler class, pre-emption is quite a nice feature of the fair-scheduler so I went ahead and provided a `fair-scheduler.xml` and set it to be the default.

## ulimits

Thanks to PAM not including `limits.so` by default on Ubuntu, the `limits.d` configurations shipped by Hortonworks are not actually in use. As such we now provide a shim rewrite of the `common-session` via the community [Pam cookbook](https://github.com/evertrue/pam-cookbook/).

Similarly, kafka has only had a default `nofiles` ulimit applied in the past. We now leverage the [chef-ulimit cookbook](https://github.com/bmhatfield/chef-ulimit) to apply a reasonable limit.

## Tracking upstream sysctl cookbook

The `sysctl` cookbook was previously frozen at version 0.3.5, there has been a lot of positive development to lessen churn due to better LWRP idempotence in `sysctl` so lets again track their stable.

## Stop disabiling IPv6 at the OS level

Previously we have been doing two things which are rather egregious on machines; one, we have been disabling IPv6 at the OS level via sysctl settings while two, we were bouncing networking when making those changes. Instead, we should only configure aflicted daemons to prefer IPv4 to not have machines which are brittle running half-disabled IP stacks or bouncing networking every Chef run.