Browse Source

When the node process is down, don't exit

If the kubelet is down and we exit, we won't get restarted. Stay up
even if no kubelet processes are found. Also, use a simpler formulation
for finding the hyperkube process.
Clayton Coleman 6 năm trước cách đây
mục cha
commit
71f227157a
1 tập tin đã thay đổi với 8 bổ sung3 xóa
  1. 8 3
      roles/openshift_node_group/files/sync.yaml

+ 8 - 3
roles/openshift_node_group/files/sync.yaml

@@ -129,11 +129,16 @@ spec:
                   fi
                 fi
               else
-                echo "error: The downloaded node configuration is invalid, exiting" 2>&1
-                exit 1
+                echo "error: The downloaded node configuration is invalid, retrying later" 2>&1
+                sleep 10 &
+                wait $!
+                continue
               fi
-              if ! kill $(pgrep -U 0 -f '^/usr/bin/hyperkube kubelet ' | head -n1); then
+              if ! pkill -U 0 -f '(^|/)hyperkube kubelet '; then
                 echo "error: Unable to restart Kubelet" 2>&1
+                sleep 10 &
+                wait $!
+                continue
               fi
             fi
             cp -f /tmp/.new /tmp/.old