)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"4aed6ca94d6eabe3ec7c78d3f9980139088fb8e0","unresolved":false,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Fix for bug 1160323."},{"line_number":10,"context_line":""},{"line_number":11,"context_line":"DocImpact"},{"line_number":12,"context_line":"Depends on a version of XAPI supporting relax-xsm-sr-check."},{"line_number":13,"context_line":"Currently no release versions support this, so the change at"},{"line_number":14,"context_line":"https://github.com/xen-org/xen-api/pull/1116 would need to be applied"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":8,"id":"AAAAOn%2F%2FqHM%3D","line":11,"updated":"2013-04-30 09:33:28.000000000","message":"This seems to match what is requested here: https://wiki.openstack.org/wiki/Documentation/HowTo#Using_the_DocImpact_Flag_in_a_Commit_Message\n\nI would like to learn if that is not the correct way, maybe I would separate from the other text a little, but that is just cosmetic.","commit_id":"5d4a935541cb4539e351257a459f25c8cd53858d"},{"author":{"_account_id":2271,"name":"Michael Still","email":"mikal@stillhq.com","username":"mikalstill"},"change_message_id":"b57937b7c15281e20e52974e492c217080877427","unresolved":false,"context_lines":[{"line_number":16,"context_line":"support this mode, and possibly some future hotfixes for XenServer 6.1."},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"It also depends on a configuration change which must be documented and added to devstack:"},{"line_number":19,"context_line":"* Set \"relax-xsm-sr-check \u003d true\" in /etc/xapi.conf"},{"line_number":20,"context_line":""},{"line_number":21,"context_line":"This commit makes the following changes:"},{"line_number":22,"context_line":"* Attach the SR on the destination host prior to migrate"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":8,"id":"AAAAOn%2F%2Froo%3D","line":19,"updated":"2013-04-29 10:45:18.000000000","message":"This description makes me think this change should have a DocImpact paragraph?","commit_id":"5d4a935541cb4539e351257a459f25c8cd53858d"}],"nova/compute/manager.py":[{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"e6e3681130f57da321989efcc0f653cf65a6787f","unresolved":false,"context_lines":[{"line_number":3117,"context_line":"            pre_migration_data \u003d self.compute_rpcapi.pre_live_migration("},{"line_number":3118,"context_line":"                context, instance,"},{"line_number":3119,"context_line":"                block_migration, disk, dest, migrate_data)"},{"line_number":3120,"context_line":"            migrate_data[\u0027pre_migration_data\u0027] \u003d pre_migration_data"},{"line_number":3121,"context_line":""},{"line_number":3122,"context_line":"        except Exception:"},{"line_number":3123,"context_line":"            with excutils.save_and_reraise_exception():"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAOH%2F%2FyAg%3D","line":3120,"updated":"2013-03-27 18:52:34.000000000","message":"I am never keen on modifying a dictionary that gets passed into a function, prefer to copy the dictionary first, to stop odd side effects. But this does seam reasonable.","commit_id":"f8850dfd17902ae994db064bbc2541e48950b876"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"bcb0e044c15195a9d61078c12ea93327fcef6bee","unresolved":false,"context_lines":[{"line_number":3117,"context_line":"            pre_migration_data \u003d self.compute_rpcapi.pre_live_migration("},{"line_number":3118,"context_line":"                context, instance,"},{"line_number":3119,"context_line":"                block_migration, disk, dest, migrate_data)"},{"line_number":3120,"context_line":"            migrate_data[\u0027pre_migration_data\u0027] \u003d pre_migration_data"},{"line_number":3121,"context_line":""},{"line_number":3122,"context_line":"        except Exception:"},{"line_number":3123,"context_line":"            with excutils.save_and_reraise_exception():"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAOH%2F%2Fwuw%3D","line":3120,"in_reply_to":"AAAAOH%2F%2FxJ8%3D","updated":"2013-03-28 16:37:16.000000000","message":"discussed on irc, just copy dict first.","commit_id":"f8850dfd17902ae994db064bbc2541e48950b876"},{"author":{"_account_id":6735,"name":"Bob Ball","email":"bob.ball@citrix.com","username":"bob-ball"},"change_message_id":"41a590038f200424227f43b61812b482cc06e5f1","unresolved":false,"context_lines":[{"line_number":3117,"context_line":"            pre_migration_data \u003d self.compute_rpcapi.pre_live_migration("},{"line_number":3118,"context_line":"                context, instance,"},{"line_number":3119,"context_line":"                block_migration, disk, dest, migrate_data)"},{"line_number":3120,"context_line":"            migrate_data[\u0027pre_migration_data\u0027] \u003d pre_migration_data"},{"line_number":3121,"context_line":""},{"line_number":3122,"context_line":"        except Exception:"},{"line_number":3123,"context_line":"            with excutils.save_and_reraise_exception():"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAOH%2F%2Fwws%3D","line":3120,"in_reply_to":"AAAAOH%2F%2FyAg%3D","updated":"2013-04-02 17:10:11.000000000","message":"Done","commit_id":"f8850dfd17902ae994db064bbc2541e48950b876"},{"author":{"_account_id":6735,"name":"Bob Ball","email":"bob.ball@citrix.com","username":"bob-ball"},"change_message_id":"91f3358453f5a7e46d757147b7c8280b0e73fb9e","unresolved":false,"context_lines":[{"line_number":3117,"context_line":"            pre_migration_data \u003d self.compute_rpcapi.pre_live_migration("},{"line_number":3118,"context_line":"                context, instance,"},{"line_number":3119,"context_line":"                block_migration, disk, dest, migrate_data)"},{"line_number":3120,"context_line":"            migrate_data[\u0027pre_migration_data\u0027] \u003d pre_migration_data"},{"line_number":3121,"context_line":""},{"line_number":3122,"context_line":"        except Exception:"},{"line_number":3123,"context_line":"            with excutils.save_and_reraise_exception():"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAOH%2F%2FxJ8%3D","line":3120,"in_reply_to":"AAAAOH%2F%2FyAg%3D","updated":"2013-03-28 11:09:16.000000000","message":"I think this is the right thing to do here - if there is a good argument to be made then we can look at extending the API (e.g. _rollback_live_migration and live_migration) to take a second dictionary.","commit_id":"f8850dfd17902ae994db064bbc2541e48950b876"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"e6e3681130f57da321989efcc0f653cf65a6787f","unresolved":false,"context_lines":[{"line_number":3163,"context_line":"            self.volume_api.terminate_connection(ctxt, volume, connector)"},{"line_number":3164,"context_line":""},{"line_number":3165,"context_line":"            # Detach from the hypervisor and terminate the connection"},{"line_number":3166,"context_line":"            self.driver.detach_volume(jsonutils.loads(bdm[\u0027connection_info\u0027]),"},{"line_number":3167,"context_line":"                                      None, None)"},{"line_number":3168,"context_line":""},{"line_number":3169,"context_line":"        # Releasing vlan."}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAOH%2F%2FyAQ%3D","line":3166,"updated":"2013-03-27 18:52:34.000000000","message":"Why do we need this, should terminate_connection not do the trick? Maybe its broken for xenapi?\n\nI think this call needs to get pushed into the xenapi specific code... just after the live-migrate call succeeds.","commit_id":"f8850dfd17902ae994db064bbc2541e48950b876"},{"author":{"_account_id":6735,"name":"Bob Ball","email":"bob.ball@citrix.com","username":"bob-ball"},"change_message_id":"41a590038f200424227f43b61812b482cc06e5f1","unresolved":false,"context_lines":[{"line_number":3163,"context_line":"            self.volume_api.terminate_connection(ctxt, volume, connector)"},{"line_number":3164,"context_line":""},{"line_number":3165,"context_line":"            # Detach from the hypervisor and terminate the connection"},{"line_number":3166,"context_line":"            self.driver.detach_volume(jsonutils.loads(bdm[\u0027connection_info\u0027]),"},{"line_number":3167,"context_line":"                                      None, None)"},{"line_number":3168,"context_line":""},{"line_number":3169,"context_line":"        # Releasing vlan."}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAOH%2F%2Fsjc%3D","line":3166,"in_reply_to":"AAAAOH%2F%2Fwuk%3D","updated":"2013-04-02 17:10:11.000000000","message":"Done","commit_id":"f8850dfd17902ae994db064bbc2541e48950b876"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"bcb0e044c15195a9d61078c12ea93327fcef6bee","unresolved":false,"context_lines":[{"line_number":3163,"context_line":"            self.volume_api.terminate_connection(ctxt, volume, connector)"},{"line_number":3164,"context_line":""},{"line_number":3165,"context_line":"            # Detach from the hypervisor and terminate the connection"},{"line_number":3166,"context_line":"            self.driver.detach_volume(jsonutils.loads(bdm[\u0027connection_info\u0027]),"},{"line_number":3167,"context_line":"                                      None, None)"},{"line_number":3168,"context_line":""},{"line_number":3169,"context_line":"        # Releasing vlan."}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAOH%2F%2Fwuk%3D","line":3166,"in_reply_to":"AAAAOH%2F%2FxJ0%3D","updated":"2013-03-28 16:37:16.000000000","message":"it can\u0027t be in hypervisor neutral code, its gonna break things for other people.","commit_id":"f8850dfd17902ae994db064bbc2541e48950b876"},{"author":{"_account_id":6735,"name":"Bob Ball","email":"bob.ball@citrix.com","username":"bob-ball"},"change_message_id":"91f3358453f5a7e46d757147b7c8280b0e73fb9e","unresolved":false,"context_lines":[{"line_number":3163,"context_line":"            self.volume_api.terminate_connection(ctxt, volume, connector)"},{"line_number":3164,"context_line":""},{"line_number":3165,"context_line":"            # Detach from the hypervisor and terminate the connection"},{"line_number":3166,"context_line":"            self.driver.detach_volume(jsonutils.loads(bdm[\u0027connection_info\u0027]),"},{"line_number":3167,"context_line":"                                      None, None)"},{"line_number":3168,"context_line":""},{"line_number":3169,"context_line":"        # Releasing vlan."}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAOH%2F%2FxJ0%3D","line":3166,"in_reply_to":"AAAAOH%2F%2FyAQ%3D","updated":"2013-03-28 11:09:16.000000000","message":"Terminate connection is cinder only - it does not get involved with the xenapi driver.  It could be argued that it\u0027s broken for XenAPI because I suspect that the XS will reconnect since the SR still exists - but I believe that \"fixing\" that would mean cinder calling nova.\n\nIt could go into the xenapi code, except it\u0027s harder to access the BDM at that point - particularly because it\u0027s the manager that has the get_instance_volume_bdms call.  Again, we could extend the live migrate API to pass that information but it seemed to make the most sense to have it in here since this is explicitely work that needs to be done post_live_migration.","commit_id":"f8850dfd17902ae994db064bbc2541e48950b876"},{"author":{"_account_id":5044,"name":"Mate Lakat","email":"mlakat@suse.com","username":"mate-lakat"},"change_message_id":"a4049ee7ddf75d8a0b854dc3dde82358e79d7291","unresolved":false,"context_lines":[{"line_number":3130,"context_line":"            pre_migration_data \u003d self.compute_rpcapi.pre_live_migration("},{"line_number":3131,"context_line":"                context, instance,"},{"line_number":3132,"context_line":"                block_migration, disk, dest, migrate_data)"},{"line_number":3133,"context_line":"            migrate_data[\u0027pre_migration_data\u0027] \u003d pre_migration_data"},{"line_number":3134,"context_line":""},{"line_number":3135,"context_line":"        except Exception:"},{"line_number":3136,"context_line":"            with excutils.save_and_reraise_exception():"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAOX%2F%2F%2Fec%3D","line":3133,"updated":"2013-04-03 12:14:06.000000000","message":"Maybe call this key pre_live_migration_result","commit_id":"25870924d62a8517d1413d23defb5cee1d30a2f3"},{"author":{"_account_id":6735,"name":"Bob Ball","email":"bob.ball@citrix.com","username":"bob-ball"},"change_message_id":"8afbf3749b9bfae19c4e614c2baed436818eb921","unresolved":false,"context_lines":[{"line_number":3130,"context_line":"            pre_migration_data \u003d self.compute_rpcapi.pre_live_migration("},{"line_number":3131,"context_line":"                context, instance,"},{"line_number":3132,"context_line":"                block_migration, disk, dest, migrate_data)"},{"line_number":3133,"context_line":"            migrate_data[\u0027pre_migration_data\u0027] \u003d pre_migration_data"},{"line_number":3134,"context_line":""},{"line_number":3135,"context_line":"        except Exception:"},{"line_number":3136,"context_line":"            with excutils.save_and_reraise_exception():"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAOX%2F%2F%2FRA%3D","line":3133,"in_reply_to":"AAAAOX%2F%2F%2Fec%3D","updated":"2013-04-04 09:10:26.000000000","message":"Done","commit_id":"25870924d62a8517d1413d23defb5cee1d30a2f3"}],"nova/tests/virt/xenapi/test_volumeops.py":[{"author":{"_account_id":5044,"name":"Mate Lakat","email":"mlakat@suse.com","username":"mate-lakat"},"change_message_id":"a4049ee7ddf75d8a0b854dc3dde82358e79d7291","unresolved":false,"context_lines":[{"line_number":30,"context_line":"                registered_calls.append(label)"},{"line_number":31,"context_line":"            return side_effect"},{"line_number":32,"context_line":""},{"line_number":33,"context_line":"        ops \u003d volumeops.VolumeOps(\u0027session\u0027)"},{"line_number":34,"context_line":"        self.mox.StubOutWithMock(volumeops.vm_utils, \u0027lookup\u0027)"},{"line_number":35,"context_line":"        self.mox.StubOutWithMock(volumeops.vm_utils, \u0027find_vbd_by_number\u0027)"},{"line_number":36,"context_line":"        self.mox.StubOutWithMock(volumeops.vm_utils, \u0027_is_vm_shutdown\u0027)"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAOX%2F%2F%2Fdg%3D","line":33,"updated":"2013-04-03 12:14:06.000000000","message":"A test to see what happens with instance_name being None would be good.","commit_id":"25870924d62a8517d1413d23defb5cee1d30a2f3"},{"author":{"_account_id":6735,"name":"Bob Ball","email":"bob.ball@citrix.com","username":"bob-ball"},"change_message_id":"8afbf3749b9bfae19c4e614c2baed436818eb921","unresolved":false,"context_lines":[{"line_number":30,"context_line":"                registered_calls.append(label)"},{"line_number":31,"context_line":"            return side_effect"},{"line_number":32,"context_line":""},{"line_number":33,"context_line":"        ops \u003d volumeops.VolumeOps(\u0027session\u0027)"},{"line_number":34,"context_line":"        self.mox.StubOutWithMock(volumeops.vm_utils, \u0027lookup\u0027)"},{"line_number":35,"context_line":"        self.mox.StubOutWithMock(volumeops.vm_utils, \u0027find_vbd_by_number\u0027)"},{"line_number":36,"context_line":"        self.mox.StubOutWithMock(volumeops.vm_utils, \u0027_is_vm_shutdown\u0027)"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAOX%2F%2F%2FK8%3D","line":33,"in_reply_to":"AAAAOX%2F%2F%2Fdg%3D","updated":"2013-04-04 09:10:26.000000000","message":"test_attach_volume only - not test_detach_volume.  Added.","commit_id":"25870924d62a8517d1413d23defb5cee1d30a2f3"}],"nova/virt/xenapi/driver.py":[{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"e6e3681130f57da321989efcc0f653cf65a6787f","unresolved":false,"context_lines":[{"line_number":369,"context_line":"        \"\"\"Attach volume storage to VM instance.\"\"\""},{"line_number":370,"context_line":"        return self._volumeops.attach_volume("},{"line_number":371,"context_line":"                               connection_info,"},{"line_number":372,"context_line":"                               instance and instance[\u0027name\u0027] or None,"},{"line_number":373,"context_line":"                               mountpoint)"},{"line_number":374,"context_line":""},{"line_number":375,"context_line":"    def detach_volume(self, connection_info, instance, mountpoint):"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAOH%2F%2Fx8w%3D","line":372,"updated":"2013-03-27 18:52:34.000000000","message":"This feels bad. But maybe it makes sense.","commit_id":"f8850dfd17902ae994db064bbc2541e48950b876"},{"author":{"_account_id":6735,"name":"Bob Ball","email":"bob.ball@citrix.com","username":"bob-ball"},"change_message_id":"41a590038f200424227f43b61812b482cc06e5f1","unresolved":false,"context_lines":[{"line_number":369,"context_line":"        \"\"\"Attach volume storage to VM instance.\"\"\""},{"line_number":370,"context_line":"        return self._volumeops.attach_volume("},{"line_number":371,"context_line":"                               connection_info,"},{"line_number":372,"context_line":"                               instance and instance[\u0027name\u0027] or None,"},{"line_number":373,"context_line":"                               mountpoint)"},{"line_number":374,"context_line":""},{"line_number":375,"context_line":"    def detach_volume(self, connection_info, instance, mountpoint):"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAOH%2F%2FsjY%3D","line":372,"in_reply_to":"AAAAOH%2F%2FwuY%3D","updated":"2013-04-02 17:10:11.000000000","message":"Done","commit_id":"f8850dfd17902ae994db064bbc2541e48950b876"},{"author":{"_account_id":6735,"name":"Bob Ball","email":"bob.ball@citrix.com","username":"bob-ball"},"change_message_id":"91f3358453f5a7e46d757147b7c8280b0e73fb9e","unresolved":false,"context_lines":[{"line_number":369,"context_line":"        \"\"\"Attach volume storage to VM instance.\"\"\""},{"line_number":370,"context_line":"        return self._volumeops.attach_volume("},{"line_number":371,"context_line":"                               connection_info,"},{"line_number":372,"context_line":"                               instance and instance[\u0027name\u0027] or None,"},{"line_number":373,"context_line":"                               mountpoint)"},{"line_number":374,"context_line":""},{"line_number":375,"context_line":"    def detach_volume(self, connection_info, instance, mountpoint):"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAOH%2F%2FxJk%3D","line":372,"in_reply_to":"AAAAOH%2F%2Fx8w%3D","updated":"2013-03-28 11:09:16.000000000","message":"I agree... I\u0027m happy to look at alternatives.\nI wanted to change it so that attach volume just took the name - I think that it\u0027s wrong that driver.attach_volume simply calls volumeops.attach_volume with but changing one of the arguments.\n\nI guess that instance is the right thing to pass here, rather than instance[\u0027name\u0027] but it should be kept in-sync with detach_volume.  Detach_volume relies on different behaviour at the moment because migrate_disk_and_power_off passes the old name_label rather than the current instance name_label.","commit_id":"f8850dfd17902ae994db064bbc2541e48950b876"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"bcb0e044c15195a9d61078c12ea93327fcef6bee","unresolved":false,"context_lines":[{"line_number":369,"context_line":"        \"\"\"Attach volume storage to VM instance.\"\"\""},{"line_number":370,"context_line":"        return self._volumeops.attach_volume("},{"line_number":371,"context_line":"                               connection_info,"},{"line_number":372,"context_line":"                               instance and instance[\u0027name\u0027] or None,"},{"line_number":373,"context_line":"                               mountpoint)"},{"line_number":374,"context_line":""},{"line_number":375,"context_line":"    def detach_volume(self, connection_info, instance, mountpoint):"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAOH%2F%2FwuY%3D","line":372,"in_reply_to":"AAAAOH%2F%2FxJk%3D","updated":"2013-03-28 16:37:16.000000000","message":"the need to do this, I think, goes away once you move the method below into vmops, which would call _volumeops directly.","commit_id":"f8850dfd17902ae994db064bbc2541e48950b876"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"e6e3681130f57da321989efcc0f653cf65a6787f","unresolved":false,"context_lines":[{"line_number":505,"context_line":"            It must be the result of _get_instance_volume_bdms()"},{"line_number":506,"context_line":"            at compute manager."},{"line_number":507,"context_line":"        \"\"\""},{"line_number":508,"context_line":"        # TODO(JohnGarbutt) look again when boot-from-volume hits trunk"},{"line_number":509,"context_line":""},{"line_number":510,"context_line":"        sr_uuid_map \u003d {}"},{"line_number":511,"context_line":"        for block_device_map in block_device_info[\u0027block_device_mapping\u0027]:"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAOH%2F%2FyAE%3D","line":508,"updated":"2013-03-27 18:52:34.000000000","message":"LOL, you can remove this now... Have you tested this with boot from volume?","commit_id":"f8850dfd17902ae994db064bbc2541e48950b876"},{"author":{"_account_id":6735,"name":"Bob Ball","email":"bob.ball@citrix.com","username":"bob-ball"},"change_message_id":"41a590038f200424227f43b61812b482cc06e5f1","unresolved":false,"context_lines":[{"line_number":505,"context_line":"            It must be the result of _get_instance_volume_bdms()"},{"line_number":506,"context_line":"            at compute manager."},{"line_number":507,"context_line":"        \"\"\""},{"line_number":508,"context_line":"        # TODO(JohnGarbutt) look again when boot-from-volume hits trunk"},{"line_number":509,"context_line":""},{"line_number":510,"context_line":"        sr_uuid_map \u003d {}"},{"line_number":511,"context_line":"        for block_device_map in block_device_info[\u0027block_device_mapping\u0027]:"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAOH%2F%2FsjU%3D","line":508,"in_reply_to":"AAAAOH%2F%2FwuU%3D","updated":"2013-04-02 17:10:11.000000000","message":"BFV doesn\u0027t work yet - there are a couple of unrelated issues (e.g. one of them is in cinder) - quite minor, but rather than remove this TODO we\u0027ll work on the BFV in a seperate commit and remove the TODO then","commit_id":"f8850dfd17902ae994db064bbc2541e48950b876"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"bcb0e044c15195a9d61078c12ea93327fcef6bee","unresolved":false,"context_lines":[{"line_number":505,"context_line":"            It must be the result of _get_instance_volume_bdms()"},{"line_number":506,"context_line":"            at compute manager."},{"line_number":507,"context_line":"        \"\"\""},{"line_number":508,"context_line":"        # TODO(JohnGarbutt) look again when boot-from-volume hits trunk"},{"line_number":509,"context_line":""},{"line_number":510,"context_line":"        sr_uuid_map \u003d {}"},{"line_number":511,"context_line":"        for block_device_map in block_device_info[\u0027block_device_mapping\u0027]:"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAOH%2F%2FwuU%3D","line":508,"in_reply_to":"AAAAOH%2F%2FxJc%3D","updated":"2013-03-28 16:37:16.000000000","message":"ask mate, its in exercise.sh","commit_id":"f8850dfd17902ae994db064bbc2541e48950b876"},{"author":{"_account_id":6735,"name":"Bob Ball","email":"bob.ball@citrix.com","username":"bob-ball"},"change_message_id":"91f3358453f5a7e46d757147b7c8280b0e73fb9e","unresolved":false,"context_lines":[{"line_number":505,"context_line":"            It must be the result of _get_instance_volume_bdms()"},{"line_number":506,"context_line":"            at compute manager."},{"line_number":507,"context_line":"        \"\"\""},{"line_number":508,"context_line":"        # TODO(JohnGarbutt) look again when boot-from-volume hits trunk"},{"line_number":509,"context_line":""},{"line_number":510,"context_line":"        sr_uuid_map \u003d {}"},{"line_number":511,"context_line":"        for block_device_map in block_device_info[\u0027block_device_mapping\u0027]:"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAOH%2F%2FxJc%3D","line":508,"in_reply_to":"AAAAOH%2F%2FyAE%3D","updated":"2013-03-28 11:09:16.000000000","message":"I\u0027d be happy to remove the comment, but we don\u0027t have BFV tests at the moment so unless there is other evidence to confirm that BFV works then I\u0027d be hesitant to remove this as part of this commit","commit_id":"f8850dfd17902ae994db064bbc2541e48950b876"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"e6e3681130f57da321989efcc0f653cf65a6787f","unresolved":false,"context_lines":[{"line_number":509,"context_line":""},{"line_number":510,"context_line":"        sr_uuid_map \u003d {}"},{"line_number":511,"context_line":"        for block_device_map in block_device_info[\u0027block_device_mapping\u0027]:"},{"line_number":512,"context_line":"            sr_uuid, _ \u003d self._volumeops.attach_volume("},{"line_number":513,"context_line":"                block_device_map[\u0027connection_info\u0027],"},{"line_number":514,"context_line":"                None,"},{"line_number":515,"context_line":"                block_device_map[\u0027mount_device\u0027],"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAOH%2F%2FyAA%3D","line":512,"updated":"2013-03-27 18:52:34.000000000","message":"How do we cover if one of these fail? Should we undo the other attaches? Indeed, if we fail later on, should we undo this attach?","commit_id":"f8850dfd17902ae994db064bbc2541e48950b876"},{"author":{"_account_id":6735,"name":"Bob Ball","email":"bob.ball@citrix.com","username":"bob-ball"},"change_message_id":"41a590038f200424227f43b61812b482cc06e5f1","unresolved":false,"context_lines":[{"line_number":509,"context_line":""},{"line_number":510,"context_line":"        sr_uuid_map \u003d {}"},{"line_number":511,"context_line":"        for block_device_map in block_device_info[\u0027block_device_mapping\u0027]:"},{"line_number":512,"context_line":"            sr_uuid, _ \u003d self._volumeops.attach_volume("},{"line_number":513,"context_line":"                block_device_map[\u0027connection_info\u0027],"},{"line_number":514,"context_line":"                None,"},{"line_number":515,"context_line":"                block_device_map[\u0027mount_device\u0027],"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAOH%2F%2Fsi4%3D","line":512,"in_reply_to":"AAAAOH%2F%2FwuM%3D","updated":"2013-04-02 17:10:11.000000000","message":"Added code to clean up in this loop.","commit_id":"f8850dfd17902ae994db064bbc2541e48950b876"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"bcb0e044c15195a9d61078c12ea93327fcef6bee","unresolved":false,"context_lines":[{"line_number":509,"context_line":""},{"line_number":510,"context_line":"        sr_uuid_map \u003d {}"},{"line_number":511,"context_line":"        for block_device_map in block_device_info[\u0027block_device_mapping\u0027]:"},{"line_number":512,"context_line":"            sr_uuid, _ \u003d self._volumeops.attach_volume("},{"line_number":513,"context_line":"                block_device_map[\u0027connection_info\u0027],"},{"line_number":514,"context_line":"                None,"},{"line_number":515,"context_line":"                block_device_map[\u0027mount_device\u0027],"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAOH%2F%2FwuM%3D","line":512,"in_reply_to":"AAAAOH%2F%2FxJY%3D","updated":"2013-03-28 16:37:16.000000000","message":"I couldn\u0027t see that in the code, but I may have missed it.","commit_id":"f8850dfd17902ae994db064bbc2541e48950b876"},{"author":{"_account_id":6735,"name":"Bob Ball","email":"bob.ball@citrix.com","username":"bob-ball"},"change_message_id":"91f3358453f5a7e46d757147b7c8280b0e73fb9e","unresolved":false,"context_lines":[{"line_number":509,"context_line":""},{"line_number":510,"context_line":"        sr_uuid_map \u003d {}"},{"line_number":511,"context_line":"        for block_device_map in block_device_info[\u0027block_device_mapping\u0027]:"},{"line_number":512,"context_line":"            sr_uuid, _ \u003d self._volumeops.attach_volume("},{"line_number":513,"context_line":"                block_device_map[\u0027connection_info\u0027],"},{"line_number":514,"context_line":"                None,"},{"line_number":515,"context_line":"                block_device_map[\u0027mount_device\u0027],"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAOH%2F%2FxJY%3D","line":512,"in_reply_to":"AAAAOH%2F%2FyAA%3D","updated":"2013-03-28 11:09:16.000000000","message":"If we fail later on, these get automatically un-done by the rollback_migration call.\n\nPerhaps we should test for failure on individual block devices and roll back previous ones if a subset fail.","commit_id":"f8850dfd17902ae994db064bbc2541e48950b876"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"e6e3681130f57da321989efcc0f653cf65a6787f","unresolved":false,"context_lines":[{"line_number":518,"context_line":"            sr_ref \u003d self._session.call_xenapi(\u0027SR.get_by_uuid\u0027, sr_uuid)"},{"line_number":519,"context_line":"            sr_uuid_map[sr_uuid] \u003d sr_ref"},{"line_number":520,"context_line":""},{"line_number":521,"context_line":"        return sr_uuid_map"},{"line_number":522,"context_line":""},{"line_number":523,"context_line":"    def post_live_migration_at_destination(self, ctxt, instance_ref,"},{"line_number":524,"context_line":"                                           network_info, block_migration,"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAOH%2F%2Fx88%3D","line":521,"updated":"2013-03-27 18:52:34.000000000","message":"PS, this code has to move into vmops.","commit_id":"f8850dfd17902ae994db064bbc2541e48950b876"},{"author":{"_account_id":6735,"name":"Bob Ball","email":"bob.ball@citrix.com","username":"bob-ball"},"change_message_id":"41a590038f200424227f43b61812b482cc06e5f1","unresolved":false,"context_lines":[{"line_number":518,"context_line":"            sr_ref \u003d self._session.call_xenapi(\u0027SR.get_by_uuid\u0027, sr_uuid)"},{"line_number":519,"context_line":"            sr_uuid_map[sr_uuid] \u003d sr_ref"},{"line_number":520,"context_line":""},{"line_number":521,"context_line":"        return sr_uuid_map"},{"line_number":522,"context_line":""},{"line_number":523,"context_line":"    def post_live_migration_at_destination(self, ctxt, instance_ref,"},{"line_number":524,"context_line":"                                           network_info, block_migration,"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAOH%2F%2FsjA%3D","line":521,"in_reply_to":"AAAAOH%2F%2Fx88%3D","updated":"2013-04-02 17:10:11.000000000","message":"Done","commit_id":"f8850dfd17902ae994db064bbc2541e48950b876"},{"author":{"_account_id":5044,"name":"Mate Lakat","email":"mlakat@suse.com","username":"mate-lakat"},"change_message_id":"a4049ee7ddf75d8a0b854dc3dde82358e79d7291","unresolved":false,"context_lines":[{"line_number":366,"context_line":"        return xs_url.netloc"},{"line_number":367,"context_line":""},{"line_number":368,"context_line":"    def attach_volume(self, connection_info, instance, mountpoint):"},{"line_number":369,"context_line":"        \"\"\"Attach volume storage to VM instance.\"\"\""},{"line_number":370,"context_line":"        return self._volumeops.attach_volume("},{"line_number":371,"context_line":"                               connection_info,"},{"line_number":372,"context_line":"                               instance[\u0027name\u0027],"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAOX%2F%2F%2Fd8%3D","line":369,"updated":"2013-04-03 12:14:06.000000000","message":"This is just formatting, skip this change.","commit_id":"25870924d62a8517d1413d23defb5cee1d30a2f3"},{"author":{"_account_id":6735,"name":"Bob Ball","email":"bob.ball@citrix.com","username":"bob-ball"},"change_message_id":"8afbf3749b9bfae19c4e614c2baed436818eb921","unresolved":false,"context_lines":[{"line_number":366,"context_line":"        return xs_url.netloc"},{"line_number":367,"context_line":""},{"line_number":368,"context_line":"    def attach_volume(self, connection_info, instance, mountpoint):"},{"line_number":369,"context_line":"        \"\"\"Attach volume storage to VM instance.\"\"\""},{"line_number":370,"context_line":"        return self._volumeops.attach_volume("},{"line_number":371,"context_line":"                               connection_info,"},{"line_number":372,"context_line":"                               instance[\u0027name\u0027],"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAOX%2F%2F%2FQ0%3D","line":369,"in_reply_to":"AAAAOX%2F%2F%2Fd8%3D","updated":"2013-04-04 09:10:26.000000000","message":"Done","commit_id":"25870924d62a8517d1413d23defb5cee1d30a2f3"},{"author":{"_account_id":5044,"name":"Mate Lakat","email":"mlakat@suse.com","username":"mate-lakat"},"change_message_id":"a4049ee7ddf75d8a0b854dc3dde82358e79d7291","unresolved":false,"context_lines":[{"line_number":374,"context_line":""},{"line_number":375,"context_line":"    def detach_volume(self, connection_info, instance, mountpoint):"},{"line_number":376,"context_line":"        \"\"\"Detach volume storage from VM instance.\"\"\""},{"line_number":377,"context_line":"        return self._volumeops.detach_volume("},{"line_number":378,"context_line":"                               connection_info,"},{"line_number":379,"context_line":"                               instance[\u0027name\u0027],"},{"line_number":380,"context_line":"                               mountpoint)"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAOX%2F%2F%2Fd4%3D","line":377,"updated":"2013-04-03 12:14:06.000000000","message":"Skip pushing the formatting bit","commit_id":"25870924d62a8517d1413d23defb5cee1d30a2f3"},{"author":{"_account_id":6735,"name":"Bob Ball","email":"bob.ball@citrix.com","username":"bob-ball"},"change_message_id":"8afbf3749b9bfae19c4e614c2baed436818eb921","unresolved":false,"context_lines":[{"line_number":374,"context_line":""},{"line_number":375,"context_line":"    def detach_volume(self, connection_info, instance, mountpoint):"},{"line_number":376,"context_line":"        \"\"\"Detach volume storage from VM instance.\"\"\""},{"line_number":377,"context_line":"        return self._volumeops.detach_volume("},{"line_number":378,"context_line":"                               connection_info,"},{"line_number":379,"context_line":"                               instance[\u0027name\u0027],"},{"line_number":380,"context_line":"                               mountpoint)"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAOX%2F%2F%2FQs%3D","line":377,"in_reply_to":"AAAAOX%2F%2F%2Fd4%3D","updated":"2013-04-04 09:10:26.000000000","message":"Done","commit_id":"25870924d62a8517d1413d23defb5cee1d30a2f3"},{"author":{"_account_id":5044,"name":"Mate Lakat","email":"mlakat@suse.com","username":"mate-lakat"},"change_message_id":"a4049ee7ddf75d8a0b854dc3dde82358e79d7291","unresolved":false,"context_lines":[{"line_number":507,"context_line":"        \"\"\""},{"line_number":508,"context_line":"        # TODO(JohnGarbutt) look again when boot-from-volume hits trunk"},{"line_number":509,"context_line":""},{"line_number":510,"context_line":"        return self._vmops.get_sr_uuid_map(block_device_info)"},{"line_number":511,"context_line":""},{"line_number":512,"context_line":"    def post_live_migration_at_destination(self, ctxt, instance_ref,"},{"line_number":513,"context_line":"                                           network_info, block_migration,"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAOX%2F%2F%2Fdw%3D","line":510,"updated":"2013-04-03 12:14:06.000000000","message":"What do you think about returning a dict instead, like:\n\n    return dict(\n        sr_uuid_map\u003dself._vmops.get_sr_uuid_map(\n            block_device_info))\n\nSo that it is easier to interpret on the other side. Assuming sr_uuid_map has a meaning.","commit_id":"25870924d62a8517d1413d23defb5cee1d30a2f3"},{"author":{"_account_id":6735,"name":"Bob Ball","email":"bob.ball@citrix.com","username":"bob-ball"},"change_message_id":"8afbf3749b9bfae19c4e614c2baed436818eb921","unresolved":false,"context_lines":[{"line_number":507,"context_line":"        \"\"\""},{"line_number":508,"context_line":"        # TODO(JohnGarbutt) look again when boot-from-volume hits trunk"},{"line_number":509,"context_line":""},{"line_number":510,"context_line":"        return self._vmops.get_sr_uuid_map(block_device_info)"},{"line_number":511,"context_line":""},{"line_number":512,"context_line":"    def post_live_migration_at_destination(self, ctxt, instance_ref,"},{"line_number":513,"context_line":"                                           network_info, block_migration,"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAOX%2F%2F%2FRM%3D","line":510,"in_reply_to":"AAAAOX%2F%2F%2Fdw%3D","updated":"2013-04-04 09:10:26.000000000","message":"Done","commit_id":"25870924d62a8517d1413d23defb5cee1d30a2f3"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"68bdbea5a307bf0f3569727f3d6071ad44114626","unresolved":false,"context_lines":[{"line_number":505,"context_line":"        \"\"\""},{"line_number":506,"context_line":"        # TODO(JohnGarbutt) look again when boot-from-volume hits trunk"},{"line_number":507,"context_line":"        pre_live_migration_result \u003d {}"},{"line_number":508,"context_line":"        pre_live_migration_result[\u0027sr_uuid_map\u0027] \u003d \\"},{"line_number":509,"context_line":"                 self._vmops.attach_block_device_volumes(block_device_info)"},{"line_number":510,"context_line":"        return pre_live_migration_result"},{"line_number":511,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAOn%2F%2Fzew%3D","line":508,"updated":"2013-04-22 20:12:26.000000000","message":"looks a bit messy, I would do this call in the dict def, but that a mater of taste thing","commit_id":"95292d0d32fe047e0483b2b3db79452e322addce"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"803a6f87ca90988079594799678f02433755f95a","unresolved":false,"context_lines":[{"line_number":505,"context_line":"        \"\"\""},{"line_number":506,"context_line":"        # TODO(JohnGarbutt) look again when boot-from-volume hits trunk"},{"line_number":507,"context_line":"        pre_live_migration_result \u003d {}"},{"line_number":508,"context_line":"        pre_live_migration_result[\u0027sr_uuid_map\u0027] \u003d \\"},{"line_number":509,"context_line":"                 self._vmops.attach_block_device_volumes(block_device_info)"},{"line_number":510,"context_line":"        return pre_live_migration_result"},{"line_number":511,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAOn%2F%2FyTo%3D","line":508,"in_reply_to":"AAAAOn%2F%2FypU%3D","updated":"2013-04-23 14:26:28.000000000","message":"Sure","commit_id":"95292d0d32fe047e0483b2b3db79452e322addce"},{"author":{"_account_id":6735,"name":"Bob Ball","email":"bob.ball@citrix.com","username":"bob-ball"},"change_message_id":"a59322f733e637d18dce4a0d8c35c94684e0880d","unresolved":false,"context_lines":[{"line_number":505,"context_line":"        \"\"\""},{"line_number":506,"context_line":"        # TODO(JohnGarbutt) look again when boot-from-volume hits trunk"},{"line_number":507,"context_line":"        pre_live_migration_result \u003d {}"},{"line_number":508,"context_line":"        pre_live_migration_result[\u0027sr_uuid_map\u0027] \u003d \\"},{"line_number":509,"context_line":"                 self._vmops.attach_block_device_volumes(block_device_info)"},{"line_number":510,"context_line":"        return pre_live_migration_result"},{"line_number":511,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAOn%2F%2FypU%3D","line":508,"in_reply_to":"AAAAOn%2F%2Fzew%3D","updated":"2013-04-23 09:32:17.000000000","message":"Because it\u0027s such a long function name it doesn\u0027t make much difference - I\u0027d rather not make another change for change\u0027s sake.","commit_id":"95292d0d32fe047e0483b2b3db79452e322addce"}],"nova/virt/xenapi/vm_utils.py":[{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"e6e3681130f57da321989efcc0f653cf65a6787f","unresolved":false,"context_lines":[{"line_number":1377,"context_line":""},{"line_number":1378,"context_line":"def lookup(session, name_label):"},{"line_number":1379,"context_line":"    \"\"\"Look the instance up and return it if available.\"\"\""},{"line_number":1380,"context_line":"    if name_label is None:"},{"line_number":1381,"context_line":"        return None"},{"line_number":1382,"context_line":""},{"line_number":1383,"context_line":"    vm_refs \u003d session.call_xenapi(\"VM.get_by_name_label\", name_label)"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAOH%2F%2Fx%2Bw%3D","line":1380,"updated":"2013-03-27 18:52:34.000000000","message":"This seems a bit mad, it would be better without this.","commit_id":"f8850dfd17902ae994db064bbc2541e48950b876"},{"author":{"_account_id":6735,"name":"Bob Ball","email":"bob.ball@citrix.com","username":"bob-ball"},"change_message_id":"41a590038f200424227f43b61812b482cc06e5f1","unresolved":false,"context_lines":[{"line_number":1377,"context_line":""},{"line_number":1378,"context_line":"def lookup(session, name_label):"},{"line_number":1379,"context_line":"    \"\"\"Look the instance up and return it if available.\"\"\""},{"line_number":1380,"context_line":"    if name_label is None:"},{"line_number":1381,"context_line":"        return None"},{"line_number":1382,"context_line":""},{"line_number":1383,"context_line":"    vm_refs \u003d session.call_xenapi(\"VM.get_by_name_label\", name_label)"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAOH%2F%2Fsi0%3D","line":1380,"in_reply_to":"AAAAOH%2F%2FwuA%3D","updated":"2013-04-02 17:10:11.000000000","message":"Clarified on IRC that this change is doing the right thing - line 1386 returns None if the name label can\u0027t be found, so returning None if the label is None is the right return value","commit_id":"f8850dfd17902ae994db064bbc2541e48950b876"},{"author":{"_account_id":6735,"name":"Bob Ball","email":"bob.ball@citrix.com","username":"bob-ball"},"change_message_id":"91f3358453f5a7e46d757147b7c8280b0e73fb9e","unresolved":false,"context_lines":[{"line_number":1377,"context_line":""},{"line_number":1378,"context_line":"def lookup(session, name_label):"},{"line_number":1379,"context_line":"    \"\"\"Look the instance up and return it if available.\"\"\""},{"line_number":1380,"context_line":"    if name_label is None:"},{"line_number":1381,"context_line":"        return None"},{"line_number":1382,"context_line":""},{"line_number":1383,"context_line":"    vm_refs \u003d session.call_xenapi(\"VM.get_by_name_label\", name_label)"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAOH%2F%2FxIg%3D","line":1380,"in_reply_to":"AAAAOH%2F%2Fx%2Bw%3D","updated":"2013-03-28 11:09:16.000000000","message":"Why is this mad?  We needed some way to detach a disk from a host when we have no instance.  I started checking name_label against null before doing any work, but it seemed to make more sense simply to have a way of getting None back from lookup as if it looked up a VM with a name that it didn\u0027t have (i.e. the same behaviour as line 1386).\nThe xapi call fails if name_label is none, hence the need to check before calling XAPI in this function.","commit_id":"f8850dfd17902ae994db064bbc2541e48950b876"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"bcb0e044c15195a9d61078c12ea93327fcef6bee","unresolved":false,"context_lines":[{"line_number":1377,"context_line":""},{"line_number":1378,"context_line":"def lookup(session, name_label):"},{"line_number":1379,"context_line":"    \"\"\"Look the instance up and return it if available.\"\"\""},{"line_number":1380,"context_line":"    if name_label is None:"},{"line_number":1381,"context_line":"        return None"},{"line_number":1382,"context_line":""},{"line_number":1383,"context_line":"    vm_refs \u003d session.call_xenapi(\"VM.get_by_name_label\", name_label)"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAOH%2F%2FwuA%3D","line":1380,"in_reply_to":"AAAAOH%2F%2FxIg%3D","updated":"2013-03-28 16:37:16.000000000","message":"This usually throws an exception if it can\u0027t find things, now it silently returns if you pass in None. Just doesn\u0027t feel like this is what this method should be doing.","commit_id":"f8850dfd17902ae994db064bbc2541e48950b876"},{"author":{"_account_id":5044,"name":"Mate Lakat","email":"mlakat@suse.com","username":"mate-lakat"},"change_message_id":"a4049ee7ddf75d8a0b854dc3dde82358e79d7291","unresolved":false,"context_lines":[{"line_number":1395,"context_line":""},{"line_number":1396,"context_line":""},{"line_number":1397,"context_line":"def lookup(session, name_label):"},{"line_number":1398,"context_line":"    \"\"\"Look the instance up and return it if available.\"\"\""},{"line_number":1399,"context_line":"    if name_label is None:"},{"line_number":1400,"context_line":"        return None"},{"line_number":1401,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAOX%2F%2F%2Fds%3D","line":1398,"updated":"2013-04-03 12:14:06.000000000","message":"I think, you don\u0027t need this change. lookup is called by vm_ref_or_raise, but vm_ref_or_raise is only called if instance_name is not None.","commit_id":"25870924d62a8517d1413d23defb5cee1d30a2f3"},{"author":{"_account_id":6735,"name":"Bob Ball","email":"bob.ball@citrix.com","username":"bob-ball"},"change_message_id":"8afbf3749b9bfae19c4e614c2baed436818eb921","unresolved":false,"context_lines":[{"line_number":1395,"context_line":""},{"line_number":1396,"context_line":""},{"line_number":1397,"context_line":"def lookup(session, name_label):"},{"line_number":1398,"context_line":"    \"\"\"Look the instance up and return it if available.\"\"\""},{"line_number":1399,"context_line":"    if name_label is None:"},{"line_number":1400,"context_line":"        return None"},{"line_number":1401,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAOX%2F%2F%2FNM%3D","line":1398,"in_reply_to":"AAAAOX%2F%2F%2Fds%3D","updated":"2013-04-04 09:10:26.000000000","message":"Agreed - was needed in previous version, but not now.","commit_id":"25870924d62a8517d1413d23defb5cee1d30a2f3"}],"nova/virt/xenapi/vmops.py":[{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"e6e3681130f57da321989efcc0f653cf65a6787f","unresolved":false,"context_lines":[{"line_number":1716,"context_line":"        if \u0027pre_migration_data\u0027 in migrate_data:"},{"line_number":1717,"context_line":"            pre_migrate_data \u003d migrate_data[\u0027pre_migration_data\u0027]"},{"line_number":1718,"context_line":"            for sr_uuid in pre_migrate_data:"},{"line_number":1719,"context_line":"                sr_ref \u003d self._session.call_xenapi(\"SR.get_by_uuid\", sr_uuid)"},{"line_number":1720,"context_line":"                vdi_map.update("},{"line_number":1721,"context_line":"                    self._generate_vdi_map("},{"line_number":1722,"context_line":"                        pre_migrate_data[sr_uuid], vm_ref, sr_ref))"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAOH%2F%2Fx%2FI%3D","line":1719,"updated":"2013-03-27 18:52:34.000000000","message":"its worth adding a note to say the source and destination SRs have the same UUID for all remote SRs.","commit_id":"f8850dfd17902ae994db064bbc2541e48950b876"},{"author":{"_account_id":6735,"name":"Bob Ball","email":"bob.ball@citrix.com","username":"bob-ball"},"change_message_id":"91f3358453f5a7e46d757147b7c8280b0e73fb9e","unresolved":false,"context_lines":[{"line_number":1716,"context_line":"        if \u0027pre_migration_data\u0027 in migrate_data:"},{"line_number":1717,"context_line":"            pre_migrate_data \u003d migrate_data[\u0027pre_migration_data\u0027]"},{"line_number":1718,"context_line":"            for sr_uuid in pre_migrate_data:"},{"line_number":1719,"context_line":"                sr_ref \u003d self._session.call_xenapi(\"SR.get_by_uuid\", sr_uuid)"},{"line_number":1720,"context_line":"                vdi_map.update("},{"line_number":1721,"context_line":"                    self._generate_vdi_map("},{"line_number":1722,"context_line":"                        pre_migrate_data[sr_uuid], vm_ref, sr_ref))"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAOH%2F%2FxIc%3D","line":1719,"in_reply_to":"AAAAOH%2F%2Fx%2FI%3D","updated":"2013-03-28 11:09:16.000000000","message":"Done","commit_id":"f8850dfd17902ae994db064bbc2541e48950b876"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"f3bdf2d10d8fb5e953b4695902129ca3ac34df77","unresolved":false,"context_lines":[{"line_number":1707,"context_line":"                                destination, includes block_migration flag"},{"line_number":1708,"context_line":""},{"line_number":1709,"context_line":"        \"\"\""},{"line_number":1710,"context_line":"        if len(self._get_iscsi_srs(ctxt, instance_ref)) \u003e 0:"},{"line_number":1711,"context_line":"            # XAPI must support the relaxed SR check for live migrating with"},{"line_number":1712,"context_line":"            # iSCSI VBDs"},{"line_number":1713,"context_line":"            config_value \u003d None"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAOX%2F%2F9qw%3D","line":1710,"updated":"2013-04-04 11:21:04.000000000","message":"I think we need to check for non-iscsi volumes and throw a sensible error here. Its going to be a pain to debug otherwise.","commit_id":"25870924d62a8517d1413d23defb5cee1d30a2f3"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"21ce36f42af612baaac8f4b5e648d6ffc5c223e0","unresolved":false,"context_lines":[{"line_number":1707,"context_line":"                                destination, includes block_migration flag"},{"line_number":1708,"context_line":""},{"line_number":1709,"context_line":"        \"\"\""},{"line_number":1710,"context_line":"        if len(self._get_iscsi_srs(ctxt, instance_ref)) \u003e 0:"},{"line_number":1711,"context_line":"            # XAPI must support the relaxed SR check for live migrating with"},{"line_number":1712,"context_line":"            # iSCSI VBDs"},{"line_number":1713,"context_line":"            config_value \u003d None"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAOX%2F%2F9fg%3D","line":1710,"in_reply_to":"AAAAOX%2F%2F9pw%3D","updated":"2013-04-04 15:27:12.000000000","message":"But the \"right thing\" is unlikely to work because we don\u0027t clean up any other types of SR.\n\nAnyway, its not a blocker. Just not very defensive.","commit_id":"25870924d62a8517d1413d23defb5cee1d30a2f3"},{"author":{"_account_id":6735,"name":"Bob Ball","email":"bob.ball@citrix.com","username":"bob-ball"},"change_message_id":"28216fa2e524759e8e4b0224c7cb7f00155c894e","unresolved":false,"context_lines":[{"line_number":1707,"context_line":"                                destination, includes block_migration flag"},{"line_number":1708,"context_line":""},{"line_number":1709,"context_line":"        \"\"\""},{"line_number":1710,"context_line":"        if len(self._get_iscsi_srs(ctxt, instance_ref)) \u003e 0:"},{"line_number":1711,"context_line":"            # XAPI must support the relaxed SR check for live migrating with"},{"line_number":1712,"context_line":"            # iSCSI VBDs"},{"line_number":1713,"context_line":"            config_value \u003d None"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAOX%2F%2F9pw%3D","line":1710,"in_reply_to":"AAAAOX%2F%2F9qw%3D","updated":"2013-04-04 13:53:03.000000000","message":"I strongly disagree - there may be fixes in XAPI in the future which would further relax the restrictions currently imposed - any such checks here would mean OpenStack couldn\u0027t just \"do the right thing\".  The only reason we are checking for iSCSI volumes is because we know that \"the right thing\" doesn\u0027t work by default as we must make OS doubly-connect to an SR which is something that XAPI can\u0027t assume is safe - and therefore won\u0027t work even with future XAPI changes.\n\nI know that debugging a failed live migrate is not easy in any case, but this change does not make it any harder.","commit_id":"25870924d62a8517d1413d23defb5cee1d30a2f3"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"f3bdf2d10d8fb5e953b4695902129ca3ac34df77","unresolved":false,"context_lines":[{"line_number":1712,"context_line":"            # iSCSI VBDs"},{"line_number":1713,"context_line":"            config_value \u003d None"},{"line_number":1714,"context_line":"            try:"},{"line_number":1715,"context_line":"                config_value \u003d self._session._make_plugin_call(\u0027config_file\u0027,"},{"line_number":1716,"context_line":"                                             \u0027get_val\u0027,"},{"line_number":1717,"context_line":"                                             key\u003d\u0027relax-xsm-sr-check\u0027)"},{"line_number":1718,"context_line":"            except Exception:"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAOX%2F%2F9sA%3D","line":1715,"updated":"2013-04-04 11:21:04.000000000","message":"Seems quite heavy weight to check this everytime. maybe worth caching this.","commit_id":"25870924d62a8517d1413d23defb5cee1d30a2f3"},{"author":{"_account_id":6735,"name":"Bob Ball","email":"bob.ball@citrix.com","username":"bob-ball"},"change_message_id":"28216fa2e524759e8e4b0224c7cb7f00155c894e","unresolved":false,"context_lines":[{"line_number":1712,"context_line":"            # iSCSI VBDs"},{"line_number":1713,"context_line":"            config_value \u003d None"},{"line_number":1714,"context_line":"            try:"},{"line_number":1715,"context_line":"                config_value \u003d self._session._make_plugin_call(\u0027config_file\u0027,"},{"line_number":1716,"context_line":"                                             \u0027get_val\u0027,"},{"line_number":1717,"context_line":"                                             key\u003d\u0027relax-xsm-sr-check\u0027)"},{"line_number":1718,"context_line":"            except Exception:"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAOX%2F%2F9po%3D","line":1715,"in_reply_to":"AAAAOX%2F%2F9sA%3D","updated":"2013-04-04 13:53:03.000000000","message":"Done","commit_id":"25870924d62a8517d1413d23defb5cee1d30a2f3"},{"author":{"_account_id":5044,"name":"Mate Lakat","email":"mlakat@suse.com","username":"mate-lakat"},"change_message_id":"a4049ee7ddf75d8a0b854dc3dde82358e79d7291","unresolved":false,"context_lines":[{"line_number":1715,"context_line":"                config_value \u003d self._session._make_plugin_call(\u0027config_file\u0027,"},{"line_number":1716,"context_line":"                                             \u0027get_val\u0027,"},{"line_number":1717,"context_line":"                                             key\u003d\u0027relax-xsm-sr-check\u0027)"},{"line_number":1718,"context_line":"            except Exception:"},{"line_number":1719,"context_line":"                pass"},{"line_number":1720,"context_line":"            if config_value !\u003d \u0027true\u0027:"},{"line_number":1721,"context_line":"                raise exception.MigrationError(_(\u0027XAPI supporting \u0027"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAOX%2F%2F%2FdM%3D","line":1718,"updated":"2013-04-03 12:14:06.000000000","message":"I would only except some sort of nosuchpluginexception here, all the others should not be expected. This construct looks really dangerous.","commit_id":"25870924d62a8517d1413d23defb5cee1d30a2f3"},{"author":{"_account_id":6735,"name":"Bob Ball","email":"bob.ball@citrix.com","username":"bob-ball"},"change_message_id":"8afbf3749b9bfae19c4e614c2baed436818eb921","unresolved":false,"context_lines":[{"line_number":1715,"context_line":"                config_value \u003d self._session._make_plugin_call(\u0027config_file\u0027,"},{"line_number":1716,"context_line":"                                             \u0027get_val\u0027,"},{"line_number":1717,"context_line":"                                             key\u003d\u0027relax-xsm-sr-check\u0027)"},{"line_number":1718,"context_line":"            except Exception:"},{"line_number":1719,"context_line":"                pass"},{"line_number":1720,"context_line":"            if config_value !\u003d \u0027true\u0027:"},{"line_number":1721,"context_line":"                raise exception.MigrationError(_(\u0027XAPI supporting \u0027"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAOX%2F%2F%2FP4%3D","line":1718,"in_reply_to":"AAAAOX%2F%2F%2FdM%3D","updated":"2013-04-04 09:10:26.000000000","message":"Done","commit_id":"25870924d62a8517d1413d23defb5cee1d30a2f3"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"1c811d1c79601ea355ff5cb52bd11926d3a0298c","unresolved":false,"context_lines":[{"line_number":1758,"context_line":"                sr_ref \u003d self._session.call_xenapi(\"SR.get_by_uuid\", sr_uuid)"},{"line_number":1759,"context_line":"                vdi_map.update("},{"line_number":1760,"context_line":"                    self._generate_vdi_map("},{"line_number":1761,"context_line":"                        pre_migrate_data[sr_uuid], vm_ref, sr_ref))"},{"line_number":1762,"context_line":"        vif_map \u003d {}"},{"line_number":1763,"context_line":"        options \u003d {}"},{"line_number":1764,"context_line":"        self._session.call_xenapi(command_name, vm_ref,"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAOX%2F%2F%2B5w%3D","line":1761,"updated":"2013-04-03 16:43:58.000000000","message":"I don\u0027t get this:\npre_migrate_data[sr_uuid]","commit_id":"25870924d62a8517d1413d23defb5cee1d30a2f3"},{"author":{"_account_id":6735,"name":"Bob Ball","email":"bob.ball@citrix.com","username":"bob-ball"},"change_message_id":"8afbf3749b9bfae19c4e614c2baed436818eb921","unresolved":false,"context_lines":[{"line_number":1758,"context_line":"                sr_ref \u003d self._session.call_xenapi(\"SR.get_by_uuid\", sr_uuid)"},{"line_number":1759,"context_line":"                vdi_map.update("},{"line_number":1760,"context_line":"                    self._generate_vdi_map("},{"line_number":1761,"context_line":"                        pre_migrate_data[sr_uuid], vm_ref, sr_ref))"},{"line_number":1762,"context_line":"        vif_map \u003d {}"},{"line_number":1763,"context_line":"        options \u003d {}"},{"line_number":1764,"context_line":"        self._session.call_xenapi(command_name, vm_ref,"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAOX%2F%2F9xs%3D","line":1761,"in_reply_to":"AAAAOX%2F%2F%2B5w%3D","updated":"2013-04-04 09:10:26.000000000","message":"It\u0027s getting the remote ref for the SR which is unfortunately what XAPI needs.","commit_id":"25870924d62a8517d1413d23defb5cee1d30a2f3"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"21ce36f42af612baaac8f4b5e648d6ffc5c223e0","unresolved":false,"context_lines":[{"line_number":1758,"context_line":"                sr_ref \u003d self._session.call_xenapi(\"SR.get_by_uuid\", sr_uuid)"},{"line_number":1759,"context_line":"                vdi_map.update("},{"line_number":1760,"context_line":"                    self._generate_vdi_map("},{"line_number":1761,"context_line":"                        pre_migrate_data[sr_uuid], vm_ref, sr_ref))"},{"line_number":1762,"context_line":"        vif_map \u003d {}"},{"line_number":1763,"context_line":"        options \u003d {}"},{"line_number":1764,"context_line":"        self._session.call_xenapi(command_name, vm_ref,"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAOX%2F%2F9fc%3D","line":1761,"in_reply_to":"AAAAOX%2F%2F9pc%3D","updated":"2013-04-04 15:27:12.000000000","message":"cool","commit_id":"25870924d62a8517d1413d23defb5cee1d30a2f3"},{"author":{"_account_id":6735,"name":"Bob Ball","email":"bob.ball@citrix.com","username":"bob-ball"},"change_message_id":"28216fa2e524759e8e4b0224c7cb7f00155c894e","unresolved":false,"context_lines":[{"line_number":1758,"context_line":"                sr_ref \u003d self._session.call_xenapi(\"SR.get_by_uuid\", sr_uuid)"},{"line_number":1759,"context_line":"                vdi_map.update("},{"line_number":1760,"context_line":"                    self._generate_vdi_map("},{"line_number":1761,"context_line":"                        pre_migrate_data[sr_uuid], vm_ref, sr_ref))"},{"line_number":1762,"context_line":"        vif_map \u003d {}"},{"line_number":1763,"context_line":"        options \u003d {}"},{"line_number":1764,"context_line":"        self._session.call_xenapi(command_name, vm_ref,"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAOX%2F%2F9pc%3D","line":1761,"in_reply_to":"AAAAOX%2F%2F9sY%3D","updated":"2013-04-04 13:53:03.000000000","message":"Already fixed as part of Mate\u0027s comments.","commit_id":"25870924d62a8517d1413d23defb5cee1d30a2f3"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"f3bdf2d10d8fb5e953b4695902129ca3ac34df77","unresolved":false,"context_lines":[{"line_number":1758,"context_line":"                sr_ref \u003d self._session.call_xenapi(\"SR.get_by_uuid\", sr_uuid)"},{"line_number":1759,"context_line":"                vdi_map.update("},{"line_number":1760,"context_line":"                    self._generate_vdi_map("},{"line_number":1761,"context_line":"                        pre_migrate_data[sr_uuid], vm_ref, sr_ref))"},{"line_number":1762,"context_line":"        vif_map \u003d {}"},{"line_number":1763,"context_line":"        options \u003d {}"},{"line_number":1764,"context_line":"        self._session.call_xenapi(command_name, vm_ref,"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAOX%2F%2F9sY%3D","line":1761,"in_reply_to":"AAAAOX%2F%2F9xs%3D","updated":"2013-04-04 11:21:04.000000000","message":"Ah, OK. I thought pre_migrate_data was a list given the iterator. Maybe some add a remote_sr_ref variable to make this easier to read, or add _dict to pre_migrate_data?","commit_id":"25870924d62a8517d1413d23defb5cee1d30a2f3"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"1c811d1c79601ea355ff5cb52bd11926d3a0298c","unresolved":false,"context_lines":[{"line_number":1775,"context_line":"                    raise exception.InvalidParameterValue(\u0027Block Migration \u0027"},{"line_number":1776,"context_line":"                                    \u0027requires migrate data from destination\u0027)"},{"line_number":1777,"context_line":""},{"line_number":1778,"context_line":"                iscsi_srs \u003d self._get_iscsi_srs(context, instance)"},{"line_number":1779,"context_line":"                try:"},{"line_number":1780,"context_line":"                    self._call_live_migrate_command("},{"line_number":1781,"context_line":"                        \"VM.migrate_send\", vm_ref, migrate_data)"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAOX%2F%2F%2B5s%3D","line":1778,"updated":"2013-04-03 16:43:58.000000000","message":"What about other SRs? Does this mean we should throw a migration error?","commit_id":"25870924d62a8517d1413d23defb5cee1d30a2f3"},{"author":{"_account_id":6735,"name":"Bob Ball","email":"bob.ball@citrix.com","username":"bob-ball"},"change_message_id":"8afbf3749b9bfae19c4e614c2baed436818eb921","unresolved":false,"context_lines":[{"line_number":1775,"context_line":"                    raise exception.InvalidParameterValue(\u0027Block Migration \u0027"},{"line_number":1776,"context_line":"                                    \u0027requires migrate data from destination\u0027)"},{"line_number":1777,"context_line":""},{"line_number":1778,"context_line":"                iscsi_srs \u003d self._get_iscsi_srs(context, instance)"},{"line_number":1779,"context_line":"                try:"},{"line_number":1780,"context_line":"                    self._call_live_migrate_command("},{"line_number":1781,"context_line":"                        \"VM.migrate_send\", vm_ref, migrate_data)"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAOX%2F%2F9yE%3D","line":1778,"in_reply_to":"AAAAOX%2F%2F%2B5s%3D","updated":"2013-04-04 09:10:26.000000000","message":"If there are other SR types that aren\u0027t caught here then we will throw an error because migrate_send will fail since SRs can\u0027t be found.  In fact, this part of the code is only getting a list of them on the source so the SRs can be removed later.","commit_id":"25870924d62a8517d1413d23defb5cee1d30a2f3"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"21ce36f42af612baaac8f4b5e648d6ffc5c223e0","unresolved":false,"context_lines":[{"line_number":1775,"context_line":"                    raise exception.InvalidParameterValue(\u0027Block Migration \u0027"},{"line_number":1776,"context_line":"                                    \u0027requires migrate data from destination\u0027)"},{"line_number":1777,"context_line":""},{"line_number":1778,"context_line":"                iscsi_srs \u003d self._get_iscsi_srs(context, instance)"},{"line_number":1779,"context_line":"                try:"},{"line_number":1780,"context_line":"                    self._call_live_migrate_command("},{"line_number":1781,"context_line":"                        \"VM.migrate_send\", vm_ref, migrate_data)"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAOX%2F%2F9fM%3D","line":1778,"in_reply_to":"AAAAOX%2F%2F9jM%3D","updated":"2013-04-04 15:27:12.000000000","message":"OK, good point. Maybe we should mark those SRs with something too, but thats a different change.\n\nMaybe worth a little note like \"only iSCSI SRs will be left behind after live_migrate\"? Not sure though.","commit_id":"25870924d62a8517d1413d23defb5cee1d30a2f3"},{"author":{"_account_id":6735,"name":"Bob Ball","email":"bob.ball@citrix.com","username":"bob-ball"},"change_message_id":"28216fa2e524759e8e4b0224c7cb7f00155c894e","unresolved":false,"context_lines":[{"line_number":1775,"context_line":"                    raise exception.InvalidParameterValue(\u0027Block Migration \u0027"},{"line_number":1776,"context_line":"                                    \u0027requires migrate data from destination\u0027)"},{"line_number":1777,"context_line":""},{"line_number":1778,"context_line":"                iscsi_srs \u003d self._get_iscsi_srs(context, instance)"},{"line_number":1779,"context_line":"                try:"},{"line_number":1780,"context_line":"                    self._call_live_migrate_command("},{"line_number":1781,"context_line":"                        \"VM.migrate_send\", vm_ref, migrate_data)"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAOX%2F%2F9jM%3D","line":1778,"in_reply_to":"AAAAOX%2F%2F9sQ%3D","updated":"2013-04-04 13:53:03.000000000","message":"The volumes are already tidied up - migrate_send will have removed all of the VBDs (which have the os-vol other-config) and all of the non-iSCSI VDIs (which have been moved).  The only reason the iSCSI VDIs are left is because we tell XAPI they are already mirrored, so XAPI doesn\u0027t remove them post-migrate.\n\nWe have to forget_sr rather than purge because the VDI still exists but we know in this specific case that it cannot be in use.  In other words, if we made it more \"generic\" we would still have to special-case the iSCSI SRs to forget and leave the generic case to purge.\n\nI don\u0027t think we know enough about how things will be presented in future to try and make a generic implementation here.","commit_id":"25870924d62a8517d1413d23defb5cee1d30a2f3"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"f3bdf2d10d8fb5e953b4695902129ca3ac34df77","unresolved":false,"context_lines":[{"line_number":1775,"context_line":"                    raise exception.InvalidParameterValue(\u0027Block Migration \u0027"},{"line_number":1776,"context_line":"                                    \u0027requires migrate data from destination\u0027)"},{"line_number":1777,"context_line":""},{"line_number":1778,"context_line":"                iscsi_srs \u003d self._get_iscsi_srs(context, instance)"},{"line_number":1779,"context_line":"                try:"},{"line_number":1780,"context_line":"                    self._call_live_migrate_command("},{"line_number":1781,"context_line":"                        \"VM.migrate_send\", vm_ref, migrate_data)"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAOX%2F%2F9sQ%3D","line":1778,"in_reply_to":"AAAAOX%2F%2F9yE%3D","updated":"2013-04-04 11:21:04.000000000","message":"Ah, yes. Seems like the code doesn\u0027t express the intent very well here, and might be a bit short term. Don\u0027t you really want to tidy up all volumes for the given instance? I think there is code for that elsewhere that uses the os-vol other-config.","commit_id":"25870924d62a8517d1413d23defb5cee1d30a2f3"},{"author":{"_account_id":5044,"name":"Mate Lakat","email":"mlakat@suse.com","username":"mate-lakat"},"change_message_id":"a4049ee7ddf75d8a0b854dc3dde82358e79d7291","unresolved":false,"context_lines":[{"line_number":1819,"context_line":""},{"line_number":1820,"context_line":"        return usage"},{"line_number":1821,"context_line":""},{"line_number":1822,"context_line":"    def get_sr_uuid_map(self, block_device_info):"},{"line_number":1823,"context_line":"        sr_uuid_map \u003d {}"},{"line_number":1824,"context_line":"        try:"},{"line_number":1825,"context_line":"            if block_device_info is not None:"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAOX%2F%2F%2Fc0%3D","line":1822,"updated":"2013-04-03 12:14:06.000000000","message":"I would call this:\n\n    attach_volumes_to_hypervisor\n\nOr something like that. get_sr_uuid_map suggest a query - at least for me.","commit_id":"25870924d62a8517d1413d23defb5cee1d30a2f3"},{"author":{"_account_id":6735,"name":"Bob Ball","email":"bob.ball@citrix.com","username":"bob-ball"},"change_message_id":"8afbf3749b9bfae19c4e614c2baed436818eb921","unresolved":false,"context_lines":[{"line_number":1819,"context_line":""},{"line_number":1820,"context_line":"        return usage"},{"line_number":1821,"context_line":""},{"line_number":1822,"context_line":"    def get_sr_uuid_map(self, block_device_info):"},{"line_number":1823,"context_line":"        sr_uuid_map \u003d {}"},{"line_number":1824,"context_line":"        try:"},{"line_number":1825,"context_line":"            if block_device_info is not None:"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAOX%2F%2F%2FQQ%3D","line":1822,"in_reply_to":"AAAAOX%2F%2F%2Fc0%3D","updated":"2013-04-04 09:10:26.000000000","message":"Done","commit_id":"25870924d62a8517d1413d23defb5cee1d30a2f3"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"f3bdf2d10d8fb5e953b4695902129ca3ac34df77","unresolved":false,"context_lines":[{"line_number":1825,"context_line":"            if block_device_info is not None:"},{"line_number":1826,"context_line":"                for block_device_map in block_device_info["},{"line_number":1827,"context_line":"                                                \u0027block_device_mapping\u0027]:"},{"line_number":1828,"context_line":"                    sr_uuid, _ \u003d self._volumeops.attach_volume("},{"line_number":1829,"context_line":"                        block_device_map[\u0027connection_info\u0027],"},{"line_number":1830,"context_line":"                        None,"},{"line_number":1831,"context_line":"                        block_device_map[\u0027mount_device\u0027],"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAOX%2F%2F9rc%3D","line":1828,"updated":"2013-04-04 11:21:04.000000000","message":"I don\u0027t really like this, maybe we should have a connect_volume call that doesn\u0027t take a VM?","commit_id":"25870924d62a8517d1413d23defb5cee1d30a2f3"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"21ce36f42af612baaac8f4b5e648d6ffc5c223e0","unresolved":false,"context_lines":[{"line_number":1825,"context_line":"            if block_device_info is not None:"},{"line_number":1826,"context_line":"                for block_device_map in block_device_info["},{"line_number":1827,"context_line":"                                                \u0027block_device_mapping\u0027]:"},{"line_number":1828,"context_line":"                    sr_uuid, _ \u003d self._volumeops.attach_volume("},{"line_number":1829,"context_line":"                        block_device_map[\u0027connection_info\u0027],"},{"line_number":1830,"context_line":"                        None,"},{"line_number":1831,"context_line":"                        block_device_map[\u0027mount_device\u0027],"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAOX%2F%2F9e0%3D","line":1828,"in_reply_to":"AAAAOX%2F%2F9iU%3D","updated":"2013-04-04 15:27:12.000000000","message":"Currently it just seems clumsy in terms of expressing intent, not a blocker.\n\nI was thinking attach_volume(_to_server) would call connect_volume inside it, and connect_volume(_to_host) would not take the VM and mount_device, and here you just call connect_volume.\n\nProbably this is covered by Mate\u0027s comment in volumeops.","commit_id":"25870924d62a8517d1413d23defb5cee1d30a2f3"},{"author":{"_account_id":6735,"name":"Bob Ball","email":"bob.ball@citrix.com","username":"bob-ball"},"change_message_id":"28216fa2e524759e8e4b0224c7cb7f00155c894e","unresolved":false,"context_lines":[{"line_number":1825,"context_line":"            if block_device_info is not None:"},{"line_number":1826,"context_line":"                for block_device_map in block_device_info["},{"line_number":1827,"context_line":"                                                \u0027block_device_mapping\u0027]:"},{"line_number":1828,"context_line":"                    sr_uuid, _ \u003d self._volumeops.attach_volume("},{"line_number":1829,"context_line":"                        block_device_map[\u0027connection_info\u0027],"},{"line_number":1830,"context_line":"                        None,"},{"line_number":1831,"context_line":"                        block_device_map[\u0027mount_device\u0027],"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAOX%2F%2F9iU%3D","line":1828,"in_reply_to":"AAAAOX%2F%2F9rc%3D","updated":"2013-04-04 13:53:03.000000000","message":"I think it\u0027s fine because \"attach_volume\" is still attaching to the hypervisor and None VM - so it is logical as was.  I am concerned about API bloat but I\u0027ve added it in this case.\n\nIn general we\u0027ve got too many \"similar but different\" methods in the driver...","commit_id":"25870924d62a8517d1413d23defb5cee1d30a2f3"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"f3bdf2d10d8fb5e953b4695902129ca3ac34df77","unresolved":false,"context_lines":[{"line_number":1837,"context_line":"        except Exception:"},{"line_number":1838,"context_line":"            # Disconnect the volumes we just connected"},{"line_number":1839,"context_line":"            for sr in sr_uuid_map:"},{"line_number":1840,"context_line":"                volume_utils.forget_sr(self._session, sr_uuid_map[sr_ref])"},{"line_number":1841,"context_line":"            raise"},{"line_number":1842,"context_line":""},{"line_number":1843,"context_line":"        return sr_uuid_map"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAOX%2F%2F9ro%3D","line":1840,"updated":"2013-04-04 11:21:04.000000000","message":"Can this raise an exception?","commit_id":"25870924d62a8517d1413d23defb5cee1d30a2f3"},{"author":{"_account_id":6735,"name":"Bob Ball","email":"bob.ball@citrix.com","username":"bob-ball"},"change_message_id":"28216fa2e524759e8e4b0224c7cb7f00155c894e","unresolved":false,"context_lines":[{"line_number":1837,"context_line":"        except Exception:"},{"line_number":1838,"context_line":"            # Disconnect the volumes we just connected"},{"line_number":1839,"context_line":"            for sr in sr_uuid_map:"},{"line_number":1840,"context_line":"                volume_utils.forget_sr(self._session, sr_uuid_map[sr_ref])"},{"line_number":1841,"context_line":"            raise"},{"line_number":1842,"context_line":""},{"line_number":1843,"context_line":"        return sr_uuid_map"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAOX%2F%2F9ig%3D","line":1840,"in_reply_to":"AAAAOX%2F%2F9ro%3D","updated":"2013-04-04 13:53:03.000000000","message":"Done","commit_id":"25870924d62a8517d1413d23defb5cee1d30a2f3"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"68bdbea5a307bf0f3569727f3d6071ad44114626","unresolved":false,"context_lines":[{"line_number":1699,"context_line":"            # block migration work will be able to resolve this"},{"line_number":1700,"context_line":"        return dest_check_data"},{"line_number":1701,"context_line":""},{"line_number":1702,"context_line":"    def _is_xsm_sr_check_relaxed(self):"},{"line_number":1703,"context_line":"        try:"},{"line_number":1704,"context_line":"            return self.cached_xsm_sr_relaxed"},{"line_number":1705,"context_line":"        except AttributeError:"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAOn%2F%2FzeA%3D","line":1702,"updated":"2013-04-22 20:12:26.000000000","message":"I would go for something like, _is_iscsi_live_migration_enabled, just to better express intent, i.e. don\u0027t think you would need the comment anymore. But not a biggy, and you may disagree.","commit_id":"95292d0d32fe047e0483b2b3db79452e322addce"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"803a6f87ca90988079594799678f02433755f95a","unresolved":false,"context_lines":[{"line_number":1699,"context_line":"            # block migration work will be able to resolve this"},{"line_number":1700,"context_line":"        return dest_check_data"},{"line_number":1701,"context_line":""},{"line_number":1702,"context_line":"    def _is_xsm_sr_check_relaxed(self):"},{"line_number":1703,"context_line":"        try:"},{"line_number":1704,"context_line":"            return self.cached_xsm_sr_relaxed"},{"line_number":1705,"context_line":"        except AttributeError:"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAOn%2F%2FyTg%3D","line":1702,"in_reply_to":"AAAAOn%2F%2FypM%3D","updated":"2013-04-23 14:26:28.000000000","message":"OK, just seems like a XAPI specific detail I would hide, but I am easy.","commit_id":"95292d0d32fe047e0483b2b3db79452e322addce"},{"author":{"_account_id":6735,"name":"Bob Ball","email":"bob.ball@citrix.com","username":"bob-ball"},"change_message_id":"a59322f733e637d18dce4a0d8c35c94684e0880d","unresolved":false,"context_lines":[{"line_number":1699,"context_line":"            # block migration work will be able to resolve this"},{"line_number":1700,"context_line":"        return dest_check_data"},{"line_number":1701,"context_line":""},{"line_number":1702,"context_line":"    def _is_xsm_sr_check_relaxed(self):"},{"line_number":1703,"context_line":"        try:"},{"line_number":1704,"context_line":"            return self.cached_xsm_sr_relaxed"},{"line_number":1705,"context_line":"        except AttributeError:"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAOn%2F%2FypM%3D","line":1702,"in_reply_to":"AAAAOn%2F%2FzeA%3D","updated":"2013-04-23 09:32:17.000000000","message":"We\u0027re checking specifically for whether the SR check is relaxed in XAPI which is independent of iSCSI and could be used for many SR types.  The driver knows that with this relaxed check it can handle iSCSI better.","commit_id":"95292d0d32fe047e0483b2b3db79452e322addce"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"68bdbea5a307bf0f3569727f3d6071ad44114626","unresolved":false,"context_lines":[{"line_number":1711,"context_line":"            except Exception as exc:"},{"line_number":1712,"context_line":"                LOG.exception(exc)"},{"line_number":1713,"context_line":"            self.cached_xsm_sr_relaxed \u003d config_value \u003d\u003d \"true\""},{"line_number":1714,"context_line":"            return self.cached_xsm_sr_relaxed"},{"line_number":1715,"context_line":""},{"line_number":1716,"context_line":"    def check_can_live_migrate_source(self, ctxt, instance_ref,"},{"line_number":1717,"context_line":"                                      dest_check_data):"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAOn%2F%2Fzcw%3D","line":1714,"updated":"2013-04-22 20:12:26.000000000","message":"Do we need to check the version to ensure the config will apply correctly? That might be overkill though...","commit_id":"95292d0d32fe047e0483b2b3db79452e322addce"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"803a6f87ca90988079594799678f02433755f95a","unresolved":false,"context_lines":[{"line_number":1711,"context_line":"            except Exception as exc:"},{"line_number":1712,"context_line":"                LOG.exception(exc)"},{"line_number":1713,"context_line":"            self.cached_xsm_sr_relaxed \u003d config_value \u003d\u003d \"true\""},{"line_number":1714,"context_line":"            return self.cached_xsm_sr_relaxed"},{"line_number":1715,"context_line":""},{"line_number":1716,"context_line":"    def check_can_live_migrate_source(self, ctxt, instance_ref,"},{"line_number":1717,"context_line":"                                      dest_check_data):"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAOn%2F%2FyTA%3D","line":1714,"in_reply_to":"AAAAOn%2F%2FypE%3D","updated":"2013-04-23 14:26:28.000000000","message":"If there is no easy way, thats cool.\n\nWe actually check version for VDI.resize_online vs resize, or something like that. We could use the platform version I guess, 1.6 or higher (which rules out quite a few which don\u0027t work). But maybe that is just confusing.","commit_id":"95292d0d32fe047e0483b2b3db79452e322addce"},{"author":{"_account_id":6735,"name":"Bob Ball","email":"bob.ball@citrix.com","username":"bob-ball"},"change_message_id":"a59322f733e637d18dce4a0d8c35c94684e0880d","unresolved":false,"context_lines":[{"line_number":1711,"context_line":"            except Exception as exc:"},{"line_number":1712,"context_line":"                LOG.exception(exc)"},{"line_number":1713,"context_line":"            self.cached_xsm_sr_relaxed \u003d config_value \u003d\u003d \"true\""},{"line_number":1714,"context_line":"            return self.cached_xsm_sr_relaxed"},{"line_number":1715,"context_line":""},{"line_number":1716,"context_line":"    def check_can_live_migrate_source(self, ctxt, instance_ref,"},{"line_number":1717,"context_line":"                                      dest_check_data):"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAOn%2F%2FypE%3D","line":1714,"in_reply_to":"AAAAOn%2F%2Fzcw%3D","updated":"2013-04-23 09:32:17.000000000","message":"I think that\u0027s overkill and I don\u0027t think there is a way to do it reliably either - XAPI versions could be checked based on the commit number, but that will differ depending on the branch.  You can\u0027t check the branch a build was made from.  It\u0027s also a configuration issue so isn\u0027t going to vary at run time, so I don\u0027t think we need to try and add tighter checks.","commit_id":"95292d0d32fe047e0483b2b3db79452e322addce"}],"nova/virt/xenapi/volume_utils.py":[{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"e6e3681130f57da321989efcc0f653cf65a6787f","unresolved":false,"context_lines":[{"line_number":186,"context_line":""},{"line_number":187,"context_line":"def purge_sr(session, sr_ref, force_purge\u003dFalse):"},{"line_number":188,"context_line":"    # Make sure no VBDs are referencing the SR VDIs"},{"line_number":189,"context_line":"    if not force_purge:"},{"line_number":190,"context_line":"        vdi_refs \u003d session.call_xenapi(\"SR.get_VDIs\", sr_ref)"},{"line_number":191,"context_line":"        for vdi_ref in vdi_refs:"},{"line_number":192,"context_line":"            vbd_refs \u003d session.call_xenapi(\"VDI.get_VBDs\", vdi_ref)"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAOH%2F%2Fx%2FM%3D","line":189,"updated":"2013-03-27 18:52:34.000000000","message":"I don\u0027t get this. If there were no vdis attached, we would just skip around the loop below. If there are vdis attached, surely the forget_sr would fail?","commit_id":"f8850dfd17902ae994db064bbc2541e48950b876"},{"author":{"_account_id":6735,"name":"Bob Ball","email":"bob.ball@citrix.com","username":"bob-ball"},"change_message_id":"91f3358453f5a7e46d757147b7c8280b0e73fb9e","unresolved":false,"context_lines":[{"line_number":186,"context_line":""},{"line_number":187,"context_line":"def purge_sr(session, sr_ref, force_purge\u003dFalse):"},{"line_number":188,"context_line":"    # Make sure no VBDs are referencing the SR VDIs"},{"line_number":189,"context_line":"    if not force_purge:"},{"line_number":190,"context_line":"        vdi_refs \u003d session.call_xenapi(\"SR.get_VDIs\", sr_ref)"},{"line_number":191,"context_line":"        for vdi_ref in vdi_refs:"},{"line_number":192,"context_line":"            vbd_refs \u003d session.call_xenapi(\"VDI.get_VBDs\", vdi_ref)"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAOH%2F%2FxIA%3D","line":189,"in_reply_to":"AAAAOH%2F%2Fx%2FM%3D","updated":"2013-03-28 11:09:16.000000000","message":"forget_sr will remove the VBDs.  Agreed that I\u0027m calling the wrong thing though - I should just be calling forget_sr!\n\nDone.","commit_id":"f8850dfd17902ae994db064bbc2541e48950b876"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"bcb0e044c15195a9d61078c12ea93327fcef6bee","unresolved":false,"context_lines":[{"line_number":186,"context_line":""},{"line_number":187,"context_line":"def purge_sr(session, sr_ref, force_purge\u003dFalse):"},{"line_number":188,"context_line":"    # Make sure no VBDs are referencing the SR VDIs"},{"line_number":189,"context_line":"    if not force_purge:"},{"line_number":190,"context_line":"        vdi_refs \u003d session.call_xenapi(\"SR.get_VDIs\", sr_ref)"},{"line_number":191,"context_line":"        for vdi_ref in vdi_refs:"},{"line_number":192,"context_line":"            vbd_refs \u003d session.call_xenapi(\"VDI.get_VBDs\", vdi_ref)"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAOH%2F%2Fwtw%3D","line":189,"in_reply_to":"AAAAOH%2F%2FxIA%3D","updated":"2013-03-28 16:37:16.000000000","message":"cool","commit_id":"f8850dfd17902ae994db064bbc2541e48950b876"}],"nova/virt/xenapi/volumeops.py":[{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"e6e3681130f57da321989efcc0f653cf65a6787f","unresolved":false,"context_lines":[{"line_number":45,"context_line":"        SR, e.g. during live migration"},{"line_number":46,"context_line":"        \"\"\""},{"line_number":47,"context_line":""},{"line_number":48,"context_line":"        if instance_name is not None:"},{"line_number":49,"context_line":"            vm_ref \u003d vm_utils.vm_ref_or_raise(self._session, instance_name)"},{"line_number":50,"context_line":"        else:"},{"line_number":51,"context_line":"            vm_ref \u003d None"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAOH%2F%2Fx8o%3D","line":48,"updated":"2013-03-27 18:52:34.000000000","message":"maybe pass instance here to make the api a bit better? But maybe that screws up other stuff.","commit_id":"f8850dfd17902ae994db064bbc2541e48950b876"},{"author":{"_account_id":6735,"name":"Bob Ball","email":"bob.ball@citrix.com","username":"bob-ball"},"change_message_id":"41a590038f200424227f43b61812b482cc06e5f1","unresolved":false,"context_lines":[{"line_number":45,"context_line":"        SR, e.g. during live migration"},{"line_number":46,"context_line":"        \"\"\""},{"line_number":47,"context_line":""},{"line_number":48,"context_line":"        if instance_name is not None:"},{"line_number":49,"context_line":"            vm_ref \u003d vm_utils.vm_ref_or_raise(self._session, instance_name)"},{"line_number":50,"context_line":"        else:"},{"line_number":51,"context_line":"            vm_ref \u003d None"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAOH%2F%2Fsig%3D","line":48,"in_reply_to":"AAAAOH%2F%2Fwtg%3D","updated":"2013-04-02 17:10:11.000000000","message":"Actually, passing instance rather than instance_name doesn\u0027t help - we still need to support not having an instance to attach to","commit_id":"f8850dfd17902ae994db064bbc2541e48950b876"},{"author":{"_account_id":6735,"name":"Bob Ball","email":"bob.ball@citrix.com","username":"bob-ball"},"change_message_id":"91f3358453f5a7e46d757147b7c8280b0e73fb9e","unresolved":false,"context_lines":[{"line_number":45,"context_line":"        SR, e.g. during live migration"},{"line_number":46,"context_line":"        \"\"\""},{"line_number":47,"context_line":""},{"line_number":48,"context_line":"        if instance_name is not None:"},{"line_number":49,"context_line":"            vm_ref \u003d vm_utils.vm_ref_or_raise(self._session, instance_name)"},{"line_number":50,"context_line":"        else:"},{"line_number":51,"context_line":"            vm_ref \u003d None"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAOH%2F%2FxH4%3D","line":48,"in_reply_to":"AAAAOH%2F%2Fx8o%3D","updated":"2013-03-28 11:09:16.000000000","message":"It does... As with the other comment, we\u0027d have to pass {\u0027name\u0027:old_name_label} from migrate_disk_and_power_off.\n\nI\u0027m happy either way.","commit_id":"f8850dfd17902ae994db064bbc2541e48950b876"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"bcb0e044c15195a9d61078c12ea93327fcef6bee","unresolved":false,"context_lines":[{"line_number":45,"context_line":"        SR, e.g. during live migration"},{"line_number":46,"context_line":"        \"\"\""},{"line_number":47,"context_line":""},{"line_number":48,"context_line":"        if instance_name is not None:"},{"line_number":49,"context_line":"            vm_ref \u003d vm_utils.vm_ref_or_raise(self._session, instance_name)"},{"line_number":50,"context_line":"        else:"},{"line_number":51,"context_line":"            vm_ref \u003d None"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAOH%2F%2Fwtg%3D","line":48,"in_reply_to":"AAAAOH%2F%2FxH4%3D","updated":"2013-03-28 16:37:16.000000000","message":"This method is fine really, just didn\u0027t like the other one.","commit_id":"f8850dfd17902ae994db064bbc2541e48950b876"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"e6e3681130f57da321989efcc0f653cf65a6787f","unresolved":false,"context_lines":[{"line_number":104,"context_line":"                if hotplug:"},{"line_number":105,"context_line":"                    self._session.call_xenapi(\"VBD.plug\", vbd_ref)"},{"line_number":106,"context_line":""},{"line_number":107,"context_line":"            vdi_uuid \u003d self._session.call_xenapi(\"VDI.get_uuid\", vdi_ref)"},{"line_number":108,"context_line":"            return (sr_uuid, vdi_uuid)"},{"line_number":109,"context_line":"        except Exception:"},{"line_number":110,"context_line":"            # NOTE(sirp): Forgetting the SR will have the effect of cleaning up"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAOH%2F%2Fx%2Fo%3D","line":107,"updated":"2013-03-27 18:52:34.000000000","message":"Could you avoid the extra call by modifying what volume_utils returns?","commit_id":"f8850dfd17902ae994db064bbc2541e48950b876"},{"author":{"_account_id":6735,"name":"Bob Ball","email":"bob.ball@citrix.com","username":"bob-ball"},"change_message_id":"91f3358453f5a7e46d757147b7c8280b0e73fb9e","unresolved":false,"context_lines":[{"line_number":104,"context_line":"                if hotplug:"},{"line_number":105,"context_line":"                    self._session.call_xenapi(\"VBD.plug\", vbd_ref)"},{"line_number":106,"context_line":""},{"line_number":107,"context_line":"            vdi_uuid \u003d self._session.call_xenapi(\"VDI.get_uuid\", vdi_ref)"},{"line_number":108,"context_line":"            return (sr_uuid, vdi_uuid)"},{"line_number":109,"context_line":"        except Exception:"},{"line_number":110,"context_line":"            # NOTE(sirp): Forgetting the SR will have the effect of cleaning up"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAOH%2F%2FxHc%3D","line":107,"in_reply_to":"AAAAOH%2F%2Fx%2Fo%3D","updated":"2013-03-28 11:09:16.000000000","message":"the introduce_vdi call?  I could, but I figured that would be setting a precedent... We don\u0027t want to return the uuid and ref every time.  Also the introduce_vdi may not have the uuid (and in this case does not) so it might actually be increasing the number of times get_uuid is called (since other callers of introduce_vdi would be calling XAPI one extra time even if they don\u0027t use it)","commit_id":"f8850dfd17902ae994db064bbc2541e48950b876"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"bcb0e044c15195a9d61078c12ea93327fcef6bee","unresolved":false,"context_lines":[{"line_number":104,"context_line":"                if hotplug:"},{"line_number":105,"context_line":"                    self._session.call_xenapi(\"VBD.plug\", vbd_ref)"},{"line_number":106,"context_line":""},{"line_number":107,"context_line":"            vdi_uuid \u003d self._session.call_xenapi(\"VDI.get_uuid\", vdi_ref)"},{"line_number":108,"context_line":"            return (sr_uuid, vdi_uuid)"},{"line_number":109,"context_line":"        except Exception:"},{"line_number":110,"context_line":"            # NOTE(sirp): Forgetting the SR will have the effect of cleaning up"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAOH%2F%2Fwtc%3D","line":107,"in_reply_to":"AAAAOH%2F%2FxHc%3D","updated":"2013-03-28 16:37:16.000000000","message":"true, OK.","commit_id":"f8850dfd17902ae994db064bbc2541e48950b876"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"e6e3681130f57da321989efcc0f653cf65a6787f","unresolved":false,"context_lines":[{"line_number":124,"context_line":"            uuid, label, params \u003d volume_utils.parse_sr_info("},{"line_number":125,"context_line":"                                               connection_info[\u0027data\u0027])"},{"line_number":126,"context_line":"            sr_ref \u003d volume_utils.find_sr_by_uuid(self._session, uuid)"},{"line_number":127,"context_line":"            volume_utils.purge_sr(self._session, sr_ref, force_purge\u003dTrue)"},{"line_number":128,"context_line":"            return"},{"line_number":129,"context_line":""},{"line_number":130,"context_line":"        device_number \u003d volume_utils.get_device_number(mountpoint)"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAOH%2F%2Fx%2Fc%3D","line":127,"updated":"2013-03-27 18:52:34.000000000","message":"the old SM code used to support sharing SRs between VMs, so this used to not be possible. I think we are fine now, but seems odd we don\u0027t do this in the other case.","commit_id":"f8850dfd17902ae994db064bbc2541e48950b876"},{"author":{"_account_id":6735,"name":"Bob Ball","email":"bob.ball@citrix.com","username":"bob-ball"},"change_message_id":"91f3358453f5a7e46d757147b7c8280b0e73fb9e","unresolved":false,"context_lines":[{"line_number":124,"context_line":"            uuid, label, params \u003d volume_utils.parse_sr_info("},{"line_number":125,"context_line":"                                               connection_info[\u0027data\u0027])"},{"line_number":126,"context_line":"            sr_ref \u003d volume_utils.find_sr_by_uuid(self._session, uuid)"},{"line_number":127,"context_line":"            volume_utils.purge_sr(self._session, sr_ref, force_purge\u003dTrue)"},{"line_number":128,"context_line":"            return"},{"line_number":129,"context_line":""},{"line_number":130,"context_line":"        device_number \u003d volume_utils.get_device_number(mountpoint)"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAOH%2F%2FxHY%3D","line":127,"in_reply_to":"AAAAOH%2F%2Fx%2Fc%3D","updated":"2013-03-28 11:09:16.000000000","message":"Which other case?  We could special case the purge to iSCSI SRs only, or change it to remove the force_purge and have a retry count to avoid the race condition instead.  Thoughts?","commit_id":"f8850dfd17902ae994db064bbc2541e48950b876"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"bcb0e044c15195a9d61078c12ea93327fcef6bee","unresolved":false,"context_lines":[{"line_number":124,"context_line":"            uuid, label, params \u003d volume_utils.parse_sr_info("},{"line_number":125,"context_line":"                                               connection_info[\u0027data\u0027])"},{"line_number":126,"context_line":"            sr_ref \u003d volume_utils.find_sr_by_uuid(self._session, uuid)"},{"line_number":127,"context_line":"            volume_utils.purge_sr(self._session, sr_ref, force_purge\u003dTrue)"},{"line_number":128,"context_line":"            return"},{"line_number":129,"context_line":""},{"line_number":130,"context_line":"        device_number \u003d volume_utils.get_device_number(mountpoint)"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAOH%2F%2FwtI%3D","line":127,"in_reply_to":"AAAAOH%2F%2FxHY%3D","updated":"2013-03-28 16:37:16.000000000","message":"Whats the race condition?","commit_id":"f8850dfd17902ae994db064bbc2541e48950b876"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"e6e3681130f57da321989efcc0f653cf65a6787f","unresolved":false,"context_lines":[{"line_number":125,"context_line":"                                               connection_info[\u0027data\u0027])"},{"line_number":126,"context_line":"            sr_ref \u003d volume_utils.find_sr_by_uuid(self._session, uuid)"},{"line_number":127,"context_line":"            volume_utils.purge_sr(self._session, sr_ref, force_purge\u003dTrue)"},{"line_number":128,"context_line":"            return"},{"line_number":129,"context_line":""},{"line_number":130,"context_line":"        device_number \u003d volume_utils.get_device_number(mountpoint)"},{"line_number":131,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAOH%2F%2Fx%2Fk%3D","line":128,"updated":"2013-03-27 18:52:34.000000000","message":"don\u0027t like this style, do else instead maybe? Probably needs to be refactored with some sub methods?","commit_id":"f8850dfd17902ae994db064bbc2541e48950b876"},{"author":{"_account_id":6735,"name":"Bob Ball","email":"bob.ball@citrix.com","username":"bob-ball"},"change_message_id":"91f3358453f5a7e46d757147b7c8280b0e73fb9e","unresolved":false,"context_lines":[{"line_number":125,"context_line":"                                               connection_info[\u0027data\u0027])"},{"line_number":126,"context_line":"            sr_ref \u003d volume_utils.find_sr_by_uuid(self._session, uuid)"},{"line_number":127,"context_line":"            volume_utils.purge_sr(self._session, sr_ref, force_purge\u003dTrue)"},{"line_number":128,"context_line":"            return"},{"line_number":129,"context_line":""},{"line_number":130,"context_line":"        device_number \u003d volume_utils.get_device_number(mountpoint)"},{"line_number":131,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAOH%2F%2FxHU%3D","line":128,"in_reply_to":"AAAAOH%2F%2Fx%2Fk%3D","updated":"2013-03-28 11:09:16.000000000","message":"Don\u0027t think sub-methods are worth it, but used an else.","commit_id":"f8850dfd17902ae994db064bbc2541e48950b876"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"bcb0e044c15195a9d61078c12ea93327fcef6bee","unresolved":false,"context_lines":[{"line_number":125,"context_line":"                                               connection_info[\u0027data\u0027])"},{"line_number":126,"context_line":"            sr_ref \u003d volume_utils.find_sr_by_uuid(self._session, uuid)"},{"line_number":127,"context_line":"            volume_utils.purge_sr(self._session, sr_ref, force_purge\u003dTrue)"},{"line_number":128,"context_line":"            return"},{"line_number":129,"context_line":""},{"line_number":130,"context_line":"        device_number \u003d volume_utils.get_device_number(mountpoint)"},{"line_number":131,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAOH%2F%2FwtA%3D","line":128,"in_reply_to":"AAAAOH%2F%2FxHU%3D","updated":"2013-03-28 16:37:16.000000000","message":"it just makes testing much easier","commit_id":"f8850dfd17902ae994db064bbc2541e48950b876"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"e6e3681130f57da321989efcc0f653cf65a6787f","unresolved":false,"context_lines":[{"line_number":139,"context_line":"            return"},{"line_number":140,"context_line":""},{"line_number":141,"context_line":"        # Unplug VBD if we\u0027re NOT shutdown"},{"line_number":142,"context_line":"        unplug \u003d not vm_utils._is_vm_shutdown(self._session, vm_ref)"},{"line_number":143,"context_line":"        self._detach_vbd(vbd_ref, unplug\u003dunplug)"},{"line_number":144,"context_line":""},{"line_number":145,"context_line":"        LOG.info(_(\u0027Mountpoint %(mountpoint)s detached from instance\u0027"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAOH%2F%2Fx%2FU%3D","line":142,"updated":"2013-03-27 18:52:34.000000000","message":"Where does the SR get removed in this code path? Getting confused why you had to delete the SR above.","commit_id":"f8850dfd17902ae994db064bbc2541e48950b876"},{"author":{"_account_id":6735,"name":"Bob Ball","email":"bob.ball@citrix.com","username":"bob-ball"},"change_message_id":"91f3358453f5a7e46d757147b7c8280b0e73fb9e","unresolved":false,"context_lines":[{"line_number":139,"context_line":"            return"},{"line_number":140,"context_line":""},{"line_number":141,"context_line":"        # Unplug VBD if we\u0027re NOT shutdown"},{"line_number":142,"context_line":"        unplug \u003d not vm_utils._is_vm_shutdown(self._session, vm_ref)"},{"line_number":143,"context_line":"        self._detach_vbd(vbd_ref, unplug\u003dunplug)"},{"line_number":144,"context_line":""},{"line_number":145,"context_line":"        LOG.info(_(\u0027Mountpoint %(mountpoint)s detached from instance\u0027"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAOH%2F%2FxHQ%3D","line":142,"in_reply_to":"AAAAOH%2F%2Fx%2FU%3D","updated":"2013-03-28 11:09:16.000000000","message":"detach_vbd will purge the SR if it was the last VBD on the SR.","commit_id":"f8850dfd17902ae994db064bbc2541e48950b876"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"bcb0e044c15195a9d61078c12ea93327fcef6bee","unresolved":false,"context_lines":[{"line_number":139,"context_line":"            return"},{"line_number":140,"context_line":""},{"line_number":141,"context_line":"        # Unplug VBD if we\u0027re NOT shutdown"},{"line_number":142,"context_line":"        unplug \u003d not vm_utils._is_vm_shutdown(self._session, vm_ref)"},{"line_number":143,"context_line":"        self._detach_vbd(vbd_ref, unplug\u003dunplug)"},{"line_number":144,"context_line":""},{"line_number":145,"context_line":"        LOG.info(_(\u0027Mountpoint %(mountpoint)s detached from instance\u0027"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAOH%2F%2Fws4%3D","line":142,"in_reply_to":"AAAAOH%2F%2FxHQ%3D","updated":"2013-03-28 16:37:16.000000000","message":"Ah yes... So this is why you need the purge_sr above, because this equivalent is not valid. cool.","commit_id":"f8850dfd17902ae994db064bbc2541e48950b876"},{"author":{"_account_id":5044,"name":"Mate Lakat","email":"mlakat@suse.com","username":"mate-lakat"},"change_message_id":"a4049ee7ddf75d8a0b854dc3dde82358e79d7291","unresolved":false,"context_lines":[{"line_number":36,"context_line":"    def __init__(self, session):"},{"line_number":37,"context_line":"        self._session \u003d session"},{"line_number":38,"context_line":""},{"line_number":39,"context_line":"    def attach_volume(self, connection_info, instance_name, mountpoint,"},{"line_number":40,"context_line":"                      hotplug\u003dTrue):"},{"line_number":41,"context_line":"        \"\"\""},{"line_number":42,"context_line":"        Attach volume storage to VM instance."}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAOX%2F%2F%2Fdo%3D","line":39,"updated":"2013-04-03 12:14:06.000000000","message":"mountpoint doesn\u0027t make sense without an instance. But anyhow, we\u0027ll revisit this code during the volume drivers refactor, let\u0027s deal with this later.","commit_id":"25870924d62a8517d1413d23defb5cee1d30a2f3"},{"author":{"_account_id":6735,"name":"Bob Ball","email":"bob.ball@citrix.com","username":"bob-ball"},"change_message_id":"8afbf3749b9bfae19c4e614c2baed436818eb921","unresolved":false,"context_lines":[{"line_number":36,"context_line":"    def __init__(self, session):"},{"line_number":37,"context_line":"        self._session \u003d session"},{"line_number":38,"context_line":""},{"line_number":39,"context_line":"    def attach_volume(self, connection_info, instance_name, mountpoint,"},{"line_number":40,"context_line":"                      hotplug\u003dTrue):"},{"line_number":41,"context_line":"        \"\"\""},{"line_number":42,"context_line":"        Attach volume storage to VM instance."}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAOX%2F%2F9xo%3D","line":39,"in_reply_to":"AAAAOX%2F%2F%2Fdo%3D","updated":"2013-04-04 09:10:26.000000000","message":"Agreed.","commit_id":"25870924d62a8517d1413d23defb5cee1d30a2f3"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"21ce36f42af612baaac8f4b5e648d6ffc5c223e0","unresolved":false,"context_lines":[{"line_number":97,"context_line":""},{"line_number":98,"context_line":"            # Attach"},{"line_number":99,"context_line":"            if vm_ref:"},{"line_number":100,"context_line":"                vbd_ref \u003d vm_utils.create_vbd(self._session, vm_ref, vdi_ref,"},{"line_number":101,"context_line":"                                              dev_number, bootable\u003dFalse,"},{"line_number":102,"context_line":"                                              osvol\u003dTrue)"},{"line_number":103,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAOX%2F%2F9Xs%3D","line":100,"updated":"2013-04-04 15:27:12.000000000","message":"Suggestion: you could move this code into the attach call above, then you can call connect_volume from your code without the mountpoint and vm?","commit_id":"25870924d62a8517d1413d23defb5cee1d30a2f3"},{"author":{"_account_id":5044,"name":"Mate Lakat","email":"mlakat@suse.com","username":"mate-lakat"},"change_message_id":"a4049ee7ddf75d8a0b854dc3dde82358e79d7291","unresolved":false,"context_lines":[{"line_number":118,"context_line":"                % locals())"},{"line_number":119,"context_line":""},{"line_number":120,"context_line":"        device_number \u003d volume_utils.get_device_number(mountpoint)"},{"line_number":121,"context_line":"        vm_ref \u003d vm_utils.vm_ref_or_raise(self._session, instance_name)"},{"line_number":122,"context_line":"        try:"},{"line_number":123,"context_line":"            vbd_ref \u003d vm_utils.find_vbd_by_number("},{"line_number":124,"context_line":"                self._session, vm_ref, device_number)"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAOX%2F%2F%2Fdk%3D","line":121,"updated":"2013-04-03 12:14:06.000000000","message":"I would leave out the formatting noise.","commit_id":"25870924d62a8517d1413d23defb5cee1d30a2f3"},{"author":{"_account_id":6735,"name":"Bob Ball","email":"bob.ball@citrix.com","username":"bob-ball"},"change_message_id":"8afbf3749b9bfae19c4e614c2baed436818eb921","unresolved":false,"context_lines":[{"line_number":118,"context_line":"                % locals())"},{"line_number":119,"context_line":""},{"line_number":120,"context_line":"        device_number \u003d volume_utils.get_device_number(mountpoint)"},{"line_number":121,"context_line":"        vm_ref \u003d vm_utils.vm_ref_or_raise(self._session, instance_name)"},{"line_number":122,"context_line":"        try:"},{"line_number":123,"context_line":"            vbd_ref \u003d vm_utils.find_vbd_by_number("},{"line_number":124,"context_line":"                self._session, vm_ref, device_number)"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAOX%2F%2F%2FNg%3D","line":121,"in_reply_to":"AAAAOX%2F%2F%2Fdk%3D","updated":"2013-04-04 09:10:26.000000000","message":"Done","commit_id":"25870924d62a8517d1413d23defb5cee1d30a2f3"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"68bdbea5a307bf0f3569727f3d6071ad44114626","unresolved":false,"context_lines":[{"line_number":69,"context_line":"        LOG.debug(_(\"Connect_volume: %(connection_info)s\") % locals())"},{"line_number":70,"context_line":""},{"line_number":71,"context_line":"        sr_uuid, vdi_uuid \u003d self._connect_volume(connection_info,"},{"line_number":72,"context_line":"                                                 None, None, None, False)"},{"line_number":73,"context_line":""},{"line_number":74,"context_line":"        return (sr_uuid, vdi_uuid)"},{"line_number":75,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAOn%2F%2FzdM%3D","line":72,"updated":"2013-04-22 20:12:26.000000000","message":"This feels odd.","commit_id":"95292d0d32fe047e0483b2b3db79452e322addce"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"68bdbea5a307bf0f3569727f3d6071ad44114626","unresolved":false,"context_lines":[{"line_number":105,"context_line":"                vdi_ref \u003d volume_utils.introduce_vdi(self._session, sr_ref)"},{"line_number":106,"context_line":""},{"line_number":107,"context_line":"            # Attach"},{"line_number":108,"context_line":"            if vm_ref:"},{"line_number":109,"context_line":"                vbd_ref \u003d vm_utils.create_vbd(self._session, vm_ref, vdi_ref,"},{"line_number":110,"context_line":"                                              dev_number, bootable\u003dFalse,"},{"line_number":111,"context_line":"                                              osvol\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAOn%2F%2Fzdc%3D","line":108,"updated":"2013-04-22 20:12:26.000000000","message":"I think this bit of code should live in the attach_volume method only, I think it will make more sense then, in terms of connect vs attach.","commit_id":"95292d0d32fe047e0483b2b3db79452e322addce"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"803a6f87ca90988079594799678f02433755f95a","unresolved":false,"context_lines":[{"line_number":105,"context_line":"                vdi_ref \u003d volume_utils.introduce_vdi(self._session, sr_ref)"},{"line_number":106,"context_line":""},{"line_number":107,"context_line":"            # Attach"},{"line_number":108,"context_line":"            if vm_ref:"},{"line_number":109,"context_line":"                vbd_ref \u003d vm_utils.create_vbd(self._session, vm_ref, vdi_ref,"},{"line_number":110,"context_line":"                                              dev_number, bootable\u003dFalse,"},{"line_number":111,"context_line":"                                              osvol\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAOn%2F%2FySY%3D","line":108,"in_reply_to":"AAAAOn%2F%2FyoA%3D","updated":"2013-04-23 14:26:28.000000000","message":"I am easy on this one, but I still think it would be semantically better the other way. But I wouldn\u0027t reject the patch on just that.","commit_id":"95292d0d32fe047e0483b2b3db79452e322addce"},{"author":{"_account_id":6735,"name":"Bob Ball","email":"bob.ball@citrix.com","username":"bob-ball"},"change_message_id":"a59322f733e637d18dce4a0d8c35c94684e0880d","unresolved":false,"context_lines":[{"line_number":105,"context_line":"                vdi_ref \u003d volume_utils.introduce_vdi(self._session, sr_ref)"},{"line_number":106,"context_line":""},{"line_number":107,"context_line":"            # Attach"},{"line_number":108,"context_line":"            if vm_ref:"},{"line_number":109,"context_line":"                vbd_ref \u003d vm_utils.create_vbd(self._session, vm_ref, vdi_ref,"},{"line_number":110,"context_line":"                                              dev_number, bootable\u003dFalse,"},{"line_number":111,"context_line":"                                              osvol\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAOn%2F%2FyoA%3D","line":108,"in_reply_to":"AAAAOn%2F%2Fzdc%3D","updated":"2013-04-23 09:32:17.000000000","message":"I think it turns out uglier if we do it that way because you have to pass both sr_ref and vdi_ref back from this function or get them again from XAPI - and (although it\u0027s simple) have the same forget_sr exception handling code too.","commit_id":"95292d0d32fe047e0483b2b3db79452e322addce"}],"plugins/xenserver/xenapi/etc/xapi.d/plugins/config_file":[{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"1c811d1c79601ea355ff5cb52bd11926d3a0298c","unresolved":false,"context_lines":[{"line_number":8,"context_line":"    config_file \u003d open(\u0027/etc/xapi.conf\u0027)"},{"line_number":9,"context_line":"    try:"},{"line_number":10,"context_line":"        for line in config_file:"},{"line_number":11,"context_line":"            split \u003d line.split(\u0027\u003d\u0027)"},{"line_number":12,"context_line":"            if (len(split) \u003d\u003d 2) and (split[0].strip() \u003d\u003d config_key):"},{"line_number":13,"context_line":"                return split[1].strip()"},{"line_number":14,"context_line":"        return \"\""}],"source_content_type":"application/octet-stream","patch_set":3,"id":"AAAAOX%2F%2F%2B5Y%3D","line":11,"updated":"2013-04-03 16:43:58.000000000","message":"I guess the value doesn\u0027t also have \u003d in it","commit_id":"25870924d62a8517d1413d23defb5cee1d30a2f3"},{"author":{"_account_id":6735,"name":"Bob Ball","email":"bob.ball@citrix.com","username":"bob-ball"},"change_message_id":"8afbf3749b9bfae19c4e614c2baed436818eb921","unresolved":false,"context_lines":[{"line_number":8,"context_line":"    config_file \u003d open(\u0027/etc/xapi.conf\u0027)"},{"line_number":9,"context_line":"    try:"},{"line_number":10,"context_line":"        for line in config_file:"},{"line_number":11,"context_line":"            split \u003d line.split(\u0027\u003d\u0027)"},{"line_number":12,"context_line":"            if (len(split) \u003d\u003d 2) and (split[0].strip() \u003d\u003d config_key):"},{"line_number":13,"context_line":"                return split[1].strip()"},{"line_number":14,"context_line":"        return \"\""}],"source_content_type":"application/octet-stream","patch_set":3,"id":"AAAAOX%2F%2F9xk%3D","line":11,"in_reply_to":"AAAAOX%2F%2F%2B5Y%3D","updated":"2013-04-04 09:10:26.000000000","message":"Correct - there are only three supported values at the moment.  We\u0027re likely to re-write the conf file format in the next version (probably to json) - but it\u0027s an incredibly simple file at the moment.","commit_id":"25870924d62a8517d1413d23defb5cee1d30a2f3"}]}
