)]}'
{"nova/tests/functional/test_servers.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"e12b054601957d322419fa9b1d8f1d80c8f4705a","unresolved":false,"context_lines":[{"line_number":3040,"context_line":""},{"line_number":3041,"context_line":"        source_host \u003d server[\u0027OS-EXT-SRV-ATTR:host\u0027]"},{"line_number":3042,"context_line":"        target_host \u003d \u0027host2\u0027 if source_host \u003d\u003d \u0027host1\u0027 else \u0027host1\u0027"},{"line_number":3043,"context_line":"        ex \u003d self.assertRaises(client.OpenStackApiException,"},{"line_number":3044,"context_line":"                               self.api.post_server_action,"},{"line_number":3045,"context_line":"                               server[\u0027id\u0027],"},{"line_number":3046,"context_line":"                               {\u0027migrate\u0027: {\u0027host\u0027: target_host}})"}],"source_content_type":"text/x-python","patch_set":3,"id":"ff82abbf_dc178545","line":3043,"updated":"2017-11-30 13:53:41.000000000","message":"I was thinking about this, and the random failures, and when it fails, it\u0027s due to ComputeHostNotFound, which now that I think about that, I\u0027m not sure why this doesn\u0027t *always* fail with ComputeHostNotFound. Because if we create the server in cell1, when we target it to the host in cell2, the compute node lookup in the API code is using the context which is targeted for cell1 when it looks up the instance (see the _get_instance method in the compute API code). So we should always be hitting a ComputeHostNotFound error. My guess is it\u0027s an issue with the CellDatabase fixture using cell1 as the default cell, so if we land in cell2, it can actually lookup host1 because it defaults to that cell.\n\nSo maybe we can make this more predictable if we target the original host that the server was created on to be host1.","commit_id":"80a82406ec5aea657fd1c18aaf5c0b736a925712"},{"author":{"_account_id":7634,"name":"Takashi Natsume","email":"takanattie@gmail.com","username":"natsumet"},"change_message_id":"fa2cecfe736b0fe6be580476a28e9f10e8ff2abd","unresolved":false,"context_lines":[{"line_number":3040,"context_line":""},{"line_number":3041,"context_line":"        source_host \u003d server[\u0027OS-EXT-SRV-ATTR:host\u0027]"},{"line_number":3042,"context_line":"        target_host \u003d \u0027host2\u0027 if source_host \u003d\u003d \u0027host1\u0027 else \u0027host1\u0027"},{"line_number":3043,"context_line":"        ex \u003d self.assertRaises(client.OpenStackApiException,"},{"line_number":3044,"context_line":"                               self.api.post_server_action,"},{"line_number":3045,"context_line":"                               server[\u0027id\u0027],"},{"line_number":3046,"context_line":"                               {\u0027migrate\u0027: {\u0027host\u0027: target_host}})"}],"source_content_type":"text/x-python","patch_set":3,"id":"ff82abbf_a9791e94","line":3043,"in_reply_to":"ff82abbf_dc178545","updated":"2017-11-30 14:58:41.000000000","message":"In my local environment, the following test always succeeds.\nSo I have no ideas about why the test in this file fails.\n\nhttps://review.openstack.org/#/c/408964/109/nova/tests/functional/test_servers.py@3050\n(*1)\n\nBut if adding fake.set_nodes([\u0027hostname\u0027]) before self.start_service, the test(*1) always fails.\nSo my guess is that there is something wrong in fake libvirt driver and CellDatabase fixture.","commit_id":"80a82406ec5aea657fd1c18aaf5c0b736a925712"},{"author":{"_account_id":7634,"name":"Takashi Natsume","email":"takanattie@gmail.com","username":"natsumet"},"change_message_id":"461f4b825e31a4cf43ec4e4a02d1b2db6c1b8348","unresolved":false,"context_lines":[{"line_number":3133,"context_line":"                               self.api.post_server_action,"},{"line_number":3134,"context_line":"                               server[\u0027id\u0027],"},{"line_number":3135,"context_line":"                               {\u0027migrate\u0027: {\u0027host\u0027: \u0027host2\u0027}})"},{"line_number":3136,"context_line":"        # When the API pulls the instance out of cell1, the context is targeted"},{"line_number":3137,"context_line":"        # to cell1, so when the compute API resize() method attempts to lookup"},{"line_number":3138,"context_line":"        # the target host in cell1, it will result in a ComputeHostNotFound"},{"line_number":3139,"context_line":"        # error."},{"line_number":3140,"context_line":"        self.assertEqual(400, ex.response.status_code)"},{"line_number":3141,"context_line":"        self.assertIn(\u0027Compute host host2 could not be found\u0027,"},{"line_number":3142,"context_line":"                      six.text_type(ex))"}],"source_content_type":"text/x-python","patch_set":6,"id":"9f91af0f_5549a3cd","line":3139,"range":{"start_line":3136,"start_character":0,"end_line":3139,"end_character":16},"updated":"2018-01-05 08:47:12.000000000","message":"You are right. I understand why ComputeHostNotFound is raised. Thanks.\n\nhttps://github.com/openstack/nova/blob/d19e1252d5f2f8e8b54a276003f842ee00641026/nova/compute/api.py#L2224","commit_id":"20435f961f7156f2e39911ff71b621be9a0d6873"},{"author":{"_account_id":6167,"name":"Ken\u0027ichi Ohmichi","email":"ken1ohmichi@gmail.com","username":"oomichi"},"change_message_id":"3a564ee3c09924a76ae014e5815edade225e2337","unresolved":false,"context_lines":[{"line_number":3138,"context_line":"        # the target host in cell1, it will result in a ComputeHostNotFound"},{"line_number":3139,"context_line":"        # error."},{"line_number":3140,"context_line":"        self.assertEqual(400, ex.response.status_code)"},{"line_number":3141,"context_line":"        self.assertIn(\u0027Compute host host2 could not be found\u0027,"},{"line_number":3142,"context_line":"                      six.text_type(ex))"},{"line_number":3143,"context_line":""},{"line_number":3144,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"7f96bb07_45d6fcc5","line":3141,"updated":"2018-01-12 18:23:16.000000000","message":"hopefully it is great to contain \" in this cell\" or something in the error message for users to avoid confusions.","commit_id":"20435f961f7156f2e39911ff71b621be9a0d6873"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"804532c62ae72c09eccbd283776d94be6874e206","unresolved":false,"context_lines":[{"line_number":3138,"context_line":"        # the target host in cell1, it will result in a ComputeHostNotFound"},{"line_number":3139,"context_line":"        # error."},{"line_number":3140,"context_line":"        self.assertEqual(400, ex.response.status_code)"},{"line_number":3141,"context_line":"        self.assertIn(\u0027Compute host host2 could not be found\u0027,"},{"line_number":3142,"context_line":"                      six.text_type(ex))"},{"line_number":3143,"context_line":""},{"line_number":3144,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"9f6a8fd7_4f73a3e8","line":3141,"in_reply_to":"7f96bb07_45d6fcc5","updated":"2018-04-16 13:14:54.000000000","message":"I think we generally try to avoid leaking information about cells out of the REST API.","commit_id":"20435f961f7156f2e39911ff71b621be9a0d6873"}]}
