Skip to content
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

Use systemd-timesyncd for Ubuntu 20.04 #9182

Merged
merged 1 commit into from
May 27, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion nodeup/pkg/model/ntp.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,10 @@ func (b *NTPBuilder) Build(c *fi.ModelBuilderContext) error {
return nil
}

if b.Distribution.IsDebianFamily() {
if b.Distribution == distros.DistributionFocal {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if b.Distribution == distros.DistributionFocal {
if b.Distribution.IsUbuntu() && b.Distribution != distros.DistributionXenial && b.Distribution != distros.DistributionBionic {

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would it be ok to leave it as is? Seems simpler.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The issue would be whether a new major version of Ubuntu is used with kops 1.17. But I suppose code would have to be added to 1.17 to support it and that's not likely.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Exactly. I don't think there is any plan to support any other distro in the near future. Thanks!

c.AddTask(&nodetasks.Package{Name: "systemd-timesyncd"})
c.AddTask((&nodetasks.Service{Name: "systemd-timesyncd"}).InitDefaults())
} else if b.Distribution.IsDebianFamily() {
c.AddTask(&nodetasks.Package{Name: "ntp"})
c.AddTask((&nodetasks.Service{Name: "ntp"}).InitDefaults())
} else if b.Distribution.IsRHELFamily() {
Expand Down