CentaurusInfra / mizar

Mizar – Experimental, High Scale and High Performance Cloud Network https://mizar.readthedocs.io
https://mizar.readthedocs.io
GNU General Public License v2.0
112 stars 50 forks source link

Recreated pod failed to be running #618

Closed Hong-Chang closed 2 years ago

Hong-Chang commented 2 years ago

There is a recent regression noticed. For a normal pod, create it and it will get running. Then delete it. Then create it again. At this time it cannot reach running state.

By a simple investigation we see the regression begins from commit 603. I checkout the code to the one right before the commit, and I don't see the issue. Then I checkout the code to commit 603, the issue can be repro'd.

How to reproduce it (as minimally and precisely as possible):

  1. Prepare the pod: cat <<EOF | tee /tmp/testpod.yaml apiVersion: v1 kind: Pod metadata: name: testpod spec: containers:
    • name: arktospoddefault1 image: mizarnet/testpod ports:
      • containerPort: 443 EOF
  2. Create the pod cluster/kubectl.sh apply -f /tmp/testpod.yaml
  3. Wait for pod to be running.
  4. Delete the pod cluster/kubectl.sh delete pod testpod
  5. Create the pod again cluster/kubectl.sh apply -f /tmp/testpod.yaml

The pod should be able to be running but it won't.