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

Uninstall handle cases when directories are mounts and cannot be removed #4470

Merged
merged 2 commits into from
Jul 31, 2023
Merged
Changes from 1 commit
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
11 changes: 3 additions & 8 deletions bundle/bin/rke2-uninstall.sh
Original file line number Diff line number Diff line change
Expand Up @@ -91,14 +91,9 @@ uninstall_remove_files()
$transactional_update rm -f "${INSTALL_RKE2_ROOT}/bin/rke2"
$transactional_update rm -f "${INSTALL_RKE2_ROOT}/bin/rke2-killall.sh"
$transactional_update rm -rf "${INSTALL_RKE2_ROOT}/share/rke2"
rm -rf /etc/rancher/rke2
rm -rf /etc/rancher/node
rm -d /etc/rancher || true
rm -rf /etc/cni
rm -rf /opt/cni/bin
rm -rf /var/lib/kubelet
rm -rf /var/lib/rancher/rke2
rm -d /var/lib/rancher || true
for dir in /etc/rancher /etc/cni /opt/cni/bin /var/lib/kubelet /var/lib/rancher; do
rm -rf "$dir" || true
brandond marked this conversation as resolved.
Show resolved Hide resolved
done

if type fapolicyd >/dev/null 2>&1; then
if [ -f /etc/fapolicyd/rules.d/80-rke2.rules ]; then
Expand Down