mirror of https://github.com/kubernetes/kops.git
hack/update-expected.sh
This commit is contained in:
parent
be8933b577
commit
a6de058dc3
|
|
@ -1,78 +1,31 @@
|
|||
file: /usr/bin/docker-runc
|
||||
mode: +i
|
||||
---
|
||||
contents: |-
|
||||
DOCKER_OPTS=--ip-masq=false --iptables=false --log-driver=json-file --log-level=info --log-opt=max-file=5 --log-opt=max-size=10m --storage-driver=overlay2,overlay,aufs
|
||||
DOCKER_NOFILE=1000000
|
||||
path: /etc/sysconfig/docker
|
||||
type: file
|
||||
---
|
||||
contents: |
|
||||
#!/bin/bash
|
||||
|
||||
# Copyright 2019 The Kubernetes Authors All rights reserved.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
# This script is intended to be run periodically, to check the health
|
||||
# of docker. If it detects a failure, it will restart docker using systemctl.
|
||||
|
||||
healthcheck() {
|
||||
if output=`timeout 60 docker network ls`; then
|
||||
echo "$output" | fgrep -qw host || {
|
||||
echo "docker 'host' network missing"
|
||||
return 1
|
||||
}
|
||||
else
|
||||
echo "docker returned $?"
|
||||
return 1
|
||||
fi
|
||||
}
|
||||
|
||||
if healthcheck; then
|
||||
echo "docker healthy"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
echo "docker failed"
|
||||
echo "Giving docker 30 seconds grace before restarting"
|
||||
sleep 30
|
||||
|
||||
if healthcheck; then
|
||||
echo "docker recovered"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
echo "docker still unresponsive; triggering docker restart"
|
||||
systemctl stop docker
|
||||
|
||||
echo "wait all tcp sockets to close"
|
||||
sleep `cat /proc/sys/net/ipv4/tcp_fin_timeout`
|
||||
|
||||
sleep 10
|
||||
systemctl start docker
|
||||
|
||||
echo "Waiting 120 seconds to give docker time to start"
|
||||
sleep 60
|
||||
|
||||
if healthcheck; then
|
||||
echo "docker recovered"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
echo "docker still failing"
|
||||
contents:
|
||||
Asset:
|
||||
AssetPath: docker/containerd
|
||||
Key: containerd
|
||||
mode: "0755"
|
||||
path: /opt/kops/bin/docker-healthcheck
|
||||
path: /usr/bin/containerd
|
||||
type: file
|
||||
---
|
||||
contents:
|
||||
Asset:
|
||||
AssetPath: docker/containerd-shim
|
||||
Key: containerd-shim
|
||||
mode: "0755"
|
||||
path: /usr/bin/containerd-shim
|
||||
type: file
|
||||
---
|
||||
contents:
|
||||
Asset:
|
||||
AssetPath: docker/ctr
|
||||
Key: ctr
|
||||
mode: "0755"
|
||||
path: /usr/bin/ctr
|
||||
type: file
|
||||
---
|
||||
contents:
|
||||
|
|
@ -83,30 +36,6 @@ mode: "0755"
|
|||
path: /usr/bin/docker
|
||||
type: file
|
||||
---
|
||||
contents:
|
||||
Asset:
|
||||
AssetPath: docker/docker-containerd
|
||||
Key: docker-containerd
|
||||
mode: "0755"
|
||||
path: /usr/bin/docker-containerd
|
||||
type: file
|
||||
---
|
||||
contents:
|
||||
Asset:
|
||||
AssetPath: docker/docker-containerd-ctr
|
||||
Key: docker-containerd-ctr
|
||||
mode: "0755"
|
||||
path: /usr/bin/docker-containerd-ctr
|
||||
type: file
|
||||
---
|
||||
contents:
|
||||
Asset:
|
||||
AssetPath: docker/docker-containerd-shim
|
||||
Key: docker-containerd-shim
|
||||
mode: "0755"
|
||||
path: /usr/bin/docker-containerd-shim
|
||||
type: file
|
||||
---
|
||||
contents:
|
||||
Asset:
|
||||
AssetPath: docker/docker-init
|
||||
|
|
@ -123,14 +52,6 @@ mode: "0755"
|
|||
path: /usr/bin/docker-proxy
|
||||
type: file
|
||||
---
|
||||
contents:
|
||||
Asset:
|
||||
AssetPath: docker/docker-runc
|
||||
Key: docker-runc
|
||||
mode: "0755"
|
||||
path: /usr/bin/docker-runc
|
||||
type: file
|
||||
---
|
||||
contents:
|
||||
Asset:
|
||||
AssetPath: docker/dockerd
|
||||
|
|
@ -139,6 +60,14 @@ mode: "0755"
|
|||
path: /usr/bin/dockerd
|
||||
type: file
|
||||
---
|
||||
contents:
|
||||
Asset:
|
||||
AssetPath: docker/runc
|
||||
Key: runc
|
||||
mode: "0755"
|
||||
path: /usr/bin/runc
|
||||
type: file
|
||||
---
|
||||
contents: |2
|
||||
|
||||
|
||||
|
|
@ -339,46 +268,12 @@ GID: null
|
|||
Name: docker
|
||||
System: true
|
||||
---
|
||||
Name: docker-healthcheck.service
|
||||
definition: |
|
||||
[Unit]
|
||||
Description=Run docker-healthcheck once
|
||||
Documentation=https://kops.sigs.k8s.io
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
ExecStart=/opt/kops/bin/docker-healthcheck
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
enabled: true
|
||||
manageState: true
|
||||
running: true
|
||||
smartRestart: true
|
||||
---
|
||||
Name: docker-healthcheck.timer
|
||||
definition: |
|
||||
[Unit]
|
||||
Description=Trigger docker-healthcheck periodically
|
||||
Documentation=https://kops.sigs.k8s.io
|
||||
|
||||
[Timer]
|
||||
OnUnitInactiveSec=10s
|
||||
Unit=docker-healthcheck.service
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
enabled: true
|
||||
manageState: true
|
||||
running: true
|
||||
smartRestart: true
|
||||
---
|
||||
Name: docker.service
|
||||
definition: |
|
||||
[Unit]
|
||||
Description=Docker Application Container Engine
|
||||
Documentation=https://docs.docker.com
|
||||
After=network-online.target firewalld.service
|
||||
After=network-online.target firewalld.service containerd.service
|
||||
Wants=network-online.target
|
||||
Requires=docker.socket
|
||||
|
||||
|
|
|
|||
|
|
@ -106,7 +106,7 @@ definition: |
|
|||
Documentation=https://kops.sigs.k8s.io
|
||||
|
||||
[Service]
|
||||
ExecStart=/opt/kops/bin/protokube --bootstrap-master-node-labels=true --cloud=aws --containerized=false --dns-internal-suffix=.internal.minimal.example.com --dns=aws-route53 --etcd-backup-store=memfs://clusters.example.com/minimal.example.com/backups/etcd/main --etcd-image=k8s.gcr.io/etcd:3.4.3 --initialize-rbac=true --manage-etcd=true --master=true --node-name=master.hostname.invalid --peer-ca=/srv/kubernetes/ca.crt --peer-cert=/srv/kubernetes/etcd-peer.pem --peer-key=/srv/kubernetes/etcd-peer-key.pem --tls-auth=true --tls-ca=/srv/kubernetes/ca.crt --tls-cert=/srv/kubernetes/etcd.pem --tls-key=/srv/kubernetes/etcd-key.pem --v=4 --zone=*/Z1AFAKE1ZON3YO
|
||||
ExecStart=/opt/kops/bin/protokube --bootstrap-master-node-labels=true --cloud=aws --containerized=false --dns-internal-suffix=.internal.minimal.example.com --dns=aws-route53 --initialize-rbac=true --master=true --node-name=master.hostname.invalid --remove-dns-names=etcd-master-us-test-1a.internal.minimal.example.com,etcd-events-master-us-test-1a.internal.minimal.example.com --v=4 --zone=*/Z1AFAKE1ZON3YO
|
||||
EnvironmentFile=/etc/sysconfig/protokube
|
||||
Restart=always
|
||||
RestartSec=3s
|
||||
|
|
|
|||
Loading…
Reference in New Issue