Setting sysctl variables in cloud-config

Hi,

I’m new to rancherOS, so I might be missing something obvious.

I really like the fact that the system can be configured using cloud-config, but I’m having trouble setting my cloud config such that it changes sysctl values. The relevant part of my config reads:

rancher:
  sysctl:
    kernel.shmmax: 4294967295
    kernel.shmall: 1048575

When adding this to the config via ros config merge -i, it successfully adds this to my cloud config, but the values are not set when querying them via sysctl -a, even after a reboot.

I also tried using ros config set in the following variations, but all of them give me the fatal error “Expected a struct or map but was a at line 90, column 6”.

sudo ros config set rancher.sysctl.kernel.shmmax "['4294967295']"
sudo ros config set rancher.sysctl.kernel.shmmax "[4294967295]"
sudo ros config set rancher.sysctl.kernel.shmmax [4294967295]
sudo ros config set rancher.sysctl.kernel.shmmax "4294967295"
sudo ros config set rancher.sysctl.kernel.shmmax '4294967295'
sudo ros config set rancher.sysctl.kernel.shmmax 4294967295

Apart from this issue, rancherOS works quite well for me so far.

Regards,
Alexander

I’m new here too, so not sure how much help this is.

I’m running v1.5.4 on VMWare, and I’ve been setting net.ipv6.conf.all.disable_ipv6 in my cloud-config during install, and that’s been working fine for me.

I did wonder if the fact this was set in the installer’s cloud-config made a difference, so just attempted a ros config merge with the sysctl params you have above. Pleased to report that, on v1.5.4 at least, the params are set correctly after a reboot. Would be even better if they were dynamically set during the merge, but I guess you can’t have everything.

I can only guess that this has been fixed in the later release, or that there’s some other platform related issue.