From 17b939ce28b3774335e02a496115a90bdc3fe46a Mon Sep 17 00:00:00 2001 From: Waqar Ahmed Date: Tue, 3 Sep 2024 23:35:38 +0500 Subject: [PATCH] Bug fix for starting docker service --- .../versions/24.10/2024-09-03_20-33_docker_addr_pool.py | 5 ++--- src/middlewared/middlewared/plugins/docker/update.py | 3 +++ 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/middlewared/middlewared/alembic/versions/24.10/2024-09-03_20-33_docker_addr_pool.py b/src/middlewared/middlewared/alembic/versions/24.10/2024-09-03_20-33_docker_addr_pool.py index b9518608ece1e..0087938584026 100644 --- a/src/middlewared/middlewared/alembic/versions/24.10/2024-09-03_20-33_docker_addr_pool.py +++ b/src/middlewared/middlewared/alembic/versions/24.10/2024-09-03_20-33_docker_addr_pool.py @@ -1,15 +1,14 @@ """ -Add docker cidr subnet +Add address_pools column to services_docker Revision ID: 98c1ebde0079 Revises: d24d6760fda4 -Create Date: 2024-08-30 20:33:47.996994+00:00 +Create Date: 2024-09-03 20:33:47.996994+00:00 """ from alembic import op import sqlalchemy as sa -# revision identifiers, used by Alembic. revision = '98c1ebde0079' down_revision = 'd24d6760fda4' branch_labels = None diff --git a/src/middlewared/middlewared/plugins/docker/update.py b/src/middlewared/middlewared/plugins/docker/update.py index 3b5dae4e7f661..65c81e79f9622 100644 --- a/src/middlewared/middlewared/plugins/docker/update.py +++ b/src/middlewared/middlewared/plugins/docker/update.py @@ -97,6 +97,9 @@ async def do_update(self, job, data): if config['pool'] != old_config['pool']: job.set_progress(60, 'Applying requested configuration') await self.middleware.call('docker.setup.status_change') + elif config['pool'] and config['address_pools'] != old_config['address_pools']: + job.set_progress(60, 'Starting docker') + await self.middleware.call('service.start', 'docker') if not old_config['nvidia'] and config['nvidia']: await (