File: fix-mapping-the-new-lun-to-the-node-acl.patch

package info (click to toggle)
targetcli-fb 1%3A2.1.53-1.3
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 492 kB
  • sloc: python: 2,878; makefile: 70; sh: 21
file content (30 lines) | stat: -rw-r--r-- 1,342 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
From: Maurizio Lombardi <mlombard@redhat.com>
Date: Tue, 30 Jan 2024 13:03:08 +0100
X-Dgit-Generated: 1:2.1.53-1.3 f08f99b5ffac3186a2f9162d6baf882662cf77ac
Subject: Fix mapping the new LUN to the node ACL

Signed-off-by: Maurizio Lombardi <mlombard@redhat.com>
Bug-Debian: https://bugs.debian.org/1109887
Origin: https://github.com/open-iscsi/targetcli-fb/commit/560993168d85ec7c84e9aacba5659aa17b40588c
Last-Update: 2025-07-25

---

diff --git a/targetcli/ui_target.py b/targetcli/ui_target.py
index 2c46765..65df61f 100644
--- a/targetcli/ui_target.py
+++ b/targetcli/ui_target.py
@@ -1151,10 +1151,9 @@ class UILUNs(UINode):
                         possible_mlun += 1
                     mapped_lun = possible_mlun
 
-                else:
-                    mlun = MappedLUN(acl, mapped_lun, lun_object, write_protect=False)
-                    self.shell.log.info("Created LUN %d->%d mapping in node ACL %s"
-                                        % (mlun.tpg_lun.lun, mlun.mapped_lun, acl.node_wwn))
+                mlun = MappedLUN(acl, mapped_lun, lun_object, write_protect=False)
+                self.shell.log.info("Created LUN %d->%d mapping in node ACL %s"
+                                    % (mlun.tpg_lun.lun, mlun.mapped_lun, acl.node_wwn))
             self.parent.refresh()
 
         return self.new_node(ui_lun)