From 93f4e25622ae33bea2bb1c571e33943d7c90f2b3 Mon Sep 17 00:00:00 2001 From: bmeagherix <118192357+bmeagherix@users.noreply.github.com> Date: Thu, 21 Nov 2024 18:09:22 +0000 Subject: [PATCH] Reload iscsitarget on iscsi.auth.delete (#15006) (cherry picked from commit 510930b97aaadde14979666542ec75aee9f5b689) --- src/middlewared/middlewared/plugins/iscsi_/auth.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/middlewared/middlewared/plugins/iscsi_/auth.py b/src/middlewared/middlewared/plugins/iscsi_/auth.py index 6c96c246ecff..fd3b40c9dac2 100644 --- a/src/middlewared/middlewared/plugins/iscsi_/auth.py +++ b/src/middlewared/middlewared/plugins/iscsi_/auth.py @@ -125,9 +125,12 @@ async def do_delete(self, audit_callback, id_): if usages['in_use']: raise CallError(usages['usages']) - return await self.middleware.call( + result = await self.middleware.call( 'datastore.delete', self._config.datastore, id_ ) + await self._service_change('iscsitarget', 'reload') + + return result @private async def is_in_use_by_portals_targets(self, id_):