From 5745f8ffbf52bf753ddddeca3fb0fb7db2f433a6 Mon Sep 17 00:00:00 2001 From: Imran Ansari <imran.ansari@hpe.com> Date: Fri, 14 Sep 2018 12:21:18 +0530 Subject: [PATCH 1/4] Fixed #329: Volume inspect for replicated volume not working --- hpedockerplugin/volume_manager.py | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/hpedockerplugin/volume_manager.py b/hpedockerplugin/volume_manager.py index ff503902..f52ea3a3 100644 --- a/hpedockerplugin/volume_manager.py +++ b/hpedockerplugin/volume_manager.py @@ -1043,18 +1043,8 @@ def get_volume_snap_details(self, volname, snapname, qualified_name): vol_detail['fsMode'] = volinfo.get('fsMode') vol_detail['mountConflictDelay'] = volinfo.get( 'mount_conflict_delay') - - cpg = volinfo.get('cpg') - snap_cpg = volinfo.get('snap_cpg') - rcg_info = volinfo.get('rcg_info') - if rcg_info: - driver = self._get_target_driver(rcg_info) - if driver == self._remote_driver: - cpg = self.tgt_bkend_config['hpe3par_cpg'] - snap_cpg = self.tgt_bkend_config['hpe3par_snapcpg'] - - vol_detail['cpg'] = cpg - vol_detail['snap_cpg'] = snap_cpg + vol_detail['cpg'] = volinfo.get('cpg') + vol_detail['snap_cpg'] = volinfo.get('snap_cpg') volume['Status'].update({'volume_detail': vol_detail}) response = json.dumps({u"Err": err, u"Volume": volume}) From 64b74e08aa7e046a5ebd277b09b33ba1e16e5088 Mon Sep 17 00:00:00 2001 From: William Durairaj <w_durairaj@yahoo.com> Date: Mon, 17 Sep 2018 14:33:22 +0530 Subject: [PATCH 2/4] Update README.md --- docs/suse caasp/README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/suse caasp/README.md b/docs/suse caasp/README.md index f396cb7b..c7b39d86 100644 --- a/docs/suse caasp/README.md +++ b/docs/suse caasp/README.md @@ -173,6 +173,7 @@ Installing the HPE 3PAR Volume Plug-in for Docker (Containerized Plug-in) for SU image: hpe-storage/python-hpedockerplugin:plugin_v2 container_name: volplugin net: host + restart: always privileged: true volumes: - /dev:/dev From 2313ccb8b522853f8542cc96804cc9c642442d08 Mon Sep 17 00:00:00 2001 From: William Durairaj <w_durairaj@yahoo.com> Date: Tue, 18 Sep 2018 15:17:04 +0530 Subject: [PATCH 3/4] Update README.md --- docs/suse caasp/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/suse caasp/README.md b/docs/suse caasp/README.md index c7b39d86..a702ead4 100644 --- a/docs/suse caasp/README.md +++ b/docs/suse caasp/README.md @@ -144,7 +144,7 @@ Installing the HPE 3PAR Volume Plug-in for Docker (Containerized Plug-in) for SU <https://github.com/hpe-storage/python-hpedockerplugin/blob/plugin_v2/config/hpe.conf.sample.3parFC> -4. Either you can build the container image by following instructions in step 5 below, or use an pre-existing 2.1 image of the plugin container by substituting `image: hpestorage/legacyvolumeplugin:2.1` in docker-compose.yml given in step 6 +4. Either you can build the container image by following instructions in step 5 below, or use an pre-existing 2.1 image of the plugin container by substituting `image: hpestorage/legacyvolumeplugin:2.1-suse` in docker-compose.yml given in step 6 5. **Build the containerized image** ```bash From 1b4e95763ca24c45ac58881a0aa28703ef02737c Mon Sep 17 00:00:00 2001 From: Imran Ansari <imran.ansari@hpe.com> Date: Thu, 20 Sep 2018 16:32:12 +0530 Subject: [PATCH 4/4] Fix for #329 and #266 Now the inspect command will show both primary and secondary CPGs irrespective of failed over state. --- hpedockerplugin/volume_manager.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/hpedockerplugin/volume_manager.py b/hpedockerplugin/volume_manager.py index f52ea3a3..ca986592 100644 --- a/hpedockerplugin/volume_manager.py +++ b/hpedockerplugin/volume_manager.py @@ -1045,6 +1045,11 @@ def get_volume_snap_details(self, volname, snapname, qualified_name): 'mount_conflict_delay') vol_detail['cpg'] = volinfo.get('cpg') vol_detail['snap_cpg'] = volinfo.get('snap_cpg') + if volinfo.get('rcg_info'): + vol_detail['secondary_cpg'] = \ + self.tgt_bkend_config.hpe3par_cpg[0] + vol_detail['secondary_snap_cpg'] = \ + self.tgt_bkend_config.hpe3par_snapcpg[0] volume['Status'].update({'volume_detail': vol_detail}) response = json.dumps({u"Err": err, u"Volume": volume})