)]}'
{"nova/tests/functional/regressions/test_bug_1784353.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"5f288dcb6f44ec8a6f14eb8b34d7573487a9f72d","unresolved":false,"context_lines":[{"line_number":24,"context_line":""},{"line_number":25,"context_line":"class TestRescheduleWithVolumesAttached("},{"line_number":26,"context_line":"        test.TestCase, integrated_helpers.InstanceHelperMixin):"},{"line_number":27,"context_line":"    \"\"\"Assert that volume backed instances cannot be rescheduled at present."},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"    This regression test asserts that volume backed instances fail to start"},{"line_number":30,"context_line":"    when rescheduled due to their volume attachments being deleted by cleanup"}],"source_content_type":"text/x-python","patch_set":4,"id":"5f7c97a3_cd2032b4","line":27,"range":{"start_line":27,"start_character":7,"end_line":27,"end_character":76},"updated":"2018-08-02 13:49:14.000000000","message":"This is a bit misleading given bug 1488111. I\u0027d maybe word this as:\n\n\"Regression test for bug 1784353 introduced in Queens.\"\n\nThe rest of the description is OK.","commit_id":"a4cb6bf7fabef6c62454fd128d95a7c98686277c"},{"author":{"_account_id":10135,"name":"Lee Yarwood","display_name":"Lee Yarwood","email":"lyarwood@redhat.com","username":"lyarwood"},"change_message_id":"75a982b379e237a03361604188f00039841a6e21","unresolved":false,"context_lines":[{"line_number":24,"context_line":""},{"line_number":25,"context_line":"class TestRescheduleWithVolumesAttached("},{"line_number":26,"context_line":"        test.TestCase, integrated_helpers.InstanceHelperMixin):"},{"line_number":27,"context_line":"    \"\"\"Assert that volume backed instances cannot be rescheduled at present."},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"    This regression test asserts that volume backed instances fail to start"},{"line_number":30,"context_line":"    when rescheduled due to their volume attachments being deleted by cleanup"}],"source_content_type":"text/x-python","patch_set":4,"id":"5f7c97a3_b5fc200e","line":27,"range":{"start_line":27,"start_character":7,"end_line":27,"end_character":76},"in_reply_to":"5f7c97a3_cd2032b4","updated":"2018-08-02 14:32:03.000000000","message":"Done","commit_id":"a4cb6bf7fabef6c62454fd128d95a7c98686277c"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"5f288dcb6f44ec8a6f14eb8b34d7573487a9f72d","unresolved":false,"context_lines":[{"line_number":47,"context_line":"        api_fixture \u003d self.useFixture(nova_fixtures.OSAPIFixture("},{"line_number":48,"context_line":"            api_version\u003d\u0027v2.1\u0027))"},{"line_number":49,"context_line":"        self.api \u003d api_fixture.admin_api"},{"line_number":50,"context_line":"        self.api.microversion \u003d \u00272.14\u0027"},{"line_number":51,"context_line":""},{"line_number":52,"context_line":"        nova.tests.unit.image.fake.stub_out_image_service(self)"},{"line_number":53,"context_line":"        self.addCleanup(nova.tests.unit.image.fake.FakeImageService_reset)"}],"source_content_type":"text/x-python","patch_set":4,"id":"5f7c97a3_356d70cb","line":50,"range":{"start_line":50,"start_character":32,"end_line":50,"end_character":38},"updated":"2018-08-02 13:49:14.000000000","message":"2.14 seems very random, but I\u0027m assuming you just copied this from another test. I\u0027d probably just omit this unless you need something from 2.14.","commit_id":"a4cb6bf7fabef6c62454fd128d95a7c98686277c"},{"author":{"_account_id":10135,"name":"Lee Yarwood","display_name":"Lee Yarwood","email":"lyarwood@redhat.com","username":"lyarwood"},"change_message_id":"75a982b379e237a03361604188f00039841a6e21","unresolved":false,"context_lines":[{"line_number":47,"context_line":"        api_fixture \u003d self.useFixture(nova_fixtures.OSAPIFixture("},{"line_number":48,"context_line":"            api_version\u003d\u0027v2.1\u0027))"},{"line_number":49,"context_line":"        self.api \u003d api_fixture.admin_api"},{"line_number":50,"context_line":"        self.api.microversion \u003d \u00272.14\u0027"},{"line_number":51,"context_line":""},{"line_number":52,"context_line":"        nova.tests.unit.image.fake.stub_out_image_service(self)"},{"line_number":53,"context_line":"        self.addCleanup(nova.tests.unit.image.fake.FakeImageService_reset)"}],"source_content_type":"text/x-python","patch_set":4,"id":"5f7c97a3_78fc3d0b","line":50,"range":{"start_line":50,"start_character":32,"end_line":50,"end_character":38},"in_reply_to":"5f7c97a3_356d70cb","updated":"2018-08-02 14:32:03.000000000","message":"Done","commit_id":"a4cb6bf7fabef6c62454fd128d95a7c98686277c"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"5f288dcb6f44ec8a6f14eb8b34d7573487a9f72d","unresolved":false,"context_lines":[{"line_number":67,"context_line":"        self.image_id \u003d self.api.get_images()[0][\u0027id\u0027]"},{"line_number":68,"context_line":"        self.flavor_id \u003d self.api.get_flavors()[0][\u0027id\u0027]"},{"line_number":69,"context_line":""},{"line_number":70,"context_line":"        self.addCleanup(fake_notifier.reset)"},{"line_number":71,"context_line":""},{"line_number":72,"context_line":"    def test_reschedule_with_volume_attached(self):"},{"line_number":73,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"5f7c97a3_159dd4b9","line":70,"updated":"2018-08-02 13:49:14.000000000","message":"You can remove this since you\u0027re not setting up the fake notifier.","commit_id":"a4cb6bf7fabef6c62454fd128d95a7c98686277c"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"5f288dcb6f44ec8a6f14eb8b34d7573487a9f72d","unresolved":false,"context_lines":[{"line_number":71,"context_line":""},{"line_number":72,"context_line":"    def test_reschedule_with_volume_attached(self):"},{"line_number":73,"context_line":""},{"line_number":74,"context_line":"        # Mock out spawn to always fail with the first attempt"},{"line_number":75,"context_line":"        with mock.patch(\u0027nova.virt.fake.FakeDriver.spawn\u0027) as (mock_spawn):"},{"line_number":76,"context_line":"            mock_spawn.side_effect \u003d [Exception(\u0027Force reschedule\u0027), None]"},{"line_number":77,"context_line":""},{"line_number":78,"context_line":"            # Boot a volume backed instance"},{"line_number":79,"context_line":"            volume_id \u003d nova_fixtures.CinderFixture.IMAGE_BACKED_VOL"}],"source_content_type":"text/x-python","patch_set":4,"id":"5f7c97a3_95dec469","line":76,"range":{"start_line":74,"start_character":8,"end_line":76,"end_character":74},"updated":"2018-08-02 13:49:14.000000000","message":"You can avoid this if you use the FakeRescheduleDriver fake driver before starting the computes:\n\nself.flags(compute_driver\u003d\u0027fake.FakeRescheduleDriver\u0027)","commit_id":"a4cb6bf7fabef6c62454fd128d95a7c98686277c"},{"author":{"_account_id":10135,"name":"Lee Yarwood","display_name":"Lee Yarwood","email":"lyarwood@redhat.com","username":"lyarwood"},"change_message_id":"75a982b379e237a03361604188f00039841a6e21","unresolved":false,"context_lines":[{"line_number":71,"context_line":""},{"line_number":72,"context_line":"    def test_reschedule_with_volume_attached(self):"},{"line_number":73,"context_line":""},{"line_number":74,"context_line":"        # Mock out spawn to always fail with the first attempt"},{"line_number":75,"context_line":"        with mock.patch(\u0027nova.virt.fake.FakeDriver.spawn\u0027) as (mock_spawn):"},{"line_number":76,"context_line":"            mock_spawn.side_effect \u003d [Exception(\u0027Force reschedule\u0027), None]"},{"line_number":77,"context_line":""},{"line_number":78,"context_line":"            # Boot a volume backed instance"},{"line_number":79,"context_line":"            volume_id \u003d nova_fixtures.CinderFixture.IMAGE_BACKED_VOL"}],"source_content_type":"text/x-python","patch_set":4,"id":"5f7c97a3_b82ad575","line":76,"range":{"start_line":74,"start_character":8,"end_line":76,"end_character":74},"in_reply_to":"5f7c97a3_95dec469","updated":"2018-08-02 14:32:03.000000000","message":"Done","commit_id":"a4cb6bf7fabef6c62454fd128d95a7c98686277c"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"5f288dcb6f44ec8a6f14eb8b34d7573487a9f72d","unresolved":false,"context_lines":[{"line_number":92,"context_line":"            # state with no attachments present in the fixture. The instance"},{"line_number":93,"context_line":"            # should obviously be ACTIVE with a single attachment listed."},{"line_number":94,"context_line":"            self._wait_for_state_change(self.api, server_response, \u0027ERROR\u0027)"},{"line_number":95,"context_line":"            self.assertFalse(self.cinder.attachments[\u0027attachment_id\u0027])"},{"line_number":96,"context_line":"            self.assertFalse(self.cinder.attachments[\u0027instance_uuid\u0027])"}],"source_content_type":"text/x-python","patch_set":4,"id":"5f7c97a3_f53ff881","line":95,"range":{"start_line":95,"start_character":12,"end_line":95,"end_character":70},"updated":"2018-08-02 13:49:14.000000000","message":"This would be better as:\n\nself.assertNotIn(\u0027attachment_id\u0027, self.cinder.attachments)","commit_id":"a4cb6bf7fabef6c62454fd128d95a7c98686277c"},{"author":{"_account_id":10135,"name":"Lee Yarwood","display_name":"Lee Yarwood","email":"lyarwood@redhat.com","username":"lyarwood"},"change_message_id":"75a982b379e237a03361604188f00039841a6e21","unresolved":false,"context_lines":[{"line_number":92,"context_line":"            # state with no attachments present in the fixture. The instance"},{"line_number":93,"context_line":"            # should obviously be ACTIVE with a single attachment listed."},{"line_number":94,"context_line":"            self._wait_for_state_change(self.api, server_response, \u0027ERROR\u0027)"},{"line_number":95,"context_line":"            self.assertFalse(self.cinder.attachments[\u0027attachment_id\u0027])"},{"line_number":96,"context_line":"            self.assertFalse(self.cinder.attachments[\u0027instance_uuid\u0027])"}],"source_content_type":"text/x-python","patch_set":4,"id":"5f7c97a3_78c43d0e","line":95,"range":{"start_line":95,"start_character":12,"end_line":95,"end_character":70},"in_reply_to":"5f7c97a3_f53ff881","updated":"2018-08-02 14:32:03.000000000","message":"Yeah, unfortunately the fixture doesn\u0027t make it easy to get the actual attachment_id used, with volume GETs substituting the volume_id in for the attachment_id for attached volumes:\n\nhttps://github.com/openstack/nova/blob/master/nova/tests/fixtures.py#L1429\n\nI\u0027ll try to correct this as part of the first fixture change in this series as this would indeed be cleaner to assert.","commit_id":"a4cb6bf7fabef6c62454fd128d95a7c98686277c"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"c0378c0e3925fe92b327572d1e1b210c2738643a","unresolved":false,"context_lines":[{"line_number":66,"context_line":"        self.flavor_id \u003d self.api.get_flavors()[0][\u0027id\u0027]"},{"line_number":67,"context_line":""},{"line_number":68,"context_line":"    def test_reschedule_with_volume_attached(self):"},{"line_number":69,"context_line":"        # Boot a volume backed instance"},{"line_number":70,"context_line":"        volume_id \u003d nova_fixtures.CinderFixture.IMAGE_BACKED_VOL"},{"line_number":71,"context_line":"        server_request \u003d {"},{"line_number":72,"context_line":"            \u0027name\u0027: \u0027server\u0027,"},{"line_number":73,"context_line":"            \u0027flavorRef\u0027: self.flavor_id,"},{"line_number":74,"context_line":"            \u0027block_device_mapping_v2\u0027: [{"},{"line_number":75,"context_line":"                \u0027boot_index\u0027: 0,"},{"line_number":76,"context_line":"                \u0027uuid\u0027: volume_id,"},{"line_number":77,"context_line":"                \u0027source_type\u0027: \u0027volume\u0027,"},{"line_number":78,"context_line":"                \u0027destination_type\u0027: \u0027volume\u0027}],"},{"line_number":79,"context_line":"        }"},{"line_number":80,"context_line":"        server_response \u003d self.api.post_server({\u0027server\u0027: server_request})"},{"line_number":81,"context_line":"        server_id \u003d server_response[\u0027id\u0027]"},{"line_number":82,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"3f79a3b5_382f33f7","line":79,"range":{"start_line":69,"start_character":8,"end_line":79,"end_character":9},"updated":"2018-08-09 16:41:53.000000000","message":"I wonder what happens with root volumes that nova creates during reschedules when driver.spawn() fails - we don\u0027t delete those do we? So you could end up with \u003e1 volume created for the same instance if we reschedule but ultimately only one is attached as the root volume and the other is orphaned and just consuming volume quota. Separate bug, but something worth investigating.","commit_id":"baf31b3cf5ebc9af355b1f1ab007d046302c5d5c"}]}
