)]}'
{"cinder/volume/drivers/emc/emc_vmax_masking.py":[{"author":{"_account_id":12802,"name":"Carl Pecinovsky","email":"csky@us.ibm.com","username":"carl-sky"},"change_message_id":"ecdb7c2a25de411f3b9a74ef3de66377d4afd237","unresolved":false,"context_lines":[{"line_number":144,"context_line":"                    conn, maskingViewDict, storageGroupInstanceName)"},{"line_number":145,"context_line":"        finally:"},{"line_number":146,"context_line":"            masking_view_sema.release()"},{"line_number":147,"context_line":"            del lock_dict[maskingViewName]"},{"line_number":148,"context_line":""},{"line_number":149,"context_line":"        rollbackDict[\u0027controllerConfigService\u0027] \u003d controllerConfigService"},{"line_number":150,"context_line":"        rollbackDict[\u0027defaultStorageGroupInstanceName\u0027] \u003d ("}],"source_content_type":"text/x-python","patch_set":4,"id":"9a80dd14_2853f96b","line":147,"updated":"2015-03-08 06:01:02.000000000","message":"Consider:\nThread1 - acquires masking_view_sema for \u0027MV1\u0027. Now lock_dict[\u0027MV1\u0027] \u003d\u003d masking_view_sema\nThread2 - finds masking_view_sema from  lock_dict[\u0027MV1\u0027]. It blocks on the semaphore.\nThread1 - masking_view_sema.release(). Secondly, the thread does: del lock_dict[maskingViewName] here. It is now gone from the global dict.\nThread2 - acquires masking_view_sema and does work. When finished, this thread also does:\n    masking_view_sema.release()\t146\n    del lock_dict[maskingViewName]   \u003c------blows up because Thread1 already removed this entry from the lock_dict!!!\n\n\nYou can check that maskingViewName is in lock_dict before deleting the entry, but the real issue is that Thread2 is now running unprotected. Thread3 will come and get an entirely new semaphore because maskingViewName is not in lock_dict (was removed by Thread1). It seems like you need to maintain a use-count for these MV entries in lock_dict or protect global access/removal some other way?","commit_id":"7516bf937cdca2a480c84cc2797b062012bc6b5f"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"541cd7e13160cd36d7eeae9bdb9716f12611e1a2","unresolved":false,"context_lines":[{"line_number":144,"context_line":"                    conn, maskingViewDict, storageGroupInstanceName)"},{"line_number":145,"context_line":"        finally:"},{"line_number":146,"context_line":"            masking_view_sema.release()"},{"line_number":147,"context_line":"            del lock_dict[maskingViewName]"},{"line_number":148,"context_line":""},{"line_number":149,"context_line":"        rollbackDict[\u0027controllerConfigService\u0027] \u003d controllerConfigService"},{"line_number":150,"context_line":"        rollbackDict[\u0027defaultStorageGroupInstanceName\u0027] \u003d ("}],"source_content_type":"text/x-python","patch_set":4,"id":"9a80dd14_edb3944a","line":147,"in_reply_to":"9a80dd14_2853f96b","updated":"2015-03-09 15:40:23.000000000","message":"We\u0027ll revisit this. Thanks.","commit_id":"7516bf937cdca2a480c84cc2797b062012bc6b5f"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"4d71b1d8ace8206cdde138b89ae5094a0ce22940","unresolved":false,"context_lines":[{"line_number":13,"context_line":"#    License for the specific language governing permissions and limitations"},{"line_number":14,"context_line":"#    under the License."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"import threading"},{"line_number":17,"context_line":"import time"},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"from oslo_concurrency import lockutils"}],"source_content_type":"text/x-python","patch_set":7,"id":"9a80dd14_f2964cef","line":16,"updated":"2015-03-13 02:51:29.000000000","message":"Not needed.","commit_id":"ea0b741a4b7383a486da19c56b7d808e5766efa0"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"4d71b1d8ace8206cdde138b89ae5094a0ce22940","unresolved":false,"context_lines":[{"line_number":14,"context_line":"#    under the License."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"import threading"},{"line_number":17,"context_line":"import time"},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"from oslo_concurrency import lockutils"},{"line_number":20,"context_line":"from oslo_log import log as logging"}],"source_content_type":"text/x-python","patch_set":7,"id":"9a80dd14_329d440b","line":17,"updated":"2015-03-13 02:51:29.000000000","message":"Not needed.","commit_id":"ea0b741a4b7383a486da19c56b7d808e5766efa0"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"4d71b1d8ace8206cdde138b89ae5094a0ce22940","unresolved":false,"context_lines":[{"line_number":41,"context_line":"ISV3 \u003d \u0027isV3\u0027"},{"line_number":42,"context_line":""},{"line_number":43,"context_line":"# Locking mechanism for masking views"},{"line_number":44,"context_line":"lock_dict \u003d {}"},{"line_number":45,"context_line":""},{"line_number":46,"context_line":""},{"line_number":47,"context_line":"class EMCVMAXMasking(object):"}],"source_content_type":"text/x-python","patch_set":7,"id":"9a80dd14_9287d0b4","line":44,"updated":"2015-03-13 02:51:29.000000000","message":"Not needed","commit_id":"ea0b741a4b7383a486da19c56b7d808e5766efa0"},{"author":{"_account_id":12802,"name":"Carl Pecinovsky","email":"csky@us.ibm.com","username":"carl-sky"},"change_message_id":"90a45fd7a02600aaca3f8c02af2e7fdd6eb0898a","unresolved":false,"context_lines":[{"line_number":136,"context_line":"        try:"},{"line_number":137,"context_line":"            # If this thread acquires the semaphore then any other thread"},{"line_number":138,"context_line":"            # will have to wait until this thread releases it."},{"line_number":139,"context_line":"            masking_view_sema \u003d ("},{"line_number":140,"context_line":"                self._lock_thread(maskingViewDict[\u0027maskingViewName\u0027]))"},{"line_number":141,"context_line":""},{"line_number":142,"context_line":"            maskingViewInstanceName, storageGroupInstanceName, errorMessage \u003d ("}],"source_content_type":"text/x-python","patch_set":7,"id":"9a80dd14_d60a2589","line":139,"updated":"2015-03-12 22:30:10.000000000","message":"What\u0027s the point of this threading semaphore when you have an interprocess lock around the whole method? Since the interprocess lock is tied to the masking view name as well, I think it should be sufficient and it should not slow down NPIV deployments. For vSCSI attaches using a common masking view, it might be OK..we\u0027ll have to try it out.","commit_id":"ea0b741a4b7383a486da19c56b7d808e5766efa0"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"4d71b1d8ace8206cdde138b89ae5094a0ce22940","unresolved":false,"context_lines":[{"line_number":136,"context_line":"        try:"},{"line_number":137,"context_line":"            # If this thread acquires the semaphore then any other thread"},{"line_number":138,"context_line":"            # will have to wait until this thread releases it."},{"line_number":139,"context_line":"            masking_view_sema \u003d ("},{"line_number":140,"context_line":"                self._lock_thread(maskingViewDict[\u0027maskingViewName\u0027]))"},{"line_number":141,"context_line":""},{"line_number":142,"context_line":"            maskingViewInstanceName, storageGroupInstanceName, errorMessage \u003d ("}],"source_content_type":"text/x-python","patch_set":7,"id":"9a80dd14_d24308ad","line":139,"in_reply_to":"9a80dd14_d60a2589","updated":"2015-03-13 02:51:29.000000000","message":"I think this is left over from the previous patch set. It is not needed any more.","commit_id":"ea0b741a4b7383a486da19c56b7d808e5766efa0"},{"author":{"_account_id":12802,"name":"Carl Pecinovsky","email":"csky@us.ibm.com","username":"carl-sky"},"change_message_id":"90a45fd7a02600aaca3f8c02af2e7fdd6eb0898a","unresolved":false,"context_lines":[{"line_number":1753,"context_line":"                mvInstanceName, LocalOnly\u003dFalse)"},{"line_number":1754,"context_line":"            maskingViewName \u003d maskingViewInstance[\u0027ElementName\u0027]"},{"line_number":1755,"context_line":""},{"line_number":1756,"context_line":"            @lockutils.synchronized(\u0027emc-mv-\u0027 + maskingViewName,"},{"line_number":1757,"context_line":"                                    \"emc-mv-\", True)"},{"line_number":1758,"context_line":"            def do_delete_mv_and_sg():"},{"line_number":1759,"context_line":"                return self._delete_mv_and_sg("}],"source_content_type":"text/x-python","patch_set":7,"id":"9a80dd14_9670ad41","line":1756,"updated":"2015-03-12 22:30:10.000000000","message":"It\u0027s kind of redundant to have \"emc-mv-\" in the lock name if you have it in the lock file prefix as well.","commit_id":"ea0b741a4b7383a486da19c56b7d808e5766efa0"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"4d71b1d8ace8206cdde138b89ae5094a0ce22940","unresolved":false,"context_lines":[{"line_number":1753,"context_line":"                mvInstanceName, LocalOnly\u003dFalse)"},{"line_number":1754,"context_line":"            maskingViewName \u003d maskingViewInstance[\u0027ElementName\u0027]"},{"line_number":1755,"context_line":""},{"line_number":1756,"context_line":"            @lockutils.synchronized(\u0027emc-mv-\u0027 + maskingViewName,"},{"line_number":1757,"context_line":"                                    \"emc-mv-\", True)"},{"line_number":1758,"context_line":"            def do_delete_mv_and_sg():"},{"line_number":1759,"context_line":"                return self._delete_mv_and_sg("}],"source_content_type":"text/x-python","patch_set":7,"id":"9a80dd14_d2006804","line":1756,"in_reply_to":"9a80dd14_9670ad41","updated":"2015-03-13 02:51:29.000000000","message":"Sure. We can remove the one in the lock name.","commit_id":"ea0b741a4b7383a486da19c56b7d808e5766efa0"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"4d71b1d8ace8206cdde138b89ae5094a0ce22940","unresolved":false,"context_lines":[{"line_number":1764,"context_line":"        else:"},{"line_number":1765,"context_line":"            # Not the last volume so remove it from storage group in"},{"line_number":1766,"context_line":"            # the masking view."},{"line_number":1767,"context_line":"            LOG.debug(\"start: number of volumes in masking storage group: \""},{"line_number":1768,"context_line":"                      \"%(numVol)d\", {\u0027numVol\u0027: len(volumeInstanceNames)})"},{"line_number":1769,"context_line":"            self.provision.remove_device_from_storage_group("},{"line_number":1770,"context_line":"                conn, controllerConfigService, storageGroupInstanceName,"}],"source_content_type":"text/x-python","patch_set":7,"id":"9a80dd14_5270f8db","line":1767,"updated":"2015-03-13 02:51:29.000000000","message":"Capital \"S\".","commit_id":"ea0b741a4b7383a486da19c56b7d808e5766efa0"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"4d71b1d8ace8206cdde138b89ae5094a0ce22940","unresolved":false,"context_lines":[{"line_number":1790,"context_line":"            volumeInstanceNames \u003d self.get_devices_from_storage_group("},{"line_number":1791,"context_line":"                conn, storageGroupInstanceName)"},{"line_number":1792,"context_line":"            LOG.debug("},{"line_number":1793,"context_line":"                \"end: number of volumes in masking storage group: %(numVol)d.\","},{"line_number":1794,"context_line":"                {\u0027numVol\u0027: len(volumeInstanceNames)})"},{"line_number":1795,"context_line":""},{"line_number":1796,"context_line":"        return storageGroupInstanceName"}],"source_content_type":"text/x-python","patch_set":7,"id":"9a80dd14_d27b08bc","line":1793,"updated":"2015-03-13 02:51:29.000000000","message":"End","commit_id":"ea0b741a4b7383a486da19c56b7d808e5766efa0"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"4d71b1d8ace8206cdde138b89ae5094a0ce22940","unresolved":false,"context_lines":[{"line_number":2265,"context_line":"                raise exception.VolumeBackendAPIException("},{"line_number":2266,"context_line":"                    data\u003dexceptionMessage)"},{"line_number":2267,"context_line":""},{"line_number":2268,"context_line":"    def _lock_thread(self, maskingViewName):"},{"line_number":2269,"context_line":"        \"\"\"Based on maskingViewName check if semaphore is locked or not"},{"line_number":2270,"context_line":""},{"line_number":2271,"context_line":"        :param maskingViewName: masking view name"}],"source_content_type":"text/x-python","patch_set":7,"id":"9a80dd14_92527065","line":2268,"updated":"2015-03-13 02:51:29.000000000","message":"Should be removed.","commit_id":"ea0b741a4b7383a486da19c56b7d808e5766efa0"},{"author":{"_account_id":7198,"name":"Jay Bryant","email":"jungleboyj@electronicjungle.net","username":"jsbryant"},"change_message_id":"e6eaf5582e389775269aed67955327071fca80f4","unresolved":false,"context_lines":[{"line_number":2189,"context_line":"        :param storageGroupName: storage group name"},{"line_number":2190,"context_line":"        :param volumeInstanceName: volume instance name"},{"line_number":2191,"context_line":"        :param volumeName: volume name"},{"line_number":2192,"context_line":"        :param extrSpecs: additional info"},{"line_number":2193,"context_line":"        \"\"\""},{"line_number":2194,"context_line":"        self.provision.remove_device_from_storage_group("},{"line_number":2195,"context_line":"            conn, controllerConfigService, storageGroupInstanceName,"}],"source_content_type":"text/x-python","patch_set":8,"id":"9a80dd14_28668251","line":2192,"updated":"2015-03-14 00:58:03.000000000","message":"typo extrSpecs -\u003e extraSpecs","commit_id":"8113c8e1b153ad20ebf1692e8a8b903515d974c6"}],"cinder/volume/drivers/emc/emc_vmax_provision_v3.py":[{"author":{"_account_id":7198,"name":"Jay Bryant","email":"jungleboyj@electronicjungle.net","username":"jsbryant"},"change_message_id":"0ae1815753d6e550ca63f867ca55383502ad757b","unresolved":false,"context_lines":[{"line_number":279,"context_line":"            EMCWorkload\u003dworkload)"},{"line_number":280,"context_line":""},{"line_number":281,"context_line":"        if rc !\u003d 0L:"},{"line_number":282,"context_line":"            rc, errordesc \u003d self.utils.wait_for_job_complete("},{"line_number":283,"context_line":"                conn, job)"},{"line_number":284,"context_line":"            if rc !\u003d 0L:"},{"line_number":285,"context_line":"                LOG.error(_LE("}],"source_content_type":"text/x-python","patch_set":1,"id":"ba7be1f8_e671a578","line":282,"updated":"2015-02-20 15:47:37.000000000","message":"This seems like an unrelated change?","commit_id":"799925036562518b8ff531ec93fe6758e0c81d7d"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"a07785bb3c46f8d37274306a637726f54df1be4f","unresolved":false,"context_lines":[{"line_number":279,"context_line":"            EMCWorkload\u003dworkload)"},{"line_number":280,"context_line":""},{"line_number":281,"context_line":"        if rc !\u003d 0L:"},{"line_number":282,"context_line":"            rc, errordesc \u003d self.utils.wait_for_job_complete("},{"line_number":283,"context_line":"                conn, job)"},{"line_number":284,"context_line":"            if rc !\u003d 0L:"},{"line_number":285,"context_line":"                LOG.error(_LE("}],"source_content_type":"text/x-python","patch_set":1,"id":"ba7be1f8_64904e96","line":282,"in_reply_to":"ba7be1f8_e671a578","updated":"2015-02-20 16:06:32.000000000","message":"Yes, I\u0027ll add a comment in the commit message.","commit_id":"799925036562518b8ff531ec93fe6758e0c81d7d"}]}
