Support docker 18.09 in the test script.

Signed-off-by: Lantao Liu <lantaol@google.com>
This commit is contained in:
Lantao Liu 2019-03-11 00:45:09 -07:00
parent 25442a865c
commit ade85e643e
3 changed files with 12 additions and 0 deletions

View File

@ -174,6 +174,8 @@ write_files:
WantedBy=multi-user.target WantedBy=multi-user.target
runcmd: runcmd:
# Stop the existing containerd service if there is one. (for Docker 18.09+)
- systemctl is-active containerd && systemctl stop containerd
- systemctl daemon-reload - systemctl daemon-reload
- systemctl enable containerd-installation.service - systemctl enable containerd-installation.service
- systemctl enable containerd.service - systemctl enable containerd.service
@ -186,3 +188,5 @@ runcmd:
- systemctl enable kube-logrotate.service - systemctl enable kube-logrotate.service
- systemctl enable kubernetes.target - systemctl enable kubernetes.target
- systemctl start kubernetes.target - systemctl start kubernetes.target
# Start docker after containerd is running. (for Docker 18.09+)
- systemctl is-enabled docker && (systemctl is-active docker || systemctl start docker)

View File

@ -174,6 +174,8 @@ write_files:
WantedBy=multi-user.target WantedBy=multi-user.target
runcmd: runcmd:
# Stop the existing containerd service if there is one. (for Docker 18.09+)
- systemctl is-active containerd && systemctl stop containerd
- systemctl daemon-reload - systemctl daemon-reload
- systemctl enable containerd-installation.service - systemctl enable containerd-installation.service
- systemctl enable containerd.service - systemctl enable containerd.service
@ -186,3 +188,5 @@ runcmd:
- systemctl enable kube-logrotate.service - systemctl enable kube-logrotate.service
- systemctl enable kubernetes.target - systemctl enable kubernetes.target
- systemctl start kubernetes.target - systemctl start kubernetes.target
# Start docker after containerd is running. (for Docker 18.09+)
- systemctl is-enabled docker && (systemctl is-active docker || systemctl start docker)

View File

@ -61,8 +61,12 @@ write_files:
WantedBy=multi-user.target WantedBy=multi-user.target
runcmd: runcmd:
# Stop the existing containerd service if there is one. (for Docker 18.09+)
- systemctl is-active containerd && systemctl stop containerd
- systemctl daemon-reload - systemctl daemon-reload
- systemctl enable containerd-installation.service - systemctl enable containerd-installation.service
- systemctl enable containerd.service - systemctl enable containerd.service
- systemctl enable containerd.target - systemctl enable containerd.target
- systemctl start containerd.target - systemctl start containerd.target
# Start docker after containerd is running. (for Docker 18.09+)
- systemctl is-enabled docker && (systemctl is-active docker || systemctl start docker)