)]}'
{"nova/compute/manager.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"4df083f529ffb8341a6313916aec5ff49d89c72c","unresolved":false,"context_lines":[{"line_number":4702,"context_line":"                         \u0027detaching the volume.\u0027), volume_id,"},{"line_number":4703,"context_line":"                     instance\u003dinstance)"},{"line_number":4704,"context_line":"            driver_bdm \u003d driver_block_device.convert_volume(bdm)"},{"line_number":4705,"context_line":"            driver_bdm.refresh_connection_info(context, instance,"},{"line_number":4706,"context_line":"                                               self.volume_api, self.driver)"},{"line_number":4707,"context_line":"            bdm.connection_info \u003d driver_bdm[\u0027connection_info\u0027]"},{"line_number":4708,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"9a80dd14_266c4536","line":4705,"updated":"2015-03-18 18:27:52.000000000","message":"This wouldn\u0027t work anyway because refresh_connection_info doesn\u0027t refresh if connection_info isn\u0027t already set:\n\nhttp://git.openstack.org/cgit/openstack/nova/tree/nova/virt/block_device.py#n271\n\nSo we\u0027d have to add a force flag or something there.","commit_id":"438cc2c7aec353b2ef843b7a09bc6ba1376ea580"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"f6fbbaef1e48bacb520036d034e2b2fe70f665fd","unresolved":false,"context_lines":[{"line_number":4704,"context_line":"            driver_bdm \u003d driver_block_device.convert_volume(bdm)"},{"line_number":4705,"context_line":"            driver_bdm.refresh_connection_info(context, instance,"},{"line_number":4706,"context_line":"                                               self.volume_api, self.driver)"},{"line_number":4707,"context_line":"            bdm.connection_info \u003d driver_bdm[\u0027connection_info\u0027]"},{"line_number":4708,"context_line":""},{"line_number":4709,"context_line":"        connection_info \u003d jsonutils.loads(bdm.connection_info)"},{"line_number":4710,"context_line":"        # NOTE(vish): We currently don\u0027t use the serial when disconnecting,"}],"source_content_type":"text/x-python","patch_set":1,"id":"9a80dd14_1f565b06","line":4707,"updated":"2015-03-13 20:13:45.000000000","message":"Note that refresh_connection_info is decorated with @update_db which calls essentially bdm.save() which is overridden by DriverVolumeBlockDevice (which wraps the bdm object), and DriverVolumeBlockDevice.save() will serialize connection_info before saving it to the database:\n\nhttp://git.openstack.org/cgit/openstack/nova/tree/nova/virt/block_device.py#n268\n\nThat\u0027s why we leave the jsonutils.loads(bdm.connection_info) happening outside of this condition block.\n\nThis multi-layered pig in a blanket stuff with BDM objects trips me up every time so I had to be sure of this.","commit_id":"438cc2c7aec353b2ef843b7a09bc6ba1376ea580"}],"nova/tests/unit/compute/test_compute_mgr.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"c41735a61218173e7e2009fcae27a1c6eaeb47e0","unresolved":false,"context_lines":[{"line_number":1763,"context_line":"        # setup our fake driver bdm which does have connection_info"},{"line_number":1764,"context_line":"        driver_bdm \u003d fake_block_device.FakeDbBlockDeviceDict("},{"line_number":1765,"context_line":"            fake_bdm, connection_info\u003djsonutils.dumps(info))"},{"line_number":1766,"context_line":"        driver_block_device.convert_volume \u003d mock.Mock(return_value\u003ddriver_bdm)"},{"line_number":1767,"context_line":""},{"line_number":1768,"context_line":"        self.compute.driver.instance_exists \u003d mock.Mock(return_value\u003dTrue)"},{"line_number":1769,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"9a80dd14_7d9ed164","line":1766,"updated":"2015-03-18 16:01:55.000000000","message":"This is the problem, it\u0027s mocking a module scope utility method that the other test is using and expects to return None.","commit_id":"438cc2c7aec353b2ef843b7a09bc6ba1376ea580"}],"nova/tests/unit/virt/test_block_device.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"6845269585b7f355af28a82678f03166f7145cfc","unresolved":false,"context_lines":[{"line_number":323,"context_line":"                            access_mode\u003d\u0027rw\u0027):"},{"line_number":324,"context_line":"        elevated_context \u003d self.context.elevated()"},{"line_number":325,"context_line":"        self.stubs.Set(self.context, \u0027elevated\u0027,"},{"line_number":326,"context_line":"                       lambda: elevated_context)"},{"line_number":327,"context_line":"        self.mox.StubOutWithMock(driver_bdm._bdm_obj, \u0027save\u0027)"},{"line_number":328,"context_line":"        self.mox.StubOutWithMock(encryptors, \u0027get_encryption_metadata\u0027)"},{"line_number":329,"context_line":"        instance_detail \u003d {\u0027id\u0027: \u0027123\u0027, \u0027uuid\u0027: \u0027fake_uuid\u0027}"}],"source_content_type":"text/x-python","patch_set":2,"id":"9a80dd14_cbe7eaaa","line":326,"updated":"2015-03-18 21:01:47.000000000","message":"@Dan,\n\nI tinkered with stubbing out driver_bdm._bdm_obj.save() and make sure it is only called twice and on the first call connection_info is set and on the 2nd it\u0027s not (assuming obj_reset_changes() in the bdm object):\n\nhttp://paste.openstack.org/show/193261/\n\nbut that doesn\u0027t work because the wrapper object always sets connection_info on the decorator _bdm_obj object on save, regardless of whether or not it\u0027s value has changed:\n\nhttp://git.openstack.org/cgit/openstack/nova/tree/nova/virt/block_device.py#n284\n\nSo kind of stuck in testing that since it will always store it.","commit_id":"6fb2ef96d6aaf9ca0ad394fd7621ef1e6003f5a1"}],"nova/virt/block_device.py":[{"author":{"_account_id":6062,"name":"jichenjc","email":"jichenjc@cn.ibm.com","username":"jichenjc"},"change_message_id":"0ec444a9f448f79322f1a1c2192c6770af53181b","unresolved":false,"context_lines":[{"line_number":217,"context_line":"                    self[\u0027connection_info\u0027][\u0027data\u0027][\u0027multipath_id\u0027]"},{"line_number":218,"context_line":"                LOG.info(_LI(\u0027preserve multipath_id %s\u0027),"},{"line_number":219,"context_line":"                         connection_info[\u0027data\u0027][\u0027multipath_id\u0027])"},{"line_number":220,"context_line":""},{"line_number":221,"context_line":"    @update_db"},{"line_number":222,"context_line":"    def attach(self, context, instance, volume_api, virt_driver,"},{"line_number":223,"context_line":"               do_check_attach\u003dTrue, do_driver_attach\u003dFalse):"}],"source_content_type":"text/x-python","patch_set":2,"id":"9a80dd14_30d553b7","line":220,"updated":"2015-03-18 20:38:21.000000000","message":"this function is used to do object.save which did identical stuff you added","commit_id":"6fb2ef96d6aaf9ca0ad394fd7621ef1e6003f5a1"},{"author":{"_account_id":1011,"name":"Tushar Patil","email":"tushar.vitthal.patil@gmail.com","username":"tpatil"},"change_message_id":"a4d1d8e7fdf0879b4e33170e12a7d3d32bd456ad","unresolved":false,"context_lines":[{"line_number":266,"context_line":"            # the database before the volume status goes to \u0027in-use\u0027 because"},{"line_number":267,"context_line":"            # after that we can detach and connection_info is required for"},{"line_number":268,"context_line":"            # detach."},{"line_number":269,"context_line":"            self.save()"},{"line_number":270,"context_line":"            volume_api.attach(context, volume_id, instance.uuid,"},{"line_number":271,"context_line":"                              self[\u0027mount_device\u0027], mode\u003dmode)"},{"line_number":272,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"9a80dd14_fa8475d4","line":269,"updated":"2015-03-18 21:39:32.000000000","message":"This will save the object twice. One here and other in the decorator update_db.","commit_id":"6fb2ef96d6aaf9ca0ad394fd7621ef1e6003f5a1"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"d84886b23e2f79bf5a21b0f1756100db9f4788d2","unresolved":false,"context_lines":[{"line_number":266,"context_line":"            # the database before the volume status goes to \u0027in-use\u0027 because"},{"line_number":267,"context_line":"            # after that we can detach and connection_info is required for"},{"line_number":268,"context_line":"            # detach."},{"line_number":269,"context_line":"            self.save()"},{"line_number":270,"context_line":"            volume_api.attach(context, volume_id, instance.uuid,"},{"line_number":271,"context_line":"                              self[\u0027mount_device\u0027], mode\u003dmode)"},{"line_number":272,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"9a80dd14_b9f74b8b","line":269,"in_reply_to":"9a80dd14_1d96a394","updated":"2015-03-19 13:37:33.000000000","message":"Right, the alternative fix from Tushar is here:\n\nhttps://review.openstack.org/#/c/163937/\n\nMy concern with that one right now is backporting it to stable.  I\u0027m going to see how clean of a backport it is and if it\u0027s fine then I\u0027ll probably abandon my change and we can approve Tushar\u0027s.","commit_id":"6fb2ef96d6aaf9ca0ad394fd7621ef1e6003f5a1"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"5030e15e956836d9bfcb57f6458afcd00cdcf3ca","unresolved":false,"context_lines":[{"line_number":266,"context_line":"            # the database before the volume status goes to \u0027in-use\u0027 because"},{"line_number":267,"context_line":"            # after that we can detach and connection_info is required for"},{"line_number":268,"context_line":"            # detach."},{"line_number":269,"context_line":"            self.save()"},{"line_number":270,"context_line":"            volume_api.attach(context, volume_id, instance.uuid,"},{"line_number":271,"context_line":"                              self[\u0027mount_device\u0027], mode\u003dmode)"},{"line_number":272,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"9a80dd14_1ca3e543","line":269,"in_reply_to":"9a80dd14_b9f74b8b","updated":"2015-03-19 13:57:44.000000000","message":"This will not save the object twice. The second save() will be a no-op because the object will be clean at that point.","commit_id":"6fb2ef96d6aaf9ca0ad394fd7621ef1e6003f5a1"},{"author":{"_account_id":6062,"name":"jichenjc","email":"jichenjc@cn.ibm.com","username":"jichenjc"},"change_message_id":"6346571a49e3dbea65153bfdcc275f43bb82cfc9","unresolved":false,"context_lines":[{"line_number":266,"context_line":"            # the database before the volume status goes to \u0027in-use\u0027 because"},{"line_number":267,"context_line":"            # after that we can detach and connection_info is required for"},{"line_number":268,"context_line":"            # detach."},{"line_number":269,"context_line":"            self.save()"},{"line_number":270,"context_line":"            volume_api.attach(context, volume_id, instance.uuid,"},{"line_number":271,"context_line":"                              self[\u0027mount_device\u0027], mode\u003dmode)"},{"line_number":272,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"9a80dd14_1d96a394","line":269,"in_reply_to":"9a80dd14_fa8475d4","updated":"2015-03-18 21:52:09.000000000","message":"I also noticed that ,but I think that\u0027s not a big deal","commit_id":"6fb2ef96d6aaf9ca0ad394fd7621ef1e6003f5a1"},{"author":{"_account_id":6062,"name":"jichenjc","email":"jichenjc@cn.ibm.com","username":"jichenjc"},"change_message_id":"0ec444a9f448f79322f1a1c2192c6770af53181b","unresolved":false,"context_lines":[{"line_number":268,"context_line":"            # detach."},{"line_number":269,"context_line":"            self.save()"},{"line_number":270,"context_line":"            volume_api.attach(context, volume_id, instance.uuid,"},{"line_number":271,"context_line":"                              self[\u0027mount_device\u0027], mode\u003dmode)"},{"line_number":272,"context_line":""},{"line_number":273,"context_line":"    @update_db"},{"line_number":274,"context_line":"    def refresh_connection_info(self, context, instance,"}],"source_content_type":"text/x-python","patch_set":2,"id":"9a80dd14_d0e797aa","line":271,"updated":"2015-03-18 20:38:21.000000000","message":"is the race condition right after this line and before the wrapper executed?","commit_id":"6fb2ef96d6aaf9ca0ad394fd7621ef1e6003f5a1"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"e6d6f40efa6caffff2dcdea6271e5793bbc201a1","unresolved":false,"context_lines":[{"line_number":268,"context_line":"            # detach."},{"line_number":269,"context_line":"            self.save()"},{"line_number":270,"context_line":"            volume_api.attach(context, volume_id, instance.uuid,"},{"line_number":271,"context_line":"                              self[\u0027mount_device\u0027], mode\u003dmode)"},{"line_number":272,"context_line":""},{"line_number":273,"context_line":"    @update_db"},{"line_number":274,"context_line":"    def refresh_connection_info(self, context, instance,"}],"source_content_type":"text/x-python","patch_set":2,"id":"9a80dd14_8b4c1278","line":271,"in_reply_to":"9a80dd14_d0e797aa","updated":"2015-03-18 20:43:51.000000000","message":"Yes, attach in cinder is a call so the volume\u0027s status gets updated to \u0027in-use\u0027 in cinder and tempest is polling on that status change when it calls detach_volume.  Since attach in cinder is a call, we\u0027re waiting for the response back in nova before we exit this method where the @update_db decorator calls save() and that stores the connection_info in the database.","commit_id":"6fb2ef96d6aaf9ca0ad394fd7621ef1e6003f5a1"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"b05a0ccc6ae50475ebffde12dd3ed4c38d7229df","unresolved":false,"context_lines":[{"line_number":289,"context_line":"    def save(self):"},{"line_number":290,"context_line":"        # NOTE(ndipanov): we might want to generalize this by adding it to the"},{"line_number":291,"context_line":"        # _update_on_save and adding a transformation function."},{"line_number":292,"context_line":"        try:"},{"line_number":293,"context_line":"            self._bdm_obj.connection_info \u003d jsonutils.dumps("},{"line_number":294,"context_line":"                    self.get(\u0027connection_info\u0027))"},{"line_number":295,"context_line":"        except TypeError:"}],"source_content_type":"text/x-python","patch_set":2,"id":"9a80dd14_9c135564","line":292,"updated":"2015-03-19 13:59:29.000000000","message":"Dan, the @update_db decorator will call this save() which will always set connection_info on the internal bdm object so in my testing obj_get_changes() on save() wasn\u0027t clean on the second save.","commit_id":"6fb2ef96d6aaf9ca0ad394fd7621ef1e6003f5a1"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"ec53a448bb555f1fefc4a0c51b535e889788db61","unresolved":false,"context_lines":[{"line_number":289,"context_line":"    def save(self):"},{"line_number":290,"context_line":"        # NOTE(ndipanov): we might want to generalize this by adding it to the"},{"line_number":291,"context_line":"        # _update_on_save and adding a transformation function."},{"line_number":292,"context_line":"        try:"},{"line_number":293,"context_line":"            self._bdm_obj.connection_info \u003d jsonutils.dumps("},{"line_number":294,"context_line":"                    self.get(\u0027connection_info\u0027))"},{"line_number":295,"context_line":"        except TypeError:"}],"source_content_type":"text/x-python","patch_set":2,"id":"9a80dd14_a8a0d342","line":292,"in_reply_to":"9a80dd14_6deeed23","updated":"2015-03-19 15:02:11.000000000","message":"Nikola has a fix here: https://review.openstack.org/#/c/165863/","commit_id":"6fb2ef96d6aaf9ca0ad394fd7621ef1e6003f5a1"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"87bc280cc7c79b380b17ba3810590adcb33cce18","unresolved":false,"context_lines":[{"line_number":289,"context_line":"    def save(self):"},{"line_number":290,"context_line":"        # NOTE(ndipanov): we might want to generalize this by adding it to the"},{"line_number":291,"context_line":"        # _update_on_save and adding a transformation function."},{"line_number":292,"context_line":"        try:"},{"line_number":293,"context_line":"            self._bdm_obj.connection_info \u003d jsonutils.dumps("},{"line_number":294,"context_line":"                    self.get(\u0027connection_info\u0027))"},{"line_number":295,"context_line":"        except TypeError:"}],"source_content_type":"text/x-python","patch_set":2,"id":"9a80dd14_6deeed23","line":292,"in_reply_to":"9a80dd14_9c135564","updated":"2015-03-19 14:35:13.000000000","message":"That would be a bug. Let\u0027s just fix it here. I\u0027m fine doing that in this patch or a follow-on.","commit_id":"6fb2ef96d6aaf9ca0ad394fd7621ef1e6003f5a1"}]}
