tripleo-image-elements/elements/sysctl
Steve Kowalik 20c9db91d5 Add a sysctl-append-value script
The sysctl element works on the assumption that sysctl values are
going to be set by elements that are not used in the same image, and
that therefore, conflicting options would be bad. Some elements would
like to append options to a list, allowing multiple elements to
change the same value.

Change-Id: I4bbfbac716b842210cea2b6af289da78043fd4a7
2014-07-10 21:41:24 -07:00
..
bin Add a sysctl-append-value script 2014-07-10 21:41:24 -07:00
install.d A sysctl element to manage settings via sysctl.d. 2014-04-16 21:18:21 -04:00
os-refresh-config/configure.d A sysctl element to manage settings via sysctl.d. 2014-04-16 21:18:21 -04:00
element-deps A sysctl element to manage settings via sysctl.d. 2014-04-16 21:18:21 -04:00
README.md Add a sysctl-append-value script 2014-07-10 21:41:24 -07:00

Manages sysctl settings.

There are four ways to make use of this element:

  1. Elements can make use of sysctl-set-value directly by requiring this element and calling /usr/local/bin/sysctl-set-value. This will help ensure conflicting sysctl values are not in use across elements. Please note that this script calls sysctl -p, which will set the sysctl value on the build host while the image is building, which may be unintended.

  2. Elements can make use of sysctl-write-value directly by requiring this element and calling /usr/local/bin/sysctl-write-value. This script does not verify values, or set them on the build host, it only writes the files into the image, so that the values will be set when the image is booted.

  3. Elements can make use of sysctl-append-value to set values that complement values set by other elements, rather than overwriting or conflicting with them. This script also does not set the sysctl value on the build host.

  4. Alternately you can make use of the element via Heat by adding metadata in the configuration example below. sysctl-set-value will take care of applying these settings during configuration time.

Configuration example

sysctl: net.ipv4.conf.all.arp_filter: 1 net.ipv4.conf.all.arp_ignore: 2 net.ipv4.conf.all.arp_announce: 2 net.ipv4.conf.default.arp_filter: 1 net.ipv4.conf.default.arp_ignore: 2 net.ipv4.conf.default.arp_announce: 2

** Any valid sysctl key/value may be specified in this configuration format.