Changing ntp_package post-deployment does nothing
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
NTP Charm |
New
|
Undecided
|
Unassigned |
Bug Description
When deploying the NTP charm, the ntp_package charm configuration entry allows you to override the automatic detection based on distribution release when selecting the package to use to provide NTP - ntpd vs chrony.
Environment: ntp charm 38 on Bionic, chrony automatically installed, ntp_packages unset
Change: ntp_package set to 'ntp'
Expected result: chrony uninstalled, ntp package installed and services enabled, configuration re-rendered for ntpd.
Observed result: Chrony remains installed, running and enabled, ntpd is not installed, and therefore not running and enabled.
Additionally, changing other settings such as 'sources' once ntp_packages is set to something other than the installed package will cause the units to enter 'blocked' state saying that NTP is not running in my test case.
I suspect the same would happen in reverse, if you were running ntpd and tried to switch to chrony, or if you have a manually specified selection (ntp or chrony) and tried to reset the setting to rely on autodetection, and autodetection yielded a different package to the one you had previously configured.