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

[Xenial] ondemand (system) overwrites cpufrequtils (charm) value #4

Closed dashmage closed 10 months ago

dashmage commented 10 months ago

"systemctl cat cpufrequtils" shows that /run/systemd/generator.late/cpufrequtils.service has been generated. Per systemd-sysv-generator man page, systemd service files in /run/systemd are generated at boot and when configuration of the system manager is reloaded.

"systemctl -l" shows the order of the services that have been started. We see that the SysV init scripts are started in alphabetic order (cpufrequtils first, then ondemand).

For such reason, when the charm is deployed in Xenial, we need to mask the ondemand script by running: """ systemctl mask ondemand service cpufrequtils restart """

Any further reboots of the unit will show: """ ● ondemand.service Loaded: masked (/dev/null; bad) Active: inactive (dead) """

If cpufrequtils is unset, it would probably be a good idea to restore the ondemand script by "unmasking" the systemd service.


Imported from Launchpad using lp2gh.