)]}'
{"nova/virt/vmwareapi/volumeops.py":[{"author":{"_account_id":9172,"name":"Radoslav Gerganov","email":"rgerganov@vmware.com","username":"rgerganov"},"change_message_id":"9c93ab2b9a19bea760dd3a2391ae27744e5d6ce9","unresolved":false,"context_lines":[{"line_number":314,"context_line":"        # If a profile has been configured on the cinder shadow VM then the"},{"line_number":315,"context_line":"        # the volume does not need to be relocated."},{"line_number":316,"context_line":"        profiles \u003d pbm.get_profiles(self._session, volume_ref)"},{"line_number":317,"context_line":"        if not profiles:"},{"line_number":318,"context_line":"            # A profile does not exist for the volume so we need to validate if"},{"line_number":319,"context_line":"            # the instance\u0027s host can access the datastore. If not we need to"},{"line_number":320,"context_line":"            # relocate"}],"source_content_type":"text/x-python","patch_set":3,"id":"da20952f_1f08992c","line":317,"updated":"2015-09-03 14:51:55.000000000","message":"if there is a storage profile which prevents moving the volume to the nova compute cluster then we should fail?","commit_id":"da9a716e44c6266d5ad94441335af6cf0c1f0536"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"4f318c99fbe02985614c603ab8c9d4af3fc611f5","unresolved":false,"context_lines":[{"line_number":314,"context_line":"        # If a profile has been configured on the cinder shadow VM then the"},{"line_number":315,"context_line":"        # the volume does not need to be relocated."},{"line_number":316,"context_line":"        profiles \u003d pbm.get_profiles(self._session, volume_ref)"},{"line_number":317,"context_line":"        if not profiles:"},{"line_number":318,"context_line":"            # A profile does not exist for the volume so we need to validate if"},{"line_number":319,"context_line":"            # the instance\u0027s host can access the datastore. If not we need to"},{"line_number":320,"context_line":"            # relocate"}],"source_content_type":"text/x-python","patch_set":3,"id":"da20952f_603ed2db","line":317,"in_reply_to":"da20952f_1f08992c","updated":"2015-09-03 15:39:07.000000000","message":"yes, good point. i need to check that.","commit_id":"da9a716e44c6266d5ad94441335af6cf0c1f0536"},{"author":{"_account_id":9172,"name":"Radoslav Gerganov","email":"rgerganov@vmware.com","username":"rgerganov"},"change_message_id":"9ce4d64e628ddede039d3b18908b4be31932fd28","unresolved":false,"context_lines":[{"line_number":322,"context_line":"            ds_ref \u003d volume_vmdk.device.backing.datastore"},{"line_number":323,"context_line":"            mounted_hosts \u003d ds_util.get_connected_hosts(self._session,"},{"line_number":324,"context_line":"                                                        ds_ref)"},{"line_number":325,"context_line":"            if host.value not in mounted_hosts:"},{"line_number":326,"context_line":"                res_pool \u003d self._get_res_pool_of_host(host)"},{"line_number":327,"context_line":"                LOG.info(_LI(\"Instance is unable to access volume. \""},{"line_number":328,"context_line":"                             \"Relocating!\"), instance\u003dinstance)"}],"source_content_type":"text/x-python","patch_set":3,"id":"da20952f_ff6da532","line":325,"updated":"2015-09-03 14:49:45.000000000","message":"I am not sure this is correct. I think we can have volume located on datastore A attached to host A and instance located on datastore B attached to host B. As long as datastores A and B are in the cluster managed by nova, we should be fine. The relocation is only necessary when the volume is on a datastore which is not in the compute cluster managed by Nova.\n\n\nWhy do we need this check in the first place? Why not always relocate if there is no SPBM policy for the volume?","commit_id":"da9a716e44c6266d5ad94441335af6cf0c1f0536"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"4f318c99fbe02985614c603ab8c9d4af3fc611f5","unresolved":false,"context_lines":[{"line_number":322,"context_line":"            ds_ref \u003d volume_vmdk.device.backing.datastore"},{"line_number":323,"context_line":"            mounted_hosts \u003d ds_util.get_connected_hosts(self._session,"},{"line_number":324,"context_line":"                                                        ds_ref)"},{"line_number":325,"context_line":"            if host.value not in mounted_hosts:"},{"line_number":326,"context_line":"                res_pool \u003d self._get_res_pool_of_host(host)"},{"line_number":327,"context_line":"                LOG.info(_LI(\"Instance is unable to access volume. \""},{"line_number":328,"context_line":"                             \"Relocating!\"), instance\u003dinstance)"}],"source_content_type":"text/x-python","patch_set":3,"id":"da20952f_2008da2c","line":325,"in_reply_to":"da20952f_ff6da532","updated":"2015-09-03 15:39:07.000000000","message":"we need to make sure that the instance is able to access the volume. this should only be possible if the host has access to the datastore. if not then the operation will fail","commit_id":"da9a716e44c6266d5ad94441335af6cf0c1f0536"},{"author":{"_account_id":9171,"name":"Vipin Balachandran","email":"vipin.bl@gmail.com","username":"vbala"},"change_message_id":"4c453621af6de1ee928a18f63f27722981f08faa","unresolved":false,"context_lines":[{"line_number":322,"context_line":"                                    volume_vmdk, datastore):"},{"line_number":323,"context_line":"        # Check that the volume is accessible by the instance"},{"line_number":324,"context_line":"        # If a profile has been configured on the cinder shadow VM then the"},{"line_number":325,"context_line":"        # the volume does not need to be relocated."},{"line_number":326,"context_line":"        profiles \u003d pbm.get_profiles(self._session, volume_ref)"},{"line_number":327,"context_line":"        if not profiles:"},{"line_number":328,"context_line":"            # A profile does not exist for the volume so we need to validate if"}],"source_content_type":"text/x-python","patch_set":6,"id":"5a2ca52d_dba247ae","line":325,"updated":"2015-10-15 07:06:41.000000000","message":"If the volume\u0027s datastore is not accessible, we should relocate irrespective of whether there is a policy or not. If there is a policy and the current datastore is not accessible, will the attach fail?","commit_id":"4f50efcf2823dc6e0c5b033be645fc6b0cf67afb"},{"author":{"_account_id":9171,"name":"Vipin Balachandran","email":"vipin.bl@gmail.com","username":"vbala"},"change_message_id":"9728700bd681a6eb869bf109e9216ce9497500e9","unresolved":false,"context_lines":[{"line_number":323,"context_line":"        # Check that the volume is accessible by the instance"},{"line_number":324,"context_line":"        # If a profile has been configured on the cinder shadow VM then the"},{"line_number":325,"context_line":"        # the volume does not need to be relocated."},{"line_number":326,"context_line":"        profiles \u003d pbm.get_profiles(self._session, volume_ref)"},{"line_number":327,"context_line":"        if not profiles:"},{"line_number":328,"context_line":"            # A profile does not exist for the volume so we need to validate if"},{"line_number":329,"context_line":"            # the instance\u0027s host can access the datastore. If not we need to"}],"source_content_type":"text/x-python","patch_set":6,"id":"5a2ca52d_3be49b39","line":326,"updated":"2015-10-15 06:59:14.000000000","message":"For VVOL datastores, there is a defult policy which will be returned even if there is no policy associated with the volume\u0027s volume type. So the following check will be True always for volumes in VVOL datastores.","commit_id":"4f50efcf2823dc6e0c5b033be645fc6b0cf67afb"},{"author":{"_account_id":9171,"name":"Vipin Balachandran","email":"vipin.bl@gmail.com","username":"vbala"},"change_message_id":"4c453621af6de1ee928a18f63f27722981f08faa","unresolved":false,"context_lines":[{"line_number":323,"context_line":"        # Check that the volume is accessible by the instance"},{"line_number":324,"context_line":"        # If a profile has been configured on the cinder shadow VM then the"},{"line_number":325,"context_line":"        # the volume does not need to be relocated."},{"line_number":326,"context_line":"        profiles \u003d pbm.get_profiles(self._session, volume_ref)"},{"line_number":327,"context_line":"        if not profiles:"},{"line_number":328,"context_line":"            # A profile does not exist for the volume so we need to validate if"},{"line_number":329,"context_line":"            # the instance\u0027s host can access the datastore. If not we need to"}],"source_content_type":"text/x-python","patch_set":6,"id":"5a2ca52d_9b27ef63","line":326,"in_reply_to":"5a2ca52d_3be49b39","updated":"2015-10-15 07:06:41.000000000","message":"I meant to say that the following check will be False.","commit_id":"4f50efcf2823dc6e0c5b033be645fc6b0cf67afb"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"825cd86392ed329e06ecedef1fe09c0660dd6e93","unresolved":false,"context_lines":[{"line_number":323,"context_line":"        # Check that the volume is accessible by the instance"},{"line_number":324,"context_line":"        # If a profile has been configured on the cinder shadow VM then the"},{"line_number":325,"context_line":"        # the volume does not need to be relocated."},{"line_number":326,"context_line":"        profiles \u003d pbm.get_profiles(self._session, volume_ref)"},{"line_number":327,"context_line":"        if not profiles:"},{"line_number":328,"context_line":"            # A profile does not exist for the volume so we need to validate if"},{"line_number":329,"context_line":"            # the instance\u0027s host can access the datastore. If not we need to"}],"source_content_type":"text/x-python","patch_set":6,"id":"da85f559_a84bbd2a","line":326,"in_reply_to":"5a2ca52d_9b27ef63","updated":"2015-11-08 08:55:16.000000000","message":"Done","commit_id":"4f50efcf2823dc6e0c5b033be645fc6b0cf67afb"},{"author":{"_account_id":9172,"name":"Radoslav Gerganov","email":"rgerganov@vmware.com","username":"rgerganov"},"change_message_id":"3f51550b3ce1a57b8baa3e67d37149b267c84e24","unresolved":false,"context_lines":[{"line_number":332,"context_line":"            ds_ref \u003d volume_vmdk.device.backing.datastore"},{"line_number":333,"context_line":"            mounted_hosts \u003d ds_util.get_connected_hosts(self._session,"},{"line_number":334,"context_line":"                                                        ds_ref)"},{"line_number":335,"context_line":"            if host.value not in mounted_hosts:"},{"line_number":336,"context_line":"                res_pool \u003d self._get_res_pool_of_host(host)"},{"line_number":337,"context_line":"                LOG.info(_LI(\"Instance is unable to access volume. \""},{"line_number":338,"context_line":"                             \"Relocating!\"), instance\u003dinstance)"}],"source_content_type":"text/x-python","patch_set":6,"id":"9a1a9d01_95b1f8e3","line":335,"updated":"2015-09-28 11:55:26.000000000","message":"We don\u0027t need these checks, you can directly call RelocateVM. If the volume VM is already on the correct datastore, the relocate operation will be no-op and will be executed fast.","commit_id":"4f50efcf2823dc6e0c5b033be645fc6b0cf67afb"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"825cd86392ed329e06ecedef1fe09c0660dd6e93","unresolved":false,"context_lines":[{"line_number":332,"context_line":"            ds_ref \u003d volume_vmdk.device.backing.datastore"},{"line_number":333,"context_line":"            mounted_hosts \u003d ds_util.get_connected_hosts(self._session,"},{"line_number":334,"context_line":"                                                        ds_ref)"},{"line_number":335,"context_line":"            if host.value not in mounted_hosts:"},{"line_number":336,"context_line":"                res_pool \u003d self._get_res_pool_of_host(host)"},{"line_number":337,"context_line":"                LOG.info(_LI(\"Instance is unable to access volume. \""},{"line_number":338,"context_line":"                             \"Relocating!\"), instance\u003dinstance)"}],"source_content_type":"text/x-python","patch_set":6,"id":"da85f559_c8f641d7","line":335,"in_reply_to":"9a1a9d01_95b1f8e3","updated":"2015-11-08 08:55:16.000000000","message":"the code above checks that the host of the instance is able to access the datastore that was selected by cinder. \nif not then we need to relocate to the datastore selected in vmops\nthat would require calling the relocate twice - the first time with the cinder datatsore and then catching an exception and then again with the vmops datastore\nhence i think that we should go with the checks above","commit_id":"4f50efcf2823dc6e0c5b033be645fc6b0cf67afb"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"704b0d64b2a41d5734253bad2a9a8b1a1d0493c0","unresolved":false,"context_lines":[{"line_number":316,"context_line":"                                                    \"config.hardware.device\")"},{"line_number":317,"context_line":"        return vm_util.get_vmdk_volume_disk(hardware_devices)"},{"line_number":318,"context_line":""},{"line_number":319,"context_line":"    def _relocate_if_not_accessible(self, instance, vm_ref, volume_ref,"},{"line_number":320,"context_line":"                                    volume_vmdk, datastore):"},{"line_number":321,"context_line":"        host \u003d self._get_host_of_vm(vm_ref)"},{"line_number":322,"context_line":"        ds_ref \u003d volume_vmdk.device.backing.datastore"}],"source_content_type":"text/x-python","patch_set":11,"id":"1aa78d24_4da47ea5","line":319,"updated":"2016-07-05 11:32:30.000000000","message":"It seems like this is not tested?","commit_id":"b2ecbbca20dfa588c6a24e70cef0b58f81d68125"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"27de4a3c0c3ab8573c5c9236be88c95bc8642c7e","unresolved":false,"context_lines":[{"line_number":316,"context_line":"                                                    \"config.hardware.device\")"},{"line_number":317,"context_line":"        return vm_util.get_vmdk_volume_disk(hardware_devices)"},{"line_number":318,"context_line":""},{"line_number":319,"context_line":"    def _relocate_if_not_accessible(self, instance, vm_ref, volume_ref,"},{"line_number":320,"context_line":"                                    volume_vmdk, datastore):"},{"line_number":321,"context_line":"        host \u003d self._get_host_of_vm(vm_ref)"},{"line_number":322,"context_line":"        ds_ref \u003d volume_vmdk.device.backing.datastore"}],"source_content_type":"text/x-python","patch_set":11,"id":"dada55a8_cd22b4a2","line":319,"in_reply_to":"1aa78d24_4da47ea5","updated":"2016-07-21 09:32:20.000000000","message":"Done","commit_id":"b2ecbbca20dfa588c6a24e70cef0b58f81d68125"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"704b0d64b2a41d5734253bad2a9a8b1a1d0493c0","unresolved":false,"context_lines":[{"line_number":352,"context_line":"                raise exception.Invalid(_(\u0027%s does not support disk \u0027"},{"line_number":353,"context_line":"                                          \u0027hotplug.\u0027) % adapter_type)"},{"line_number":354,"context_line":""},{"line_number":355,"context_line":"        # Relocate if necessary"},{"line_number":356,"context_line":"        if datastore:"},{"line_number":357,"context_line":"            relocated \u003d self._relocate_if_not_accessible("},{"line_number":358,"context_line":"                instance, vm_ref, volume_ref, vmdk, datastore)"}],"source_content_type":"text/x-python","patch_set":11,"id":"1aa78d24_ed9c4a5f","line":355,"updated":"2016-07-05 11:32:30.000000000","message":"It seems like this is not tested?","commit_id":"b2ecbbca20dfa588c6a24e70cef0b58f81d68125"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"27de4a3c0c3ab8573c5c9236be88c95bc8642c7e","unresolved":false,"context_lines":[{"line_number":352,"context_line":"                raise exception.Invalid(_(\u0027%s does not support disk \u0027"},{"line_number":353,"context_line":"                                          \u0027hotplug.\u0027) % adapter_type)"},{"line_number":354,"context_line":""},{"line_number":355,"context_line":"        # Relocate if necessary"},{"line_number":356,"context_line":"        if datastore:"},{"line_number":357,"context_line":"            relocated \u003d self._relocate_if_not_accessible("},{"line_number":358,"context_line":"                instance, vm_ref, volume_ref, vmdk, datastore)"}],"source_content_type":"text/x-python","patch_set":11,"id":"dada55a8_2d3ef0c0","line":355,"in_reply_to":"1aa78d24_ed9c4a5f","updated":"2016-07-21 09:32:20.000000000","message":"Done","commit_id":"b2ecbbca20dfa588c6a24e70cef0b58f81d68125"}]}
