diff --git a/.gitignore b/.gitignore index 0d574e5..fa7faa6 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -SOURCES/targetcli-fb-2.1.fb37.tar.gz +SOURCES/targetcli-fb-2.1.fb41.tar.gz diff --git a/.targetcli.metadata b/.targetcli.metadata index 142c6d3..e4ed8f1 100644 --- a/.targetcli.metadata +++ b/.targetcli.metadata @@ -1 +1 @@ -6f1c5add07a93de52d12e916397d69329e45f0e7 SOURCES/targetcli-fb-2.1.fb37.tar.gz +9d64aa1486b7800cd58f21e9771ff5f398f12cd2 SOURCES/targetcli-fb-2.1.fb41.tar.gz diff --git a/SOURCES/default-portal-pref.patch b/SOURCES/default-portal-pref.patch deleted file mode 100644 index 3645009..0000000 --- a/SOURCES/default-portal-pref.patch +++ /dev/null @@ -1,69 +0,0 @@ -From 3947c435cb32f8f8347b8f51f8dde967ac0d47c6 Mon Sep 17 00:00:00 2001 -From: Andy Grover -Date: Wed, 17 Dec 2014 16:13:27 -0800 -Subject: [PATCH 2/2] Add a global pref for adding default portal - -Expand info messages to mention this pref as well - -Fixes #46 - -Signed-off-by: Andy Grover ---- - scripts/targetcli | 1 + - targetcli/ui_node.py | 3 +++ - targetcli/ui_target.py | 13 +++++++++---- - 3 files changed, 13 insertions(+), 4 deletions(-) - -diff --git a/scripts/targetcli b/scripts/targetcli -index b95e842..5404fcd 100755 ---- a/scripts/targetcli -+++ b/scripts/targetcli -@@ -49,6 +49,7 @@ class TargetCLI(ConfigShell): - 'auto_add_mapped_luns': True, - 'auto_cd_after_create': False, - 'auto_save_on_exit': True, -+ 'auto_add_default_portal': True, - } - - def usage(): -diff --git a/targetcli/ui_node.py b/targetcli/ui_node.py -index 53c095f..5abfd7f 100644 ---- a/targetcli/ui_node.py -+++ b/targetcli/ui_node.py -@@ -43,6 +43,9 @@ class UINode(ConfigNode): - self.define_config_group_param( - 'global', 'auto_save_on_exit', 'bool', - 'If true, saves configuration on exit.') -+ self.define_config_group_param( -+ 'global', 'auto_add_default_portal', 'bool', -+ 'If true, adds a portal listening on all IPs to new targets.') - - def assert_root(self): - ''' -diff --git a/targetcli/ui_target.py b/targetcli/ui_target.py -index a28925c..7fcaab0 100644 ---- a/targetcli/ui_target.py -+++ b/targetcli/ui_target.py -@@ -335,10 +335,15 @@ class UIMultiTPGTarget(UIRTSLibNode): - - self.shell.log.info("Created TPG %s." % tpg.tag) - -- if tpg.has_feature("nps"): -- NetworkPortal(tpg, "0.0.0.0") -- self.shell.log.info("Created default portal listening on all IPs" -- " (0.0.0.0), port 3260.") -+ if tpg.has_feature("nps") and self.shell.prefs['auto_add_default_portal']: -+ try: -+ NetworkPortal(tpg, "0.0.0.0") -+ self.shell.log.info("Global pref auto_add_default_portal=true") -+ self.shell.log.info("Created default portal listening on all IPs" -+ " (0.0.0.0), port 3260.") -+ except RTSLibError: -+ self.shell.log.info("Default portal not created, TPGs within a " + -+ "target cannot share ip:port.") - - ui_tpg = UITPG(tpg, self) - return self.new_node(ui_tpg) --- -1.9.3 - diff --git a/SOURCES/fix-session-detail.patch b/SOURCES/fix-session-detail.patch deleted file mode 100644 index 006f931..0000000 --- a/SOURCES/fix-session-detail.patch +++ /dev/null @@ -1,25 +0,0 @@ -commit a3182301b10f1a2be0f26d9d6204021a4b8deac5 -Author: Andy Grover -Date: Tue Nov 4 11:33:40 2014 -0800 - - Fix issue with sessions detail command - - Do not reference the backstore, access the plugin field off the so - directly. This is a regression introduced with the backstore removal - changes a while back. - - Signed-off-by: Andy Grover - -diff --git a/targetcli/ui_root.py b/targetcli/ui_root.py -index ac60133..472d6e0 100644 ---- a/targetcli/ui_root.py -+++ b/targetcli/ui_root.py -@@ -190,7 +190,7 @@ class UIRoot(UINode): - base_steps + 1) - - for mlun in acl.mapped_luns: -- plugin = mlun.tpg_lun.storage_object.backstore.plugin -+ plugin = mlun.tpg_lun.storage_object.plugin - name = mlun.tpg_lun.storage_object.name - if mlun.write_protect: - mode = "r" diff --git a/SOURCES/targetcli-no-model-alias.patch b/SOURCES/targetcli-no-model-alias.patch new file mode 100644 index 0000000..3e34c9c --- /dev/null +++ b/SOURCES/targetcli-no-model-alias.patch @@ -0,0 +1,26 @@ +commit e4a45e945aa0e5c2655e9278011b628920f77145 +Author: Andy Grover +Date: Tue Aug 18 08:33:50 2015 -0700 + + targetcli-no-model-alias.patch + +diff --git a/targetcli/ui_backstore.py b/targetcli/ui_backstore.py +index e1745c8..c119e70 100644 +--- a/targetcli/ui_backstore.py ++++ b/targetcli/ui_backstore.py +@@ -208,7 +208,6 @@ class UIPSCSIBackstore(UIBackstore): + + so = PSCSIStorageObject(name, dev) + ui_so = UIPSCSIStorageObject(so, self) +- self.setup_model_alias(so) + self.shell.log.info("Created pscsi storage object %s using %s" + % (name, dev)) + return self.new_node(ui_so) +@@ -440,7 +439,6 @@ class UIUserBackedBackstore(UIBackstore): + size = human_to_bytes(size) + so = UserBackedStorageObject(name, size=size, config=config, level=level) + ui_so = UIUserBackedStorageObject(so, self) +- self.setup_model_alias(so) + self.shell.log.info("Created user-backed storage object %s size %d." + % (name, size)) + return self.new_node(ui_so) diff --git a/SOURCES/targetcli-no-userbackstores.patch b/SOURCES/targetcli-no-userbackstores.patch new file mode 100644 index 0000000..5537052 --- /dev/null +++ b/SOURCES/targetcli-no-userbackstores.patch @@ -0,0 +1,12 @@ +diff --git a/targetcli/ui_backstore.py b/targetcli/ui_backstore.py +index e8bf06f..e1745c8 100644 +--- a/targetcli/ui_backstore.py ++++ b/targetcli/ui_backstore.py +@@ -109,7 +109,6 @@ class UIBackstores(UINode): + UIRDMCPBackstore(self) + UIFileIOBackstore(self) + UIBlockBackstore(self) +- UIUserBackedBackstore(self) + + + class UIBackstore(UINode): diff --git a/SOURCES/tpg-invalid-tag.patch b/SOURCES/tpg-invalid-tag.patch deleted file mode 100644 index 12621a2..0000000 --- a/SOURCES/tpg-invalid-tag.patch +++ /dev/null @@ -1,53 +0,0 @@ -From 4e3f06f529d776f6ce70be16d3f62db6b6211c44 Mon Sep 17 00:00:00 2001 -From: Andy Grover -Date: Wed, 17 Dec 2014 16:07:20 -0800 -Subject: [PATCH 1/2] Catch exception if an invalid tag is given when creating - a tpg - -Also, allow e.g "tpg6" as well as "6" for the tpg tag. This matches what -we do for lun creation. - -Fixes #47 - -Signed-off-by: Andy Grover ---- - targetcli/ui_target.py | 16 +++++++++++++--- - 1 file changed, 13 insertions(+), 3 deletions(-) - -diff --git a/targetcli/ui_target.py b/targetcli/ui_target.py -index 5c8e2f4..a28925c 100644 ---- a/targetcli/ui_target.py -+++ b/targetcli/ui_target.py -@@ -306,9 +306,10 @@ class UIMultiTPGTarget(UIRTSLibNode): - - def ui_command_create(self, tag=None): - ''' -- Creates a new Target Portal Group within the target. The I{tag} must be -- a strictly positive integer value. If omitted, the next available -- Target Portal Group Tag (TPGT) will be used. -+ Creates a new Target Portal Group within the target. The -+ I{tag} must be a positive integer value, optionally prefaced -+ by 'tpg'. If omitted, the next available Target Portal Group -+ Tag (TPGT) will be used. - - SEE ALSO - ======== -@@ -316,6 +317,15 @@ class UIMultiTPGTarget(UIRTSLibNode): - ''' - self.assert_root() - -+ if tag: -+ if tag.startswith("tpg"): -+ tag = tag[3:] -+ -+ try: -+ tag = int(tag) -+ except ValueError: -+ raise ExecutionError("Tag argument must be a number.") -+ - tpg = TPG(self.rtsnode, tag, mode='create') - if self.shell.prefs['auto_enable_tpgt']: - tpg.enable = True --- -1.9.3 - diff --git a/SPECS/targetcli.spec b/SPECS/targetcli.spec index 1cc3091..77402e2 100644 --- a/SPECS/targetcli.spec +++ b/SPECS/targetcli.spec @@ -4,13 +4,12 @@ Name: targetcli License: ASL 2.0 Group: System Environment/Libraries Summary: An administration shell for storage targets -Version: 2.1.fb37 +Version: 2.1.fb41 Release: 3%{?dist} URL: https://fedorahosted.org/targetcli-fb/ Source: https://fedorahosted.org/released/targetcli-fb/%{oname}-%{version}.tar.gz -Patch0: fix-session-detail.patch -Patch1: tpg-invalid-tag.patch -Patch2: default-portal-pref.patch +Patch0: targetcli-no-userbackstores.patch +Patch1: targetcli-no-model-alias.patch BuildArch: noarch BuildRequires: python-devel python-setuptools Requires: python-rtslib >= 2.1.fb41, python-configshell, python-ethtool @@ -26,7 +25,6 @@ users will also need to install and use fcoe-utils. %setup -q -n %{oname}-%{version} %patch0 -p1 %patch1 -p1 -%patch2 -p1 %build %{__python} setup.py build @@ -47,6 +45,16 @@ install -m 644 targetcli.8.gz %{buildroot}%{_mandir}/man8/ %{_mandir}/man8/targetcli.8.gz %changelog +* Tue Aug 18 2015 Andy Grover - 2.1.fb41-3 +- add no-model-alias.patch, LIO no longer supports for pscsi + +* Wed Jul 15 2015 Andy Grover - 2.1.fb41-2 +- add no-userbackstores.patch to not show, since not supported on RHEL + +* Wed Jul 15 2015 Andy Grover - 2.1.fb41-1 +- Update to latest in Fedora +- Remove patches as fixes are in upstream version + * Tue Nov 4 2014 Andy Grover - 2.1.fb37-3 - add tpg-invalid-tag.patch - add default-portal-pref.patch