20c9db91d5
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 |
||
---|---|---|
.. | ||
bin | ||
install.d | ||
os-refresh-config/configure.d | ||
element-deps | ||
README.md |
Manages sysctl settings.
There are four ways to make use of this element:
-
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.
-
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.
-
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.
-
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.