)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":6062,"name":"jichenjc","email":"jichenjc@cn.ibm.com","username":"jichenjc"},"change_message_id":"9ea28774eb96a63534a8179e0d895749c7c5591f","unresolved":false,"context_lines":[{"line_number":26,"context_line":"reporting it as having available capacity which in reality"},{"line_number":27,"context_line":"is not accurate."},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"A release note is included for the (justified) behavior"},{"line_number":30,"context_line":"change in the API. A new microversion should not be required"},{"line_number":31,"context_line":"for this since admins should not have to opt out of broken"},{"line_number":32,"context_line":"behavior. Since this API did not previously expect to return"},{"line_number":33,"context_line":"a 409 response, the \"expected_errors\" decorator is updated"},{"line_number":34,"context_line":"and again, should not require a microversion per the"},{"line_number":35,"context_line":"guidelines:"},{"line_number":36,"context_line":""},{"line_number":37,"context_line":"https://docs.openstack.org/nova/latest/contributor/microversions.html#when-a-microversion-is-not-needed"},{"line_number":38,"context_line":""},{"line_number":39,"context_line":"Change-Id: I0bd63b655ad3d3d39af8d15c781ce0a45efc8e3a"},{"line_number":40,"context_line":"Closes-Bug: #1763183"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"9f6a8fd7_476495b9","line":37,"range":{"start_line":29,"start_character":0,"end_line":37,"end_character":36},"updated":"2018-04-19 09:28:40.000000000","message":"good explanation :)","commit_id":"42f62f1ed2ad76829eb9d40a8b9646a523f6381f"}],"nova/api/openstack/compute/services.py":[{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"47ee929c91782d38f2447d84fda03ffc001144d5","unresolved":false,"context_lines":[{"line_number":218,"context_line":"                # resource accounting in Placement and orphan the compute node"},{"line_number":219,"context_line":"                # resource provider."},{"line_number":220,"context_line":"                instance_uuids \u003d objects.InstanceList.get_uuids_by_host("},{"line_number":221,"context_line":"                    context, service[\u0027host\u0027])"},{"line_number":222,"context_line":"                if instance_uuids:"},{"line_number":223,"context_line":"                    raise webob.exc.HTTPConflict("},{"line_number":224,"context_line":"                        explanation\u003d_(\u0027Unable to delete compute service that \u0027"}],"source_content_type":"text/x-python","patch_set":1,"id":"bf659307_4cae832e","line":221,"updated":"2018-04-13 19:07:01.000000000","message":"This is kindof an expensive way to do this check. For an ironic deployment, this could return a thousand uuids. I guess for most cases currently it should be a smaller order, but..","commit_id":"881a1426c8bcd74063551191f94a111753f1ea5d"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"6fc10a5afa77dc80a3a0d11a3894837371611595","unresolved":false,"context_lines":[{"line_number":218,"context_line":"                # resource accounting in Placement and orphan the compute node"},{"line_number":219,"context_line":"                # resource provider."},{"line_number":220,"context_line":"                instance_uuids \u003d objects.InstanceList.get_uuids_by_host("},{"line_number":221,"context_line":"                    context, service[\u0027host\u0027])"},{"line_number":222,"context_line":"                if instance_uuids:"},{"line_number":223,"context_line":"                    raise webob.exc.HTTPConflict("},{"line_number":224,"context_line":"                        explanation\u003d_(\u0027Unable to delete compute service that \u0027"}],"source_content_type":"text/x-python","patch_set":1,"id":"bf659307_8f224da2","line":221,"in_reply_to":"bf659307_2c0f8f37","updated":"2018-04-13 19:12:41.000000000","message":"We could:\n\n1. Use this now with a TODO to use a COUNT function later.\n2. Optimize get_uuids_by_host to not pull full objects.\n3. do backports (order of 1 and 2 doesn\u0027t really matter)\n4. Add the COUNT function query and use it here which doesn\u0027t get backported.","commit_id":"881a1426c8bcd74063551191f94a111753f1ea5d"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"21086acf1109fb28653e40d1ccdbd4fcfe406d05","unresolved":false,"context_lines":[{"line_number":218,"context_line":"                # resource accounting in Placement and orphan the compute node"},{"line_number":219,"context_line":"                # resource provider."},{"line_number":220,"context_line":"                instance_uuids \u003d objects.InstanceList.get_uuids_by_host("},{"line_number":221,"context_line":"                    context, service[\u0027host\u0027])"},{"line_number":222,"context_line":"                if instance_uuids:"},{"line_number":223,"context_line":"                    raise webob.exc.HTTPConflict("},{"line_number":224,"context_line":"                        explanation\u003d_(\u0027Unable to delete compute service that \u0027"}],"source_content_type":"text/x-python","patch_set":1,"id":"bf659307_2c0f8f37","line":221,"in_reply_to":"bf659307_4cae832e","updated":"2018-04-13 19:09:51.000000000","message":"If you\u0027re asking for a new function to do a COUNT SQL query, we can do that, but then it\u0027s going to be an RPC version bump on the object and then we can\u0027t backport this.\n\nI used get_uuids_by_host since it\u0027s at least something we can optimize to just fetch UUIDs rather than full objects (there is a NOTE in the function to optimize it).\n\nAlso, this isn\u0027t something I\u0027d expect someone to be doing a lot.","commit_id":"881a1426c8bcd74063551191f94a111753f1ea5d"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"3a6f2fdb060a966d3d501f70197208bcdf728a2c","unresolved":false,"context_lines":[{"line_number":218,"context_line":"                # resource accounting in Placement and orphan the compute node"},{"line_number":219,"context_line":"                # resource provider."},{"line_number":220,"context_line":"                instance_uuids \u003d objects.InstanceList.get_uuids_by_host("},{"line_number":221,"context_line":"                    context, service[\u0027host\u0027])"},{"line_number":222,"context_line":"                if instance_uuids:"},{"line_number":223,"context_line":"                    raise webob.exc.HTTPConflict("},{"line_number":224,"context_line":"                        explanation\u003d_(\u0027Unable to delete compute service that \u0027"}],"source_content_type":"text/x-python","patch_set":1,"id":"bf659307_2fc78198","line":221,"in_reply_to":"bf659307_8f224da2","updated":"2018-04-13 19:25:12.000000000","message":"Sounds like a plan to me.\n\nI looked at whether something would be possible with HostMapping.host -\u003e HostMapping.cell_id -\u003e InstanceMapping but that would also pick up deleted instances that have not yet been archived, unfortunately (and in the case of backports, even archived deleted instances will have InstanceMappings). No other ideas are coming to mind yet.","commit_id":"881a1426c8bcd74063551191f94a111753f1ea5d"},{"author":{"_account_id":26936,"name":"Surya Seetharaman","email":"suryaseetharaman.9@gmail.com","username":"tssurya"},"change_message_id":"037d27fcbfb5246d8212405aaa3f828a59b2262e","unresolved":false,"context_lines":[{"line_number":219,"context_line":"                # resource provider."},{"line_number":220,"context_line":"                # TODO(mriedem): Use a COUNT SQL query-based function instead"},{"line_number":221,"context_line":"                # of InstanceList.get_uuids_by_host for performance."},{"line_number":222,"context_line":"                instance_uuids \u003d objects.InstanceList.get_uuids_by_host("},{"line_number":223,"context_line":"                    context, service[\u0027host\u0027])"},{"line_number":224,"context_line":"                if instance_uuids:"},{"line_number":225,"context_line":"                    raise webob.exc.HTTPConflict("}],"source_content_type":"text/x-python","patch_set":2,"id":"9f6a8fd7_8f622016","line":222,"range":{"start_line":222,"start_character":54,"end_line":222,"end_character":72},"updated":"2018-04-16 09:43:09.000000000","message":"we could maybe reuse this function -\u003e https://github.com/openstack/nova/blob/54dc7048a48799ed980138e3524e4ebfc544eb8c/nova/db/sqlalchemy/api.py#L2596 after defining the the interface in db/api.py for get_uuids_by_host as it should be?","commit_id":"0fc0d12d092c6d3dfe282fa4dafa414f08e97ea7"},{"author":{"_account_id":26936,"name":"Surya Seetharaman","email":"suryaseetharaman.9@gmail.com","username":"tssurya"},"change_message_id":"acc08e08d7fea1a9e96fa4122e04f45068a31c24","unresolved":false,"context_lines":[{"line_number":219,"context_line":"                # resource provider."},{"line_number":220,"context_line":"                # TODO(mriedem): Use a COUNT SQL query-based function instead"},{"line_number":221,"context_line":"                # of InstanceList.get_uuids_by_host for performance."},{"line_number":222,"context_line":"                instance_uuids \u003d objects.InstanceList.get_uuids_by_host("},{"line_number":223,"context_line":"                    context, service[\u0027host\u0027])"},{"line_number":224,"context_line":"                if instance_uuids:"},{"line_number":225,"context_line":"                    raise webob.exc.HTTPConflict("}],"source_content_type":"text/x-python","patch_set":2,"id":"9f6a8fd7_cf06d821","line":222,"range":{"start_line":222,"start_character":54,"end_line":222,"end_character":72},"in_reply_to":"9f6a8fd7_8f622016","updated":"2018-04-16 09:45:05.000000000","message":"Not sure if tweaking the get_uuids_by_host can get a backport pass though.","commit_id":"0fc0d12d092c6d3dfe282fa4dafa414f08e97ea7"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"dc7cc24c161b9a49eb753ef728cf52a185dbe3b6","unresolved":false,"context_lines":[{"line_number":219,"context_line":"                # resource provider."},{"line_number":220,"context_line":"                # TODO(mriedem): Use a COUNT SQL query-based function instead"},{"line_number":221,"context_line":"                # of InstanceList.get_uuids_by_host for performance."},{"line_number":222,"context_line":"                instance_uuids \u003d objects.InstanceList.get_uuids_by_host("},{"line_number":223,"context_line":"                    context, service[\u0027host\u0027])"},{"line_number":224,"context_line":"                if instance_uuids:"},{"line_number":225,"context_line":"                    raise webob.exc.HTTPConflict("}],"source_content_type":"text/x-python","patch_set":2,"id":"9f6a8fd7_eb35c2f8","line":222,"range":{"start_line":222,"start_character":54,"end_line":222,"end_character":72},"in_reply_to":"9f6a8fd7_cf06d821","updated":"2018-04-16 18:20:33.000000000","message":"As long as the objects.InstanceList.get_uuids_by_host interface doesn\u0027t change I think it\u0027s OK to change the implementation of that interface, but I\u0027d prefer to do that in a separate change. If people insist that it comes before this patch, then I can start working on it.","commit_id":"0fc0d12d092c6d3dfe282fa4dafa414f08e97ea7"},{"author":{"_account_id":26936,"name":"Surya Seetharaman","email":"suryaseetharaman.9@gmail.com","username":"tssurya"},"change_message_id":"dff83780787689daa4c703543f85b2b21c785884","unresolved":false,"context_lines":[{"line_number":219,"context_line":"                # resource provider."},{"line_number":220,"context_line":"                # TODO(mriedem): Use a COUNT SQL query-based function instead"},{"line_number":221,"context_line":"                # of InstanceList.get_uuids_by_host for performance."},{"line_number":222,"context_line":"                instance_uuids \u003d objects.InstanceList.get_uuids_by_host("},{"line_number":223,"context_line":"                    context, service[\u0027host\u0027])"},{"line_number":224,"context_line":"                if instance_uuids:"},{"line_number":225,"context_line":"                    raise webob.exc.HTTPConflict("}],"source_content_type":"text/x-python","patch_set":2,"id":"9f6a8fd7_6152336a","line":222,"range":{"start_line":222,"start_character":54,"end_line":222,"end_character":72},"in_reply_to":"9f6a8fd7_eb35c2f8","updated":"2018-04-16 19:23:17.000000000","message":"ack.","commit_id":"0fc0d12d092c6d3dfe282fa4dafa414f08e97ea7"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"417a9536811466a0b02edbadc5c895c41c740743","unresolved":false,"context_lines":[{"line_number":211,"context_line":"        try:"},{"line_number":212,"context_line":"            service \u003d self.host_api.service_get_by_id(context, id)"},{"line_number":213,"context_line":"            # remove the service from all the aggregates in which it\u0027s included"},{"line_number":214,"context_line":"            if service.binary \u003d\u003d \u0027nova-compute\u0027:"},{"line_number":215,"context_line":"                # Check to see if there are any instances on this compute host"},{"line_number":216,"context_line":"                # because if there are, we need to block the service (and"},{"line_number":217,"context_line":"                # related compute_nodes record) delete since it will impact"}],"source_content_type":"text/x-python","patch_set":4,"id":"9f6a8fd7_0d61c5d3","line":214,"range":{"start_line":214,"start_character":12,"end_line":214,"end_character":48},"updated":"2018-04-20 02:58:50.000000000","message":"It would be good to have unittest to ensure this check only happened for nova-compute service.","commit_id":"42f62f1ed2ad76829eb9d40a8b9646a523f6381f"}],"nova/tests/functional/wsgi/test_services.py":[{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"9118a7784f99d4b73a01552b629587b4523236b7","unresolved":false,"context_lines":[{"line_number":145,"context_line":"        # resource provider. We have to first stop the compute service so"},{"line_number":146,"context_line":"        # it doesn\u0027t recreate the compute node during the"},{"line_number":147,"context_line":"        # update_available_resource periodic task."},{"line_number":148,"context_line":"        self.admin_api.put_service(service[\u0027id\u0027], {\u0027forced_down\u0027: True})"},{"line_number":149,"context_line":"        self.compute.stop()"},{"line_number":150,"context_line":"        # The first attempt should fail since there is an instance on the"},{"line_number":151,"context_line":"        # compute host."}],"source_content_type":"text/x-python","patch_set":2,"id":"9f6a8fd7_c07bc2bb","line":148,"range":{"start_line":148,"start_character":9,"end_line":148,"end_character":72},"updated":"2018-04-18 15:47:50.000000000","message":"Why wasn\u0027t this in the previous patch?","commit_id":"0fc0d12d092c6d3dfe282fa4dafa414f08e97ea7"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"afa69c98c98a4369a4f3355386202975630f5aba","unresolved":false,"context_lines":[{"line_number":145,"context_line":"        # resource provider. We have to first stop the compute service so"},{"line_number":146,"context_line":"        # it doesn\u0027t recreate the compute node during the"},{"line_number":147,"context_line":"        # update_available_resource periodic task."},{"line_number":148,"context_line":"        self.admin_api.put_service(service[\u0027id\u0027], {\u0027forced_down\u0027: True})"},{"line_number":149,"context_line":"        self.compute.stop()"},{"line_number":150,"context_line":"        # The first attempt should fail since there is an instance on the"},{"line_number":151,"context_line":"        # compute host."}],"source_content_type":"text/x-python","patch_set":2,"id":"9f6a8fd7_7f9b68c8","line":148,"range":{"start_line":148,"start_character":9,"end_line":148,"end_character":72},"in_reply_to":"9f6a8fd7_9d620c3e","updated":"2018-04-18 23:05:42.000000000","message":"Done","commit_id":"0fc0d12d092c6d3dfe282fa4dafa414f08e97ea7"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"53035c44f50282628205c63b02286fce8c254943","unresolved":false,"context_lines":[{"line_number":145,"context_line":"        # resource provider. We have to first stop the compute service so"},{"line_number":146,"context_line":"        # it doesn\u0027t recreate the compute node during the"},{"line_number":147,"context_line":"        # update_available_resource periodic task."},{"line_number":148,"context_line":"        self.admin_api.put_service(service[\u0027id\u0027], {\u0027forced_down\u0027: True})"},{"line_number":149,"context_line":"        self.compute.stop()"},{"line_number":150,"context_line":"        # The first attempt should fail since there is an instance on the"},{"line_number":151,"context_line":"        # compute host."}],"source_content_type":"text/x-python","patch_set":2,"id":"9f6a8fd7_9d620c3e","line":148,"range":{"start_line":148,"start_character":9,"end_line":148,"end_character":72},"in_reply_to":"9f6a8fd7_c07bc2bb","updated":"2018-04-18 18:19:00.000000000","message":"Hmm, might have been a rebase failure.","commit_id":"0fc0d12d092c6d3dfe282fa4dafa414f08e97ea7"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"9118a7784f99d4b73a01552b629587b4523236b7","unresolved":false,"context_lines":[{"line_number":153,"context_line":"                               self.admin_api.api_delete,"},{"line_number":154,"context_line":"                               \u0027/os-services/%s\u0027 % service[\u0027id\u0027])"},{"line_number":155,"context_line":"        self.assertIn(\u0027Unable to delete compute service that is hosting \u0027"},{"line_number":156,"context_line":"                      \u0027instances.\u0027, six.text_type(ex))"},{"line_number":157,"context_line":""},{"line_number":158,"context_line":"        # Now delete the instance and wait for it to be gone."},{"line_number":159,"context_line":"        self.api.delete_server(server[\u0027id\u0027])"}],"source_content_type":"text/x-python","patch_set":2,"id":"9f6a8fd7_20463e7e","line":156,"updated":"2018-04-18 15:47:50.000000000","message":"Is there a way to confirm that the HTTP status code was 409?","commit_id":"0fc0d12d092c6d3dfe282fa4dafa414f08e97ea7"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"afa69c98c98a4369a4f3355386202975630f5aba","unresolved":false,"context_lines":[{"line_number":153,"context_line":"                               self.admin_api.api_delete,"},{"line_number":154,"context_line":"                               \u0027/os-services/%s\u0027 % service[\u0027id\u0027])"},{"line_number":155,"context_line":"        self.assertIn(\u0027Unable to delete compute service that is hosting \u0027"},{"line_number":156,"context_line":"                      \u0027instances.\u0027, six.text_type(ex))"},{"line_number":157,"context_line":""},{"line_number":158,"context_line":"        # Now delete the instance and wait for it to be gone."},{"line_number":159,"context_line":"        self.api.delete_server(server[\u0027id\u0027])"}],"source_content_type":"text/x-python","patch_set":2,"id":"9f6a8fd7_9f9e7cb6","line":156,"in_reply_to":"9f6a8fd7_1d56fc5d","updated":"2018-04-18 23:05:42.000000000","message":"Done","commit_id":"0fc0d12d092c6d3dfe282fa4dafa414f08e97ea7"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"53035c44f50282628205c63b02286fce8c254943","unresolved":false,"context_lines":[{"line_number":153,"context_line":"                               self.admin_api.api_delete,"},{"line_number":154,"context_line":"                               \u0027/os-services/%s\u0027 % service[\u0027id\u0027])"},{"line_number":155,"context_line":"        self.assertIn(\u0027Unable to delete compute service that is hosting \u0027"},{"line_number":156,"context_line":"                      \u0027instances.\u0027, six.text_type(ex))"},{"line_number":157,"context_line":""},{"line_number":158,"context_line":"        # Now delete the instance and wait for it to be gone."},{"line_number":159,"context_line":"        self.api.delete_server(server[\u0027id\u0027])"}],"source_content_type":"text/x-python","patch_set":2,"id":"9f6a8fd7_1d56fc5d","line":156,"in_reply_to":"9f6a8fd7_20463e7e","updated":"2018-04-18 18:19:00.000000000","message":"Yeah I can check that:\n\nhttps://github.com/openstack/nova/blob/324899c621ee02d877122ba3412712ebb92831f2/nova/tests/functional/api/client.py#L70","commit_id":"0fc0d12d092c6d3dfe282fa4dafa414f08e97ea7"}]}
