diff options
author | Andy Grover <agrover@redhat.com> | 2013-02-07 14:34:51 -0800 |
---|---|---|
committer | Andy Grover <agrover@redhat.com> | 2013-02-07 14:34:51 -0800 |
commit | 745210f6d9dc8087640c10475b23162cde4e3e3b (patch) | |
tree | 9079554ed0426fefc94dbd363b62d4989e337be0 | |
parent | b4d034d77c8828f6d7a1ec9337913b0c4ea2ef00 (diff) | |
download | rtslib-fb-745210f6d9dc8087640c10475b23162cde4e3e3b.tar.gz |
Fix up unvalid NAA values
Old versions of rtslib generated NAA values that started with '6'. 6 means
a 128-bit NAA, but we use 64 bit NAAs, which should be prefixed by '5'.
Since we're strict about NAA checking, reloading from old '6' savefiles
would fail. Instead, convert to the proper prefix and continue.
Signed-off-by: Andy Grover <agrover@redhat.com>
-rw-r--r-- | rtslib/target.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/rtslib/target.py b/rtslib/target.py index 373c746..47fbada 100644 --- a/rtslib/target.py +++ b/rtslib/target.py @@ -66,6 +66,9 @@ class Target(CFSNode): fabric_module._check_self() if wwn is not None: + # old versions used wrong NAA prefix, fixup + if wwn.startswith("naa.6"): + wwn = "naa.5" + wwn[5:] self.wwn, self.wwn_type = fabric_module.to_normalized_wwn(wwn) elif not fabric_module.wwns: self.wwn = generate_wwn(fabric_module.wwn_types[0]) |