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

unattended-upgrades addon only installes package on ubuntu / debian and does not validate if it is actually enabled #1645

Closed
skuethe opened this issue Nov 23, 2021 · 0 comments · Fixed by #1756
Labels
kind/bug Categorizes issue or PR as related to a bug. sig/cluster-management Denotes a PR or issue as being assigned to SIG Cluster Management.

Comments

@skuethe
Copy link

skuethe commented Nov 23, 2021

What happened:
While upgrading a cluster from Kubernetes 1.19 to 1.22 I also migrated from KubeOne v1.2 to v1.3.
When doing so I enabled the unattended-upgrades addon. When looking into os configuration of the control nodes, I saw that unattended-upgrades package was installed, but not enabled:

root@opsstack-control-plane-1:~# apt-config dump APT::Periodic::Unattended-Upgrade
root@opsstack-control-plane-1:~# 

What is the expected behavior:

root@opsstack-control-plane-1:~# apt-config dump APT::Periodic::Unattended-Upgrade
APT::Periodic::Unattended-Upgrade "1";
root@opsstack-control-plane-1:~# 

How to reproduce the issue:
Not really sure to be honest. All the dynamic worker nodes deployed via machinedeployment had this setup correctly.

Anything else we need to know?
control nodes currently running Ubuntu 20.04.2 LTS
worker nodes currently running Ubuntu 20.04.3 LTS

I would simply extend the addon to also check for the existence of the specific file. Possible solution to this:

https://github.com/skuethe/kubeone/blob/1cb4aa996814f2aced734d92d205334fdb5dffc6/addons/unattended-upgrades/apt.yaml#L58-L59

This will only create the file if it does not exist, respecting any possible manual change to that file.
An alternative would be to just overwrite the file and such force it's usage (which you seem to want when enabling this addon).
Asking for some feedback before creating any PR.

Thanks

Information about the environment:
KubeOne version (kubeone version): 1.3.2
Provider you're deploying cluster on: Hetzner
Operating system you're deploying on: Ubuntu 20.04.2 LTS

@skuethe skuethe added kind/bug Categorizes issue or PR as related to a bug. sig/cluster-management Denotes a PR or issue as being assigned to SIG Cluster Management. labels Nov 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug. sig/cluster-management Denotes a PR or issue as being assigned to SIG Cluster Management.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant