Discussion:
[PATCH 1/4] Change master code tree version to 1.2.2
Gris Ge
2015-06-23 13:48:14 UTC
Permalink
Signed-off-by: Gris Ge <***@redhat.com>
---
configure.ac | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/configure.ac b/configure.ac
index 1249495..083a154 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3,7 +3,7 @@ dnl Copyright (C) 2011 Red Hat, Inc.
dnl See COPYING.LIB for the License of this software

AC_INIT(
- [libstoragemgmt], [1.2.1], [libstoragemgmt-***@lists.fedorahosted.org],
+ [libstoragemgmt], [1.2.2], [libstoragemgmt-***@lists.fedorahosted.org],
[], [https://github.com/libstorage/libstoragemgmt/])
AC_CONFIG_SRCDIR([configure.ac])
AC_CONFIG_AUX_DIR([build-aux])
--
1.8.3.1
Gris Ge
2015-06-23 13:48:15 UTC
Permalink
* Use the same format as other plugins in URI parameters section.

Signed-off-by: Gris Ge <***@redhat.com>
---
doc/man/hpsa_lsmplugin.1.in | 8 +++++++-
doc/man/megaraid_lsmplugin.1.in | 10 ++++++++--
2 files changed, 15 insertions(+), 3 deletions(-)

diff --git a/doc/man/hpsa_lsmplugin.1.in b/doc/man/hpsa_lsmplugin.1.in
index 81cc81e..2b07ea6 100644
--- a/doc/man/hpsa_lsmplugin.1.in
+++ b/doc/man/hpsa_lsmplugin.1.in
@@ -18,7 +18,13 @@ To use this plugin, users should set their URI to this format:

.fi

-.TP hpssacli
+.TP
+\fBURI parameters\fR
+These URI parameters are supported by this plugin:
+
+.RS 7
+.TP
+\fBhpssacli\fR
The 'hpssacli' URI parameter is used to specified the path of hpssacli tool.
By default, this plugin will try these paths used by hpssacli rpm:
\fB/usr/sbin/hpssacli\fR and \fB/opt/hp/hpssacli/bld/hpssacli\fR.
diff --git a/doc/man/megaraid_lsmplugin.1.in b/doc/man/megaraid_lsmplugin.1.in
index 0e978f2..d4c7bca 100644
--- a/doc/man/megaraid_lsmplugin.1.in
+++ b/doc/man/megaraid_lsmplugin.1.in
@@ -29,9 +29,15 @@ To use this plugin, users should set their URI to this format:


.TP
-\fBURI paramerter -- 'storcli'\fR
+\fBURI parameters\fR
+These URI parameters are supported by this plugin:

-The 'storcli' URI parameter is used to specified the path of storcli tool.
+.RS 7
+.TP
+\fBstorcli\fR
+
+The 'storcli' URI parameter is used to specified the path of storcli/perccli
+tool.
By default, this plugin will try these paths:

storcli rpm:
--
1.8.3.1
Gris Ge
2015-06-23 13:48:16 UTC
Permalink
On Smart Array P410i, hpssacli provides free pool(array) space as:
"Unused Space: 0 MB (0.0%)"
This cause _hp_size_to_lsm() fail to convert it to size bytes.
The fix just allows extra characters after size string.

Signed-off-by: Gris Ge <***@redhat.com>
---
plugin/hpsa/hpsa.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/plugin/hpsa/hpsa.py b/plugin/hpsa/hpsa.py
index b2f8644..42e0bbb 100644
--- a/plugin/hpsa/hpsa.py
+++ b/plugin/hpsa/hpsa.py
@@ -142,7 +142,7 @@ def _hp_size_to_lsm(hp_size):
HP Using 'TB, GB, MB, KB' and etc, for LSM, they are 'TiB' and etc.
Return int of block bytes
"""
- re_regex = re.compile("^([0-9.]+) +([EPTGMK])B$")
+ re_regex = re.compile("^([0-9.]+) +([EPTGMK])B")
re_match = re_regex.match(hp_size)
if re_match:
return size_human_2_size_bytes(
--
1.8.3.1
Gris Ge
2015-06-23 13:48:17 UTC
Permalink
* Add extra check for no volume configure scenario.

Signed-off-by: Gris Ge <***@redhat.com>
---
plugin/megaraid/megaraid.py | 2 ++
1 file changed, 2 insertions(+)

diff --git a/plugin/megaraid/megaraid.py b/plugin/megaraid/megaraid.py
index bffe6a8..d921c8e 100644
--- a/plugin/megaraid/megaraid.py
+++ b/plugin/megaraid/megaraid.py
@@ -511,6 +511,8 @@ def volumes(self, search_key=None, search_value=None,
vol_show_output = self._storcli_exec(
["/c%d/vall" % ctrl_num, "show", "all"])
sys_id = self._sys_id_of_ctrl_num(ctrl_num)
+ if vol_show_output is None or len(vol_show_output) == 0:
+ continue
for key_name in vol_show_output.keys():
if key_name.startswith('/c'):
vd_basic_info = vol_show_output[key_name][0]
--
1.8.3.1
Loading...