canonical / charm-sysconfig

A subordinate charm to apply system settings like grub configurations or systemd configurations.
Apache License 2.0
0 stars 5 forks source link

sysconfig fails to apply sysctl #9

Closed dashmage closed 8 months ago

dashmage commented 8 months ago

We have sysconfig related to nova-compute

$ juju config sysconfig sysctl { vm.swappiness: 10 }

when checking the nodes we don't see vm.swappiness applied:

root@node1:~# sysctl -a | grep vm.swap vm.swappiness = 60

Given nova-compute has its own sysctl and they are configured on the machine:

$ juju config nova-compute-kvm sysctl { 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, net.nf_conntrack_max : 1000000, net.netfilter.nf_conntrack_buckets : 204800, net.netfilter.nf_conntrack_max : 1000000 }

we need to understand if sysconfig sysctl are wiped by


Imported from Launchpad using lp2gh.

dashmage commented 8 months ago

(by zzehring) So after altering the sysctl for the sysconfig application [0], the file sysctl.d file was created and "sysctl -a | grep vm.swap" has been applied. From this, it looks like there's a possibility that the sysctl.d file is not written on initial deploy.

[0] juju config sysconfig sysctl="{ vm.swappiness: 10, vm.extfrag_threshold: 200, vm.watermark_scale_factor: 50 }"

dashmage commented 8 months ago

(by jfguedez) Added the charm to a fresh machine. I can confirm that the file wasn't created on charm deployment. The following file is missing on the new unit, but present on previous ones (with the expected content, matching the charm settings):

/etc/sysctl.d/90-charm-sysconfig.conf