Start Docker after upgrade

If you do the following:

* Install legacy Docker (1.12.0) using kolla-ansible bootstrap-servers
  with the Rocky release or earlier.
* Update to Docker CE, using kolla-ansible bootstrap-servers with the
  Stein release or later

The package is upgraded, but docker is stopped. This prevents the 'Wait
for Docker to start' task from completing, since Docker will not start.
Seen on CentOS 7.6, Docker CE 19.03.4.

This was tested and working previously, perhaps something changed with
the Docker package.

This change fixes the issue by starting and enabling Docker after the
upgrade.

Change-Id: If6e9c91f3e8d0ec366eea7ca506c6d10dbf11c3a
Closes-Bug: #1852066
(cherry picked from commit 82e58a7a5a)
This commit is contained in:
Mark Goddard 2019-11-11 11:13:37 +00:00
parent a0a5622ab5
commit dea3e12a87
1 changed files with 9 additions and 0 deletions

View File

@ -75,6 +75,15 @@
# daemon to come up and start all previously running containers.
- block:
# At some point (at least on CentOS 7) Docker CE stopped starting
# automatically after an upgrade from legacy docker . Start it manually.
- name: Start docker
service:
name: docker
state: started
enabled: yes
become: True
- name: Wait for Docker to start
command: docker info
become: true