Skip to content

Commit

Permalink
bug(al2023): reset CNI cache on boot (#1912)
Browse files Browse the repository at this point in the history
  • Loading branch information
cartermckinnon authored Aug 9, 2024
1 parent 6811189 commit d1d2163
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
5 changes: 5 additions & 0 deletions templates/al2023/provisioners/install-worker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -239,3 +239,8 @@ sudo chown -R root:root /etc/eks
sudo sed -i \
's/ - package-update-upgrade-install/# Removed so that nodes do not have version skew based on when the node was started.\n# - package-update-upgrade-install/' \
/etc/cloud/cloud.cfg

# the CNI results cache is not valid across reboots, and errant files can prevent cleanup of pod sandboxes
# https://github.com/containerd/containerd/issues/8197
# this was fixed in 1.2.x of libcni but containerd < 2.x are using libcni 1.1.x
sudo systemctl enable cni-cache-reset
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
[Unit]
Description=Reset the CNI results cache
Before=cloud-init.target

[Service]
Type=oneshot
ExecStart=rm -rf /var/lib/cni/results

[Install]
WantedBy=multi-user.target

0 comments on commit d1d2163

Please sign in to comment.