ソースを参照

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 年 前
コミット
71f227157a
1 ファイル変更8 行追加3 行削除
  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