Support TimeoutStartSec for k8s systemd services

Now Magnum is using podman and systemd to manage the k8s components.
In cases where the nodes pull images from docker.io or another
mirror registry with high latency, some of the components may take long
time to start, which is causing timeout when bootstraping k8s
cluster for fedora atomic/coreos drivers. This patch fixes it by
adding TimeoutStartSec for the systemd services.

Task: 37251
Story: 2006459

Change-Id: I709bac620e4ceec1858672076eb0aef997704b62
This commit is contained in:
Feilong Wang 2019-10-23 12:20:34 +13:00
parent 669a4e523c
commit 15a4ea14e1
2 changed files with 7 additions and 0 deletions

View File

@ -101,6 +101,7 @@ ExecStop=-/usr/bin/podman stop kube-apiserver
Delegate=yes
Restart=always
RestartSec=10
TimeoutStartSec=10min
[Install]
WantedBy=multi-user.target
EOF
@ -129,6 +130,7 @@ ExecStop=-/usr/bin/podman stop kube-controller-manager
Delegate=yes
Restart=always
RestartSec=10
TimeoutStartSec=10min
[Install]
WantedBy=multi-user.target
EOF
@ -156,6 +158,7 @@ ExecStop=-/usr/bin/podman stop kube-scheduler
Delegate=yes
Restart=always
RestartSec=10
TimeoutStartSec=10min
[Install]
WantedBy=multi-user.target
EOF
@ -203,6 +206,7 @@ ExecStop=-/usr/bin/podman stop kubelet
Delegate=yes
Restart=always
RestartSec=10
TimeoutStartSec=10min
[Install]
WantedBy=multi-user.target
EOF
@ -234,6 +238,7 @@ ExecStop=-/usr/bin/podman stop kube-proxy
Delegate=yes
Restart=always
RestartSec=10
TimeoutStartSec=10min
[Install]
WantedBy=multi-user.target
EOF

View File

@ -101,6 +101,7 @@ ExecStart=/bin/bash -c '/usr/bin/podman run --name kubelet \\
ExecStop=-/usr/bin/podman stop kubelet
Delegate=yes
Restart=always
TimeoutStartSec=10min
RestartSec=10
[Install]
WantedBy=multi-user.target
@ -132,6 +133,7 @@ ExecStart=/bin/bash -c '/usr/bin/podman run --name kube-proxy \\
ExecStop=-/usr/bin/podman stop kube-proxy
Delegate=yes
Restart=always
TimeoutStartSec=10min
RestartSec=10
[Install]
WantedBy=multi-user.target