From 0d656aa1e1fcc04ea2ffab5068aa934784c88f64 Mon Sep 17 00:00:00 2001 From: Loan Harrouin Date: Tue, 5 May 2026 15:58:39 +0200 Subject: Fix Docker cpuset dimension comparison When enabling cpuset_cpus or cpuset_mems on existing Docker containers, Docker may report the current value as an empty string when no cpuset constraint is configured. These dimensions are cpuset-list strings, not numeric resource values. Compare them as strings in the Docker worker instead of passing them through the numeric dimension comparison logic. Closes-Bug: 2143874 Change-Id: I1b8cd72846b28f556c8f9a0ba114a8af9221e85a Signed-off-by: Loan Harrouin (cherry picked from commit 8304bb3884237bf5aee1c60715d097e88561d56d) --- ansible/module_utils/kolla_docker_worker.py | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'ansible') diff --git a/ansible/module_utils/kolla_docker_worker.py b/ansible/module_utils/kolla_docker_worker.py index 232ec5ba1..70b6af39b 100644 --- a/ansible/module_utils/kolla_docker_worker.py +++ b/ansible/module_utils/kolla_docker_worker.py @@ -184,6 +184,14 @@ class DockerWorker(ContainerWorker): 'ExitCode: %s Message: %s' % (exec_inspect['ExitCode'], output)) + def dimensions_differ(self, a, b, key): + if key in ('cpuset_cpus', 'cpuset_mems'): + a = str(a or '') + b = str(b or '') + return a != b + + return super().dimensions_differ(a, b, key) + def get_image_id(self): full_image = self.params.get('image') -- cgit v1.2.3