Curtin Userdata customization: update sysctl to allow running MANY lxd containers
The snippet can be accessed without any authentication.
Authored by
Fulvio Galeazzi
Edited
#
# Xenial: update some sysctl settings so that Juju can run more than 12 LXC containers on a physical server
#
diff -c curtin_userdata_ubuntu_amd64_generic_trusty_csd curtin_userdata_ubuntu_amd64_generic_xenial_csd
*** curtin_userdata_ubuntu_amd64_generic_trusty_csd 2017-03-06 15:48:46.968799000 +0000
--- curtin_userdata_ubuntu_amd64_generic_xenial_csd 2017-02-07 09:56:18.710546571 +0000
***************
*** 27,33 ****
--- 27,39 ----
timezone_01_config: ["curtin", "in-target", "--", "sh", "-c", "ln -sf /usr/share/zoneinfo/Europe/Vatican /etc/timezone"]
timezone_02_set: ["curtin", "in-target", "--", "sh", "-c", "dpkg-reconfigure --frontend noninteractive tzdata"]
limits_01_add: ["curtin", "in-target", "--", "sh", "-c", "/bin/echo '* soft nofile 1048576' >> /etc/security/limits.conf ; /bin/echo '* hard nofile 1048576' >> /etc/security/limits.conf"]
+ sysctl_01_add: ["curtin", "in-target", "--", "sh", "-c", "/bin/echo 'fs.inotify.max_queued_events = 1048576' >> /etc/sysctl.conf "]
+ sysctl_02_add: ["curtin", "in-target", "--", "sh", "-c", "/bin/echo 'fs.inotify.max_user_instances = 2048' >> /etc/sysctl.conf "]
+ sysctl_03_add: ["curtin", "in-target", "--", "sh", "-c", "/bin/echo 'fs.inotify.max_user_watches = 1048576' >> /etc/sysctl.conf "]
+ sysctl_04_add: ["curtin", "in-target", "--", "sh", "-c", "/bin/echo 'vm.max_map_count = 262144' >> /etc/sysctl.conf "]
ifaceeth0_01_preup: ["curtin", "in-target", "--", "sh", "-c", "/bin/echo 'pre-up [ -z `cat /proc/net/bonding/* | grep Slave | grep eth0` ] && true ' >> /etc/network/interfaces.d/eth0.cfg"]
Please register or sign in to comment