Skip to content

Commit a591925

Browse files
committed
Fix prechecks with Docker 20.10.0
The 'prechecks : Checking Docker version' task previously failed with Docker 20.10.0. The regex used to parse the version was returning 0.10.0, which is not above the minimum. The previous version of 19.x would have been parsed as 9.x, which is above the minimum. This change fixes the issue by matching the beginning and end of the version using \b. Depends-On: https://review.opendev.org/766182 Change-Id: I2a23eea7effb5b9a5e73361bcd48bd2e16d1569c Closes-Bug: 1907436
1 parent 1a7478d commit a591925

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

ansible/roles/prechecks/tasks/service_checks.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
changed_when: false
77
when: inventory_hostname in groups['baremetal']
88
failed_when: result is failed
9-
or result.stdout | regex_replace('.*(\\d+\\.\\d+\\.\\d+).*', '\\1') is version(docker_version_min, '<')
9+
or result.stdout | regex_replace('.*\\b(\\d+\\.\\d+\\.\\d+)\\b.*', '\\1') is version(docker_version_min, '<')
1010

1111
# NOTE(mgoddard): If passwords.yml is encrypted using ansible-vault, this check
1212
# will pass, but only because nothing in the vault file has the format of a
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
fixes:
3+
- |
4+
Fixes an issue with the ``kolla-ansible prechecks`` command with Docker
5+
20.10. `LP#1907436
6+
<https://bugs.launchpad.net/kolla-ansible/+bug/1907436>`__

0 commit comments

Comments
 (0)