New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Platform chrony configuration intolerant of user modified config #1449
Comments
Output of
|
Thanks for the details!
Interesting, I wouldn't have thought this worked. But indeed, the synopsys in
And the systemd service just does a pure string substitution:
I could be wrong, but I think the intention with That said, if we want the new code in coreos/fedora-coreos-config#2271 to be tolerant of this, probably the simplest would be to not do anything if |
yeah. Feels a bit like if you'd want to sepcify your own server and stuff you'd supply your own |
Typically we'd think the user would only pass in optional arguments to chrony via OPTIONS in /etc/sysconfig/chrony but we found a case where a user was providing actual config directives. Let's also exit early out of coreos-platform-chrony-config if /etc/sysconfig/chrony has been touched. If either /etc/chrony.conf or /etc/sysconfig/chrony has been touched we just consider the user to own the config and not do anything special based on the platform. Fixes coreos/fedora-coreos-tracker#1449
Typically we'd think the user would only pass in optional arguments to chrony via OPTIONS in /etc/sysconfig/chronyd but we found a case where a user was providing actual config directives. Let's also exit early out of coreos-platform-chrony-config if /etc/sysconfig/chronyd has been touched. If either /etc/chrony.conf or /etc/sysconfig/chronyd has been touched we just consider the user to own the config and not do anything special based on the platform. Fixes coreos/fedora-coreos-tracker#1449
PR for the proposed change: coreos/fedora-coreos-config#2333 |
Typically we'd think the user would only pass in optional arguments to chrony via OPTIONS in /etc/sysconfig/chronyd but we found a case where a user was providing actual config directives. Let's also exit early out of coreos-platform-chrony-config if /etc/sysconfig/chronyd has been touched. If either /etc/chrony.conf or /etc/sysconfig/chronyd has been touched we just consider the user to own the config and not do anything special based on the platform. Fixes coreos/fedora-coreos-tracker#1449
Tested successfully on newly provisioned node using testing-devel AMI. |
The fix for this went into |
The fix for this went into |
The fix for this went into |
Typically we'd think the user would only pass in optional arguments to chrony via OPTIONS in /etc/sysconfig/chronyd but we found a case where a user was providing actual config directives. Let's also exit early out of coreos-platform-chrony-config if /etc/sysconfig/chronyd has been touched. If either /etc/chrony.conf or /etc/sysconfig/chronyd has been touched we just consider the user to own the config and not do anything special based on the platform. Fixes coreos/fedora-coreos-tracker#1449
Typically we'd think the user would only pass in optional arguments to chrony via OPTIONS in /etc/sysconfig/chronyd but we found a case where a user was providing actual config directives. Let's also exit early out of coreos-platform-chrony-config if /etc/sysconfig/chronyd has been touched. If either /etc/chrony.conf or /etc/sysconfig/chronyd has been touched we just consider the user to own the config and not do anything special based on the platform. Fixes coreos/fedora-coreos-tracker#1449
Typically we'd think the user would only pass in optional arguments to chrony via OPTIONS in /etc/sysconfig/chronyd but we found a case where a user was providing actual config directives. Let's also exit early out of coreos-platform-chrony-config if /etc/sysconfig/chronyd has been touched. If either /etc/chrony.conf or /etc/sysconfig/chronyd has been touched we just consider the user to own the config and not do anything special based on the platform. Fixes coreos/fedora-coreos-tracker#1449
Describe the bug
Prior to this FCOS version it was possible to configure a custom NTP server via ignition by writing to /etc/sysconfig/chronyd. Note machines previously commissioned with this ignition snippet upgrade fine to this
testing
version. This issue occurs also on latestnext
.It is not clear to me what the simple way should be to configure a custom ntp server. If there is a simple more canonical way than above I'm open to adopting it instead.
Reproduction steps
testing
stream version with ignition snippet provided.Expected behavior
Actual behavior
Chrony.service fails:
This seems to be because a FCOS chronyd config is now created (this attempts to merge in the ignition-specified options but fails on quoting issues, yielding something like:
System details
Butane or Ignition config
No response
Additional information
Manually amending the auto-generated /run/coreos/sysconfig-chrony to below results in a happy chronyd.
The text was updated successfully, but these errors were encountered: