Go to file
Gleb Aronsky ff9c2f782f Delete orphaned volumes on reboot
After a forced reboot, kubelet fails to clean up orphaned
volume files and directories. These orphaned volumes
persist because the directories still hold files, a situation
that would typically be resolved during a normal flow
but instead is caused by the forced reboot.

The volume directories are tied to the pods' unique identifiers.
Since none of the pods are running after the reboot, the associated
volume directories and files can be safely removed.

The work in this commit will eventually be superseded by
https://github.com/kubernetes/enhancements/issues/3756.

Test Plan:

PASS:
- Build an iso and install an aio-sx system and verify
that the cleanup script is installed and the kubelet service
is running with
ExecStarPre=/usr/local/bin/kubelet-cleanup-orphaned-volumes.sh.

PASS:
- Reboot the system with active pods that
contain files in their volumes directories and
verify that all volume directories and their files under
/var/lib/kubelet/pods/ are deleted after reboot.

PASS:
- Verify that explictly restarting the kubelet service does
not attempt to delete kubelet volume directories.

PASS:
- Verify volume-subpaths directories and files are cleaned up
after reboot.

Closes-Bug: 2027810

Change-Id: Ie7e637c4d5e79ec08d33bd80dade35890b711548
Signed-off-by: Gleb Aronsky <gleb.aronsky@windriver.com>
2023-07-28 12:40:46 -07:00
2019-09-09 14:52:12 -05:00
2023-04-28 12:38:53 -04:00
2021-02-19 12:14:38 -06:00
2019-09-09 14:52:12 -05:00
2019-09-09 14:52:12 -05:00
2019-09-09 14:52:12 -05:00
2022-12-27 01:28:45 +00:00
Description
StarlingX Puppet modules and manifests
22 MiB
Languages
Puppet 59.6%
Python 24.3%
HTML 7.7%
Ruby 4.5%
Shell 3.3%
Other 0.6%