)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"33355fb272b913cce2ce2d2476e19c4a33f707b0","unresolved":false,"context_lines":[{"line_number":10,"context_line":"* boot, shelve, unshelve, delete"},{"line_number":11,"context_line":"* boot shelve, shelve offload, unshelve, delete"},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"The second scenarion seems faulty and therefore that test case now"},{"line_number":14,"context_line":"asserts the wrong behavior but contains the expected behavior as"},{"line_number":15,"context_line":"commented out asserts."},{"line_number":16,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"9f436f4f_e8b080df","line":13,"range":{"start_line":13,"start_character":19,"end_line":13,"end_character":21},"updated":"2017-08-16 07:46:11.000000000","message":"s/scenarion/scenario/","commit_id":"0888d998c5c9fec487d7ac027038922ef012639a"}],"nova/tests/functional/test_servers.py":[{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"33355fb272b913cce2ce2d2476e19c4a33f707b0","unresolved":false,"context_lines":[{"line_number":1682,"context_line":"        self.api.post_server_action(server[\u0027id\u0027], req)"},{"line_number":1683,"context_line":"        self._wait_for_state_change(self.api, server, \u0027SHELVED\u0027)"},{"line_number":1684,"context_line":""},{"line_number":1685,"context_line":"        # the host should keep the reservation while the instance is shelved"},{"line_number":1686,"context_line":"        source_usages \u003d self._get_provider_usages(source_rp_uuid)"},{"line_number":1687,"context_line":"        self.assertFlavorMatchesAllocation(self.flavor1, source_usages)"},{"line_number":1688,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"9f436f4f_8825740b","line":1685,"range":{"start_line":1685,"start_character":26,"end_line":1685,"end_character":46},"updated":"2017-08-16 07:46:11.000000000","message":"let\u0027s not use the term \"reservation\" here, so as not to confuse readers with the same term used in quota-land.\n\nHow about \"maintain the existing allocation for this instance\"","commit_id":"0888d998c5c9fec487d7ac027038922ef012639a"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"e8d1809becf9ae8493b1d6b359eed56228f13a15","unresolved":false,"context_lines":[{"line_number":1682,"context_line":"        self.api.post_server_action(server[\u0027id\u0027], req)"},{"line_number":1683,"context_line":"        self._wait_for_state_change(self.api, server, \u0027SHELVED\u0027)"},{"line_number":1684,"context_line":""},{"line_number":1685,"context_line":"        # the host should keep the reservation while the instance is shelved"},{"line_number":1686,"context_line":"        source_usages \u003d self._get_provider_usages(source_rp_uuid)"},{"line_number":1687,"context_line":"        self.assertFlavorMatchesAllocation(self.flavor1, source_usages)"},{"line_number":1688,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"9f436f4f_f9fbabba","line":1685,"range":{"start_line":1685,"start_character":26,"end_line":1685,"end_character":46},"in_reply_to":"9f436f4f_8825740b","updated":"2017-08-16 14:42:02.000000000","message":"Done","commit_id":"0888d998c5c9fec487d7ac027038922ef012639a"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"33355fb272b913cce2ce2d2476e19c4a33f707b0","unresolved":false,"context_lines":[{"line_number":1713,"context_line":"        self._delete_and_check_allocations("},{"line_number":1714,"context_line":"            server, source_rp_uuid, source_rp_uuid)"},{"line_number":1715,"context_line":""},{"line_number":1716,"context_line":"    def test_shelve_offload_unshelve(self):"},{"line_number":1717,"context_line":"        # avoid automatic shelve offload as the test will trigger it"},{"line_number":1718,"context_line":"        self.flags(shelved_offload_time\u003d-1)"},{"line_number":1719,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"9f436f4f_e8b6408a","line":1716,"updated":"2017-08-16 07:46:11.000000000","message":"Let\u0027s call this test_shelve_offload_unshelve_diff_host() to make it clear we\u0027re deliberately attempting to unshelve to a different host than the host the instance was shelved from. We may want to add another functional test that stresses the unshelve-to-same-host scenario as well, though I understand why you don\u0027t do it in this patch (the bug in question would not be reproduceable.)","commit_id":"0888d998c5c9fec487d7ac027038922ef012639a"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"e8d1809becf9ae8493b1d6b359eed56228f13a15","unresolved":false,"context_lines":[{"line_number":1713,"context_line":"        self._delete_and_check_allocations("},{"line_number":1714,"context_line":"            server, source_rp_uuid, source_rp_uuid)"},{"line_number":1715,"context_line":""},{"line_number":1716,"context_line":"    def test_shelve_offload_unshelve(self):"},{"line_number":1717,"context_line":"        # avoid automatic shelve offload as the test will trigger it"},{"line_number":1718,"context_line":"        self.flags(shelved_offload_time\u003d-1)"},{"line_number":1719,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"9f436f4f_e78c2637","line":1716,"in_reply_to":"9f436f4f_e8b6408a","updated":"2017-08-16 14:42:02.000000000","message":"Good point. Actually the test_shelve_offload_unshelve_same_host() case is also meaningful and I just found out that it is buggy too. So I added a separate test case for that as well.","commit_id":"0888d998c5c9fec487d7ac027038922ef012639a"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"33355fb272b913cce2ce2d2476e19c4a33f707b0","unresolved":false,"context_lines":[{"line_number":1738,"context_line":"        allocations \u003d self._get_allocations_by_server_uuid(server[\u0027id\u0027])"},{"line_number":1739,"context_line":"        self.assertEqual(1, len(allocations))"},{"line_number":1740,"context_line":"        allocation \u003d allocations[source_rp_uuid][\u0027resources\u0027]"},{"line_number":1741,"context_line":"        self.assertFlavorMatchesAllocation(self.flavor1, allocation)"},{"line_number":1742,"context_line":""},{"line_number":1743,"context_line":"        req \u003d {"},{"line_number":1744,"context_line":"            \u0027shelveOffload\u0027: {}"}],"source_content_type":"text/x-python","patch_set":3,"id":"9f436f4f_28656846","line":1741,"updated":"2017-08-16 07:46:11.000000000","message":"Consider placing the code from lines 1717-1741 and 1670-1694 into a helper function for setting up, shelving an instance and checking state of allocations after reaching the SHELVED state terminal.","commit_id":"0888d998c5c9fec487d7ac027038922ef012639a"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"e8d1809becf9ae8493b1d6b359eed56228f13a15","unresolved":false,"context_lines":[{"line_number":1738,"context_line":"        allocations \u003d self._get_allocations_by_server_uuid(server[\u0027id\u0027])"},{"line_number":1739,"context_line":"        self.assertEqual(1, len(allocations))"},{"line_number":1740,"context_line":"        allocation \u003d allocations[source_rp_uuid][\u0027resources\u0027]"},{"line_number":1741,"context_line":"        self.assertFlavorMatchesAllocation(self.flavor1, allocation)"},{"line_number":1742,"context_line":""},{"line_number":1743,"context_line":"        req \u003d {"},{"line_number":1744,"context_line":"            \u0027shelveOffload\u0027: {}"}],"source_content_type":"text/x-python","patch_set":3,"id":"9f436f4f_99e5bfde","line":1741,"in_reply_to":"9f436f4f_28656846","updated":"2017-08-16 14:42:02.000000000","message":"Done","commit_id":"0888d998c5c9fec487d7ac027038922ef012639a"},{"author":{"_account_id":8556,"name":"Ghanshyam Maan","display_name":"Ghanshyam Maan","email":"gmaan.os14@gmail.com","username":"ghanshyam"},"change_message_id":"029d2017305f544675609612b4ce2135bce8bb5f","unresolved":false,"context_lines":[{"line_number":1747,"context_line":"        self._wait_for_state_change(self.api, server, \u0027SHELVED_OFFLOADED\u0027)"},{"line_number":1748,"context_line":""},{"line_number":1749,"context_line":"        source_usages \u003d self._get_provider_usages(source_rp_uuid)"},{"line_number":1750,"context_line":"        # NOTE(gibi): this is bug 1710249 where shelve offload doesn\u0027t free up"},{"line_number":1751,"context_line":"        # the resources"},{"line_number":1752,"context_line":"        self.assertFlavorMatchesAllocation(self.flavor1, source_usages)"},{"line_number":1753,"context_line":"        # NOTE(gibi): after fixing bug 1710249 the following should be true"}],"source_content_type":"text/x-python","patch_set":3,"id":"9f436f4f_915374e2","line":1750,"range":{"start_line":1750,"start_character":34,"end_line":1750,"end_character":41},"updated":"2017-08-15 14:28:09.000000000","message":"yea, currently resources are not freed after offload the instance.","commit_id":"0888d998c5c9fec487d7ac027038922ef012639a"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"33355fb272b913cce2ce2d2476e19c4a33f707b0","unresolved":false,"context_lines":[{"line_number":1766,"context_line":""},{"line_number":1767,"context_line":"        # NOTE(gibi): after fixing bug 1710249 the following should be true"},{"line_number":1768,"context_line":"        # after offload there should be no allocations"},{"line_number":1769,"context_line":"        # self.assertEqual(0, len(allocations))"},{"line_number":1770,"context_line":""},{"line_number":1771,"context_line":"        # unshelve after shelve offload will do scheduling, to make the test"},{"line_number":1772,"context_line":"        # stable disable one of the compute hosts"}],"source_content_type":"text/x-python","patch_set":3,"id":"9f436f4f_08f62464","line":1769,"updated":"2017-08-16 07:46:11.000000000","message":"k, lines 1750-1769 good. clearly shows the problem in bug 1710249","commit_id":"0888d998c5c9fec487d7ac027038922ef012639a"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"33355fb272b913cce2ce2d2476e19c4a33f707b0","unresolved":false,"context_lines":[{"line_number":1805,"context_line":"        # self.assertFlavorMatchesAllocation(self.flavor1, allocation)"},{"line_number":1806,"context_line":""},{"line_number":1807,"context_line":"        self._delete_and_check_allocations("},{"line_number":1808,"context_line":"            server, source_rp_uuid, source_rp_uuid)"}],"source_content_type":"text/x-python","patch_set":3,"id":"9f436f4f_08374401","line":1808,"updated":"2017-08-16 07:46:11.000000000","message":"k, all good.","commit_id":"0888d998c5c9fec487d7ac027038922ef012639a"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"d29e14b62b307a56253d0b92fc5f546566830f4e","unresolved":false,"context_lines":[{"line_number":1666,"context_line":"        self._delete_and_check_allocations("},{"line_number":1667,"context_line":"            server, source_rp_uuid, dest_rp_uuid)"},{"line_number":1668,"context_line":""},{"line_number":1669,"context_line":"    def _boot_then_shelve_and_check_allocations(self, hostname, rp_uuid):"},{"line_number":1670,"context_line":"        # avoid automatic shelve offloading"},{"line_number":1671,"context_line":"        self.flags(shelved_offload_time\u003d-1)"},{"line_number":1672,"context_line":"        server \u003d self._boot_and_check_allocations("}],"source_content_type":"text/x-python","patch_set":4,"id":"9f436f4f_3efe956b","line":1669,"range":{"start_line":1669,"start_character":14,"end_line":1669,"end_character":19},"updated":"2017-08-17 15:36:43.000000000","message":"meh, can probably just call it _boot_shelve_and_check_allocations() :)","commit_id":"13c39b1e79fa4e4a697ec3df5bea9b2470cc3deb"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"d29e14b62b307a56253d0b92fc5f546566830f4e","unresolved":false,"context_lines":[{"line_number":1761,"context_line":"        self.api.post_server_action(server[\u0027id\u0027], req)"},{"line_number":1762,"context_line":"        server \u003d self._wait_for_state_change(self.api, server, \u0027ACTIVE\u0027)"},{"line_number":1763,"context_line":"        # unshelving an offloaded instance will call the scheduler so the"},{"line_number":1764,"context_line":"        # instance might end up on a different host"},{"line_number":1765,"context_line":"        current_hostname \u003d server[\u0027OS-EXT-SRV-ATTR:host\u0027]"},{"line_number":1766,"context_line":"        self.assertEqual(current_hostname, self._other_hostname("},{"line_number":1767,"context_line":"            source_hostname))"}],"source_content_type":"text/x-python","patch_set":4,"id":"9f436f4f_fe25ad0b","line":1764,"range":{"start_line":1764,"start_character":19,"end_line":1764,"end_character":24},"updated":"2017-08-17 15:36:43.000000000","message":"s/might/should/","commit_id":"13c39b1e79fa4e4a697ec3df5bea9b2470cc3deb"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"d29e14b62b307a56253d0b92fc5f546566830f4e","unresolved":false,"context_lines":[{"line_number":1783,"context_line":"        # NOTE(gibi): after fixing bug 1710249 the following should be true"},{"line_number":1784,"context_line":"        # self.assertEqual(1, len(allocations))"},{"line_number":1785,"context_line":"        # allocation \u003d allocations[current_rp_uuid][\u0027resources\u0027]"},{"line_number":1786,"context_line":"        # self.assertFlavorMatchesAllocation(self.flavor1, allocation)"},{"line_number":1787,"context_line":""},{"line_number":1788,"context_line":"        self._delete_and_check_allocations("},{"line_number":1789,"context_line":"            server, source_rp_uuid, source_rp_uuid)"}],"source_content_type":"text/x-python","patch_set":4,"id":"9f436f4f_5e7cb9ea","line":1786,"updated":"2017-08-17 15:36:43.000000000","message":"yup, good.","commit_id":"13c39b1e79fa4e4a697ec3df5bea9b2470cc3deb"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"d29e14b62b307a56253d0b92fc5f546566830f4e","unresolved":false,"context_lines":[{"line_number":1798,"context_line":""},{"line_number":1799,"context_line":"        # unshelve after shelve offload will do scheduling. this test case"},{"line_number":1800,"context_line":"        # wants to test the scenario when the scheduler select the same host"},{"line_number":1801,"context_line":"        # to ushelve the instance. So we disable the other host."},{"line_number":1802,"context_line":"        source_service_id \u003d self.admin_api.get_services("},{"line_number":1803,"context_line":"            host\u003dself._other_hostname(source_hostname),"},{"line_number":1804,"context_line":"            binary\u003d\u0027nova-compute\u0027)[0][\u0027id\u0027]"}],"source_content_type":"text/x-python","patch_set":4,"id":"9f436f4f_fe6a4d19","line":1801,"range":{"start_line":1801,"start_character":13,"end_line":1801,"end_character":20},"updated":"2017-08-17 15:36:43.000000000","message":"s/ushelve/unshelve/","commit_id":"13c39b1e79fa4e4a697ec3df5bea9b2470cc3deb"}]}
