.github/workflows: add clean network environment step in centos nightly build
@@ -58,14 +58,8 @@ jobs:
rpm -ivh epm-$RUNE_VERSION*.rpm
popd
- - name: Install containerd
+ - name: Configure containerd
run: |
- pushd ${WORK_DIR}
- curl -LO http://aliacs-edge-k8s-cn-hangzhou.oss-cn-hangzhou.aliyuncs.com/jiazhuo/containerd-1.3.4.linux-amd64.tar.gz
- tar -xvf containerd-1.3.4.linux-amd64.tar.gz
- /bin/cp -f bin/* /usr/local/bin
- popd
-
cat <<- EOF >/etc/systemd/system/containerd.service
[Unit]
Description=containerd container runtime
@@ -262,6 +256,7 @@ jobs:
- name: Clear the environment
if: always()
run: |
+ sudo kubectl delete pod --all
sudo kubeadm reset -f || true
for service in kubectl kubelet containerd epm
do
@@ -287,4 +282,10 @@ jobs:
sudo rm -fr /var/lib/etcd
sudo rm -f /etc/yum.repos.d/occlum.repo
sudo rm -f /etc/yum.repos.d/kubernetes.repo
- sudo rm -f /usr/local/bin/containerd* /usr/local/bin/ctr
+ sudo ip link set cni0 down
+ sudo ip link delete cni0
+ sudo ip link set flannel.1 down
+ sudo ip link delete flannel.1
+ sudo ip -all netns del
+ sudo ps -ef | grep containerd-shim-rune-v2 | awk '{print $2}' | xargs kill -9 || true
+ sudo systemctl restart docker
