Skip to content

Commit

Permalink
Use validation util when updating docker bits
Browse files Browse the repository at this point in the history
  • Loading branch information
sonicaj committed Sep 3, 2024
1 parent d5054b2 commit 4685561
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/middlewared/middlewared/plugins/docker/update.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down Expand Up @@ -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')
Expand Down

0 comments on commit 4685561

Please sign in to comment.