)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":26250,"name":"Johannes Kulik","email":"johannes.kulik@sap.com","username":"jkulik"},"change_message_id":"043acb2fb110932ebee3d805cbe5431a37799005","unresolved":false,"context_lines":[{"line_number":7,"context_line":"[vmware] validate storage profile at startup"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This patch adds some checks to the vmdk.py driver at"},{"line_number":10,"context_line":"check_for_setup_errors() time in the driver"},{"line_number":11,"context_line":"to ensure the vmware_storage_profile config"},{"line_number":12,"context_line":"settings exist in vcenter."},{"line_number":13,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"1f493fa4_85735d80","line":10,"updated":"2020-05-08 09:27:28.000000000","message":"Douple mentionioning of the driver imho. Maybe better\n\"… checks to the vmdk.py driver at check_for_setup_errors() time to ensure …\"","commit_id":"6b3a2737327277f4af2ebe611b05ae4ef4682ce3"},{"author":{"_account_id":26250,"name":"Johannes Kulik","email":"johannes.kulik@sap.com","username":"jkulik"},"change_message_id":"043acb2fb110932ebee3d805cbe5431a37799005","unresolved":false,"context_lines":[{"line_number":9,"context_line":"This patch adds some checks to the vmdk.py driver at"},{"line_number":10,"context_line":"check_for_setup_errors() time in the driver"},{"line_number":11,"context_line":"to ensure the vmware_storage_profile config"},{"line_number":12,"context_line":"settings exist in vcenter."},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"Change-Id: I44880354e729957afed89dc6d1b13692d277d743"},{"line_number":15,"context_line":"Closes-Bug: 1877375"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"1f493fa4_e53061a1","line":12,"updated":"2020-05-08 09:27:28.000000000","message":"I\u0027d also rewrite this as \"… ensure the storage profiles set in the vmware_storage_profile config settings exist in vcenter.\"\nOtherwise, it sounds a little like we would check for the existence of the vmware_storage_profile config setting in the vcenter, which probably isn\u0027t a thing.","commit_id":"6b3a2737327277f4af2ebe611b05ae4ef4682ce3"}],"cinder/volume/drivers/vmware/vmdk.py":[{"author":{"_account_id":26250,"name":"Johannes Kulik","email":"johannes.kulik@sap.com","username":"jkulik"},"change_message_id":"043acb2fb110932ebee3d805cbe5431a37799005","unresolved":false,"context_lines":[{"line_number":332,"context_line":"        # make sure if the storage profile is set that it exists."},{"line_number":333,"context_line":"        for storage_profile in self.configuration.vmware_storage_profile:"},{"line_number":334,"context_line":"            if self._storage_policy_enabled and storage_profile:"},{"line_number":335,"context_line":"                profile_id \u003d self._get_storage_profile_by_name(storage_profile)"},{"line_number":336,"context_line":"                if not profile_id:"},{"line_number":337,"context_line":"                    reason \u003d (_(\"Failed to find storage profile \u0027%s\u0027\")"},{"line_number":338,"context_line":"                              % storage_profile)"}],"source_content_type":"text/x-python","patch_set":2,"id":"1f493fa4_45f3150b","line":335,"updated":"2020-05-08 09:27:28.000000000","message":"Using \"pbm.get_profile_id_by_name()\" here might be inefficient for multiple defined storage profiles, because it will retrieve all profiles and then for-loop over them and filter by name (https://github.com/openstack/oslo.vmware/blob/master/oslo_vmware/pbm.py#L111)\nIt might be worth extending either oslo.vmware to be able to search for multiple profile names or inlining that for-loop like we do already on line 417 in \"_get_datastore_summaries()\".","commit_id":"6b3a2737327277f4af2ebe611b05ae4ef4682ce3"},{"author":{"_account_id":5997,"name":"Walt","display_name":"Hemna","email":"waboring@hemna.com","username":"walter-boring","status":"SAP"},"change_message_id":"0b803016b098766e6b1c88c5531bb7e75975aae6","unresolved":false,"context_lines":[{"line_number":332,"context_line":"        # make sure if the storage profile is set that it exists."},{"line_number":333,"context_line":"        for storage_profile in self.configuration.vmware_storage_profile:"},{"line_number":334,"context_line":"            if self._storage_policy_enabled and storage_profile:"},{"line_number":335,"context_line":"                profile_id \u003d self._get_storage_profile_by_name(storage_profile)"},{"line_number":336,"context_line":"                if not profile_id:"},{"line_number":337,"context_line":"                    reason \u003d (_(\"Failed to find storage profile \u0027%s\u0027\")"},{"line_number":338,"context_line":"                              % storage_profile)"}],"source_content_type":"text/x-python","patch_set":2,"id":"ff570b3c_dcc74f45","line":335,"in_reply_to":"1f493fa4_45f3150b","updated":"2020-05-11 11:40:45.000000000","message":"check_for_setup_error is only called once at driver startup.  So yes, we could inline a single call and for loop to do a search more efficiently, but that\u0027s really optimizing a call that happens once at startup for a small dataset.  The same call is made several more times throughout the life of the driver during other volume operations.    \n\nSo, I think the right thing to do here is to update oslo.vmware to find a different way of fetching the specific profile.  either way, this patch would benefit from that once that is complete.  In the mean time we have fixed a bug in this driver by ensuring that the profile exists at startup.","commit_id":"6b3a2737327277f4af2ebe611b05ae4ef4682ce3"},{"author":{"_account_id":26250,"name":"Johannes Kulik","email":"johannes.kulik@sap.com","username":"jkulik"},"change_message_id":"f321e12a4a56333bb8d1bc1f2d5762d7419720e9","unresolved":false,"context_lines":[{"line_number":332,"context_line":"        # make sure if the storage profile is set that it exists."},{"line_number":333,"context_line":"        for storage_profile in self.configuration.vmware_storage_profile:"},{"line_number":334,"context_line":"            if self._storage_policy_enabled and storage_profile:"},{"line_number":335,"context_line":"                profile_id \u003d self._get_storage_profile_by_name(storage_profile)"},{"line_number":336,"context_line":"                if not profile_id:"},{"line_number":337,"context_line":"                    reason \u003d (_(\"Failed to find storage profile \u0027%s\u0027\")"},{"line_number":338,"context_line":"                              % storage_profile)"}],"source_content_type":"text/x-python","patch_set":2,"id":"ff570b3c_dcad8f32","line":335,"in_reply_to":"ff570b3c_dcc74f45","updated":"2020-05-11 11:54:41.000000000","message":"I agree, that it doesn\u0027t matter much for single use. I just don\u0027t want anybody to take this as an example when trying to access profiles again.\n\nThe other code I found always fetches a single profile - that of the volume - and doesn\u0027t iterate over all profiles enabled for the driver. It doesn\u0027t look nice that it has to use a for-loop on the vmware side, but it\u0027s a single for-loop at least, while accessing all profiles this way is one for-loop per profile.\n\nStill, as said, it\u0027s not critical and fixing the bug is worth more.","commit_id":"6b3a2737327277f4af2ebe611b05ae4ef4682ce3"},{"author":{"_account_id":22078,"name":"Damon Li","email":"likailichee@gmail.com","username":"likai"},"change_message_id":"1951f77df3027d24325ff82e036a31956afb44a3","unresolved":false,"context_lines":[{"line_number":330,"context_line":""},{"line_number":331,"context_line":"    def check_for_setup_error(self):"},{"line_number":332,"context_line":"        # make sure if the storage profile is set that it exists."},{"line_number":333,"context_line":"        for storage_profile in self.configuration.vmware_storage_profile:"},{"line_number":334,"context_line":"            if self._storage_policy_enabled and storage_profile:"},{"line_number":335,"context_line":"                profile_id \u003d self._get_storage_profile_by_name(storage_profile)"},{"line_number":336,"context_line":"                if not profile_id:"}],"source_content_type":"text/x-python","patch_set":4,"id":"bf51134e_633c4dbf","line":333,"range":{"start_line":333,"start_character":50,"end_line":333,"end_character":72},"updated":"2020-06-19 01:42:52.000000000","message":"If this params is None, it will be failed. Just see the vmware ci result.","commit_id":"02516e4df0159a143753a13e249c92823f09b75f"},{"author":{"_account_id":5997,"name":"Walt","display_name":"Hemna","email":"waboring@hemna.com","username":"walter-boring","status":"SAP"},"change_message_id":"29178d99e18cd342db02f8fb62feb739c85038f1","unresolved":false,"context_lines":[{"line_number":330,"context_line":""},{"line_number":331,"context_line":"    def check_for_setup_error(self):"},{"line_number":332,"context_line":"        # make sure if the storage profile is set that it exists."},{"line_number":333,"context_line":"        for storage_profile in self.configuration.vmware_storage_profile:"},{"line_number":334,"context_line":"            if self._storage_policy_enabled and storage_profile:"},{"line_number":335,"context_line":"                profile_id \u003d self._get_storage_profile_by_name(storage_profile)"},{"line_number":336,"context_line":"                if not profile_id:"}],"source_content_type":"text/x-python","patch_set":4,"id":"bf51134e_8e69c18c","line":333,"range":{"start_line":333,"start_character":50,"end_line":333,"end_character":72},"in_reply_to":"bf51134e_633c4dbf","updated":"2020-06-19 12:33:32.000000000","message":"Done","commit_id":"02516e4df0159a143753a13e249c92823f09b75f"}]}
