[PATCH] on restore, don't enable a target until its luns, etc are set up
by Jay Fenlason
on restore, don't enable a target until its luns, etc are set up
sbp objects if you attempt to enable a target before its luns have
been configured. This causes restoreconfig to fail. Fix by setting
up luns first.
Signed-off-by: Jay Fenlason <fenlason(a)redhat.com>
--- /usr/lib/python2.7/site-packages/rtslib/target.py.orig 2013-09-27 12:35:06.208906621 -0400
+++ /usr/lib/python2.7/site-packages/rtslib/target.py 2013-09-27 12:35:09.343068567 -0400
@@ -404,7 +404,6 @@ class TPG(CFSNode):
@classmethod
def setup(cls, t_obj, tpg, err_func):
tpg_obj = cls(t_obj, tag=tpg.get("tag", None))
- tpg_obj.enable = tpg.get('enable', True)
set_attributes(tpg_obj, tpg.get('attributes', {}))
set_parameters(tpg_obj, tpg.get('parameters', {}))
@@ -417,6 +416,7 @@ class TPG(CFSNode):
for acl in tpg.get('node_acls', []):
NodeACL.setup(tpg_obj, acl, err_func)
+ tpg_obj.enable = tpg.get('enable', True)
dict_remove(tpg, ('luns', 'portals', 'node_acls', 'tag',
'attributes', 'parameters', 'enable'))
for name, value in tpg.iteritems():
10 years, 7 months
Patch for issue #22
by Jay Fenlason
--- fabric.py 2013-09-23 16:44:55.000000000 -0400
+++ fabric.py.new 2013-09-25 13:36:36.000000000 -0400
@@ -336,10 +336,10 @@ class SBPFabricModule(_BaseFabricModule)
self.kernel_module = "sbp_target"
def to_fabric_wwn(self, wwn):
- return "0x" + wwn[4:]
+ return wwn[4:]
def from_fabric_wwn(self, wwn):
- return "eui." + wwn[2:]
+ return "eui." + wwn
# return 1st local guid (is unique) so our share is named uniquely
@property
@@ -347,7 +347,10 @@ class SBPFabricModule(_BaseFabricModule)
for fname in glob("/sys/bus/firewire/devices/fw*/is_local"):
if bool(int(fread(fname))):
guid_path = os.path.dirname(fname) + "/guid"
- yield self.from_fabric_wwn(fread(guid_path))
+ tmp = fread(guid_path)
+ if tmp[0:2] == '0x':
+ tmp = tmp[2:]
+ yield self.from_fabric_wwn(tmp)
break
10 years, 7 months
New Releases: targetcli.fb29, rtslib.fb40, and configshell.fb9
by Andy Grover
Hi all,
Christophe Vu-Brugier contributed to configshell, replacing simpleparse
with pyparsing, which is a more well-maintained parsing module. Nice!
There were also a number of brown-paper-bag-on-head issues by me, that
resulted in new rtslib and targetcli releases. Doh!
Github:
https://github.com/agrover/targetcli-fb
https://github.com/agrover/rtslib-fb
https://github.com/agrover/configshell-fb
tarballs:
https://fedorahosted.org/released/targetcli-fb/
targetcli-fb 2.1.fb30:
Andy Grover <agrover(a)redhat.com> (3):
Revert "Put version directly in setup.py"
Add cvubrugier to THANKS
update version to 2.1.fb30
rtslib-fb 2.1.fb40 (from fb38):
Andy Grover <agrover(a)redhat.com> (3):
Fix _path used by tcm_fc
update version to 2.1.39
update version to 2.1.40
Johannes Dewender <github(a)JonnyJD.net> (1):
fix MappedLun typo
configshell-fb 1.1.fb9:
Andy Grover <agrover(a)redhat.com> (1):
update version to 1.1.fb9
Christophe Vu-Brugier <cvubrugier(a)yahoo.fr> (2):
Put package information in setup.py instead of importing
configshell's init
Replace simpleparse with pyparsing
-- Andy
10 years, 7 months
New Releases: targetcli.fb29 and rtslib.fb38
by Andy Grover
Hi all,
targetcli manpage got a big update, more bug fixes and refactoring in
rtslib, and packaging fixes.
Github:
https://github.com/agrover/targetcli-fb
https://github.com/agrover/rtslib-fb
tarballs:
https://fedorahosted.org/released/targetcli-fb/
targetcli-fb 2.1.fb29:
Andy Grover (6):
Add to targetcli man page
Prevent invalid files from being used
manpage: Fix a typo and add header information
Merge pull request #21 from cvubrugier/for-agrover
More manpage tweaking
Put version directly in setup.py
Christophe Vu-Brugier (1):
Put package information in setup.py instead of importing the
targetcli module
rtslib-fb 2.1.fb38::
Andy Grover (8):
Restore TPG Auth params in setup()
Push setup() code down into TPG from Target
Change StorageObject.all() to not take a path parameter
Further break up setup()
Merge pull request #28 from cvubrugier/for-agrover
Merge pull request #30 from josephglanville/master
Handle weird disk names in get_blockdev_size
update version to 2.1.38
Christophe Vu-Brugier (2):
Update license to "Apache 2.0" in setup.py
Don't import doctest globally; just import it in _test()
Joseph Glanville (1):
Ensure the first char of the version is a digit
-- Andy
10 years, 8 months