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

kubeadm leaves backup files after a successful upgrade #125357

Closed
davidwtf opened this issue Jun 6, 2024 · 4 comments
Closed

kubeadm leaves backup files after a successful upgrade #125357

davidwtf opened this issue Jun 6, 2024 · 4 comments
Labels
kind/bug Categorizes issue or PR as related to a bug. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. sig/cluster-lifecycle Categorizes an issue or PR as relevant to SIG Cluster Lifecycle.

Comments

@davidwtf
Copy link

davidwtf commented Jun 6, 2024

What happened?

When I successfully upgraded the cluster using kubeadm, I found the /etc/kubernetes/tmp, which contains the backup files, was left.

~]# du -h /etc/kubernetes/tmp/
20K	/etc/kubernetes/tmp/kubeadm-backup-manifests-2024-06-06-18-02-44
32M	/etc/kubernetes/tmp/kubeadm-backup-etcd-2024-06-06-18-02-44/etcd/member/snap
123M	/etc/kubernetes/tmp/kubeadm-backup-etcd-2024-06-06-18-02-44/etcd/member/wal
155M	/etc/kubernetes/tmp/kubeadm-backup-etcd-2024-06-06-18-02-44/etcd/member
155M	/etc/kubernetes/tmp/kubeadm-backup-etcd-2024-06-06-18-02-44/etcd
155M	/etc/kubernetes/tmp/kubeadm-backup-etcd-2024-06-06-18-02-44
16K	/etc/kubernetes/tmp/kubeadm-backup-manifests-2024-06-06-18-13-10
32M	/etc/kubernetes/tmp/kubeadm-backup-etcd-2024-06-06-18-13-10/etcd/member/snap
123M	/etc/kubernetes/tmp/kubeadm-backup-etcd-2024-06-06-18-13-10/etcd/member/wal
155M	/etc/kubernetes/tmp/kubeadm-backup-etcd-2024-06-06-18-13-10/etcd/member
155M	/etc/kubernetes/tmp/kubeadm-backup-etcd-2024-06-06-18-13-10/etcd
155M	/etc/kubernetes/tmp/kubeadm-backup-etcd-2024-06-06-18-13-10
4.0K	/etc/kubernetes/tmp/kubeadm-kubelet-config3316271885
16K	/etc/kubernetes/tmp/kubeadm-backup-manifests-2024-06-06-18-22-34
32M	/etc/kubernetes/tmp/kubeadm-backup-etcd-2024-06-06-18-22-34/etcd/member/snap
123M	/etc/kubernetes/tmp/kubeadm-backup-etcd-2024-06-06-18-22-34/etcd/member/wal
155M	/etc/kubernetes/tmp/kubeadm-backup-etcd-2024-06-06-18-22-34/etcd/member
155M	/etc/kubernetes/tmp/kubeadm-backup-etcd-2024-06-06-18-22-34/etcd
155M	/etc/kubernetes/tmp/kubeadm-backup-etcd-2024-06-06-18-22-34
4.0K	/etc/kubernetes/tmp/kubeadm-kubelet-config3278283034
463M	/etc/kubernetes/tmp/

What did you expect to happen?

I would like to know if this is intended or if it's a bug.
Maybe the document https://kubernetes.io/docs/tasks/administer-cluster/kubeadm/kubeadm-upgrade/ should make it clear that the user needs to remove the backup files manually.

How can we reproduce it (as minimally and precisely as possible)?

Upgrade the cluster with kubeadm.

Anything else we need to know?

No response

Kubernetes version

$ kubectl version
Client Version: v1.28.8
Kustomize Version: v5.0.4-0.20230601165947-6ce0bf390ce3
Server Version: v1.28.8

upgraded from v1.25.16 to v1.26.15 to 1.27.12 to 1.27.8

Cloud provider

OS version

# On Linux:
$ cat /etc/os-release
# paste output here
$ uname -a
# paste output here

# On Windows:
C:\> wmic os get Caption, Version, BuildNumber, OSArchitecture
# paste output here

Install tools

Container runtime (CRI) and version (if applicable)

Related plugins (CNI, CSI, ...) and versions (if applicable)

@davidwtf davidwtf added the kind/bug Categorizes issue or PR as related to a bug. label Jun 6, 2024
@k8s-ci-robot k8s-ci-robot added needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. labels Jun 6, 2024
@k8s-ci-robot
Copy link
Contributor

This issue is currently awaiting triage.

If a SIG or subproject determines this is a relevant issue, they will accept it by applying the triage/accepted label and provide further guidance.

The triage/accepted label can be added by org members by writing /triage accepted in a comment.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@davidwtf
Copy link
Author

davidwtf commented Jun 6, 2024

/sig cluster-lifecycle

@k8s-ci-robot k8s-ci-robot added sig/cluster-lifecycle Categorizes an issue or PR as relevant to SIG Cluster Lifecycle. and removed needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. labels Jun 6, 2024
@neolit123
Copy link
Member

I would like to know if this is intended or if it's a bug.

it's by design. we never discussed the option to cleanup as users can easily do that.

Maybe the document https://kubernetes.io/docs/tasks/administer-cluster/kubeadm/kubeadm-upgrade/ should make it clear that the user needs to remove the backup files manually.

please log a ticket in kubernetes/website, also PRs to adjust the docs are welcome.
the exact place to note this is here:
https://kubernetes.io/docs/tasks/administer-cluster/kubeadm/kubeadm-upgrade/#recovering-from-a-failure-state

/close

@k8s-ci-robot
Copy link
Contributor

@neolit123: Closing this issue.

In response to this:

I would like to know if this is intended or if it's a bug.

it's by design. we never discussed the option to cleanup as users can easily do that.

Maybe the document https://kubernetes.io/docs/tasks/administer-cluster/kubeadm/kubeadm-upgrade/ should make it clear that the user needs to remove the backup files manually.

please log a ticket in kubernetes/website, also PRs to adjust the docs are welcome.
the exact place to note this is here:
https://kubernetes.io/docs/tasks/administer-cluster/kubeadm/kubeadm-upgrade/#recovering-from-a-failure-state

/close

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

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. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. sig/cluster-lifecycle Categorizes an issue or PR as relevant to SIG Cluster Lifecycle.
Projects
None yet
Development

No branches or pull requests

3 participants