From 418cf4b989c8df983c1109c8c8851d9d4c3ffbfe Mon Sep 17 00:00:00 2001 From: Adriano Rosso Date: Tue, 5 May 2015 15:58:38 -0300 Subject: [PATCH] HDS HNAS Driver fails when FS unhealthy This patch fixes the error when there is a file system in an unhealthy HNAS storage pool. Change-Id: Ic17c540039996f4a1060829d5f1f12a5f3155271 Closes-bug: #1452002 --- cinder/tests/unit/test_hds_hnas_backend.py | 8 ++++++++ cinder/volume/drivers/hds/hnas_backend.py | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/cinder/tests/unit/test_hds_hnas_backend.py b/cinder/tests/unit/test_hds_hnas_backend.py index 8f2070a75..6af18bb92 100644 --- a/cinder/tests/unit/test_hds_hnas_backend.py +++ b/cinder/tests/unit/test_hds_hnas_backend.py @@ -102,6 +102,10 @@ HNAS_RESULT5 = "\n\ 1032 test 2 3.97 GB 2.12 GB (53%) 0 B (0%) NA \ 1.85 GB (47%) No 4 KB,\ WFS-2,128 DSBs\n\ +1058 huge_FS 7 1.50 TB Not determined\n\ +1053 fs-unmounted 4 108 GB Not mounted \ + NA 943 MB (18%) 39.2 GB (36%) No 4 KB,\ + WFS-2,128 DSBs,dedupe enabled\n\ \n" HNAS_RESULT6 = "\n\ @@ -173,6 +177,10 @@ Deduped Avail Thin ThinSize ThinAvail FS Type\n\ No 4 KB,WFS-2,128 DSBs\n\ 1047 manage_test02 19.9 GB 9.29 GB (47%) 0 B (0%) NA 10.6 GB (53%)\ No 4 KB,WFS-2,128 DSBs\n\ +1058 huge_FS 7 1.50 TB Not determined\n\ +1053 fs-unmounted 4 108 GB Not mounted \ + NA 943 MB (18%) 39.2 GB (36%) No 4 KB,\ + WFS-2,128 DSBs,dedupe enabled\n\ \n" HNAS_RESULT20 = "\n\ diff --git a/cinder/volume/drivers/hds/hnas_backend.py b/cinder/volume/drivers/hds/hnas_backend.py index 64087d145..c449cd468 100644 --- a/cinder/volume/drivers/hds/hnas_backend.py +++ b/cinder/volume/drivers/hds/hnas_backend.py @@ -182,7 +182,7 @@ class HnasBackend(object): newout = "" for line in lines: - if 'Not mounted' in line: + if 'Not mounted' in line or 'Not determined' in line: continue if 'not' not in line and 'EVS' in line: single_evs = False -- 2.45.2