Thanks Mike. That's weird, I would not expect the lack of a space there to be an issue, as the yaml parser should resolve that to the same data with or without the space. And indeed, I can't reproduce the issue with the command you provided. After running it on kubernetes-worker rev 704, the vm.nr_hugepages sysctl was successfully updated.
I -can- reproduce the issue with some other typo, like a missing closing brace:
Thanks Mike. That's weird, I would not expect the lack of a space there to be an issue, as the yaml parser should resolve that to the same data with or without the space. And indeed, I can't reproduce the issue with the command you provided. After running it on kubernetes-worker rev 704, the vm.nr_hugepages sysctl was successfully updated.
I -can- reproduce the issue with some other typo, like a missing closing brace:
juju config kubernetes-worker sysctl="{ net.ipv4. conf.all. forwarding : 1, net.ipv4. neigh.default. gc_thresh1 : 128, net.ipv4. neigh.default. gc_thresh2 : 28672, net.ipv4. neigh.default. gc_thresh3 : 32768, net.ipv6. neigh.default. gc_thresh1 : 128, net.ipv6. neigh.default. gc_thresh2 : 28672, net.ipv6. neigh.default. gc_thresh3 : 32768, fs.inotify. max_user_ instances : 8192, fs.inotify. max_user_ watches : 1048576, kernel.panic : 10, kernel. panic_on_ oops: 1, vm.overcommit_ memory : 1, vm.nr_hugepages: 1024"
With the above command, the charm gives no indication in its status that the sysctl config is invalid. It logs an error, but that's easy to miss.
The charm code passes the raw config string through[1] to charmhelpers. core.sysctl. create_ sysctl, which squashes the YAMLError[2].
[1]: https:/ /github. com/charmed- kubernetes/ layer-kubernete s-master- worker- base/blob/ 809f06c6f6521be 59e21859eaebecc d13f4d8c28/ reactive/ kubernetes_ master_ worker_ base.py# L80 /github. com/juju/ charm-helpers/ blob/21f9f239c4 f977afb1720243a 6f6de4ae876986c /charmhelpers/ core/sysctl. py#L46- L52
[2]: https:/