From 4685561f0f2ce1a9f23d789eeaf2af2138d97638 Mon Sep 17 00:00:00 2001 From: Waqar Ahmed Date: Fri, 30 Aug 2024 22:52:31 +0500 Subject: [PATCH] Use validation util when updating docker bits --- src/middlewared/middlewared/plugins/docker/update.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/middlewared/middlewared/plugins/docker/update.py b/src/middlewared/middlewared/plugins/docker/update.py index 40d254d86388f..0ea0dd5e07b89 100644 --- a/src/middlewared/middlewared/plugins/docker/update.py +++ b/src/middlewared/middlewared/plugins/docker/update.py @@ -7,6 +7,7 @@ from .state_utils import Status from .utils import applications_ds_name +from .validation_utils import validate_address_pools class DockerModel(sa.Model): @@ -76,6 +77,11 @@ async def do_update(self, job, data): verrors.check() + if config['address_pools'] != old_config['address_pools']: + validate_address_pools( + await self.middleware.call('interface.ip_in_use', {'static': True}), config['address_pools'] + ) + if old_config != config: if config['pool'] != old_config['pool']: job.set_progress(20, 'Stopping Docker service')