Fix healthcheck idempotency issue with strict comparison. (#88)

This commit is contained in:
Felix Fontein
2021-02-17 22:56:52 +01:00
committed by GitHub
parent 5fd13c79b6
commit f5d68755c4
3 changed files with 28 additions and 4 deletions
+6
View File
@@ -2329,6 +2329,12 @@ class Container(DockerBaseClass):
match = self._compare(getattr(self.parameters, key), value, compare)
if not match:
if key == 'expected_healthcheck' and config_mapping['disable_healthcheck'] and self.parameters.disable_healthcheck:
# If the healthcheck is disabled (both in parameters and for the current container), and the user
# requested strict comparison for healthcheck, the comparison will fail. That's why we ignore the
# expected_healthcheck comparison in this case.
continue
# no match. record the differences
p = getattr(self.parameters, key)
c = value