)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":10135,"name":"Lee Yarwood","display_name":"Lee Yarwood","email":"lyarwood@redhat.com","username":"lyarwood"},"change_message_id":"92e27b1fdb5361fc90683007ff4ba169daaa945a","unresolved":true,"context_lines":[{"line_number":4,"context_line":"Commit:     Balazs Gibizer \u003cbalazs.gibizer@est.tech\u003e"},{"line_number":5,"context_line":"CommitDate: 2021-08-07 12:32:24 +0200"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Handle if placement in down during interface attach"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"We don\u0027t have much to do but at least we can raise a proper exception"},{"line_number":10,"context_line":"from the compute that informs the caller what failed."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"b18de698_e78febf9","line":7,"range":{"start_line":7,"start_character":20,"end_line":7,"end_character":22},"updated":"2021-08-18 10:06:16.000000000","message":"is","commit_id":"cffecd0d7a77889e6493127ab55790f44076eb54"},{"author":{"_account_id":10135,"name":"Lee Yarwood","display_name":"Lee Yarwood","email":"lyarwood@redhat.com","username":"lyarwood"},"change_message_id":"92e27b1fdb5361fc90683007ff4ba169daaa945a","unresolved":true,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Handle if placement in down during interface attach"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"We don\u0027t have much to do but at least we can raise a proper exception"},{"line_number":10,"context_line":"from the compute that informs the caller what failed."},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"Change-Id: Ie5a0b91065819f018a5d170b734295552fbeaadd"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"49b02557_d44b1eec","line":9,"range":{"start_line":9,"start_character":60,"end_line":9,"end_character":69},"updated":"2021-08-18 10:06:16.000000000","message":"response","commit_id":"cffecd0d7a77889e6493127ab55790f44076eb54"},{"author":{"_account_id":10135,"name":"Lee Yarwood","display_name":"Lee Yarwood","email":"lyarwood@redhat.com","username":"lyarwood"},"change_message_id":"92e27b1fdb5361fc90683007ff4ba169daaa945a","unresolved":true,"context_lines":[{"line_number":7,"context_line":"Handle if placement in down during interface attach"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"We don\u0027t have much to do but at least we can raise a proper exception"},{"line_number":10,"context_line":"from the compute that informs the caller what failed."},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"Change-Id: Ie5a0b91065819f018a5d170b734295552fbeaadd"},{"line_number":13,"context_line":"Closed-Bug: #1939193"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"8337dd05_5a190c54","line":10,"range":{"start_line":10,"start_character":9,"end_line":10,"end_character":16},"updated":"2021-08-18 10:06:16.000000000","message":"compute API","commit_id":"cffecd0d7a77889e6493127ab55790f44076eb54"},{"author":{"_account_id":10135,"name":"Lee Yarwood","display_name":"Lee Yarwood","email":"lyarwood@redhat.com","username":"lyarwood"},"change_message_id":"92e27b1fdb5361fc90683007ff4ba169daaa945a","unresolved":true,"context_lines":[{"line_number":10,"context_line":"from the compute that informs the caller what failed."},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"Change-Id: Ie5a0b91065819f018a5d170b734295552fbeaadd"},{"line_number":13,"context_line":"Closed-Bug: #1939193"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"ed3bcb50_703c9d45","line":13,"range":{"start_line":13,"start_character":0,"end_line":13,"end_character":6},"updated":"2021-08-18 10:06:16.000000000","message":"Closes","commit_id":"cffecd0d7a77889e6493127ab55790f44076eb54"}],"nova/api/openstack/compute/attach_interfaces.py":[{"author":{"_account_id":10135,"name":"Lee Yarwood","display_name":"Lee Yarwood","email":"lyarwood@redhat.com","username":"lyarwood"},"change_message_id":"e71a40326f65e31fe629f9e2d02451953d54d87c","unresolved":true,"context_lines":[{"line_number":132,"context_line":"                    context, port_info[\u0027port\u0027],"},{"line_number":133,"context_line":"                    show_tag\u003dapi_version_request.is_supported(req, \u00272.70\u0027))}"},{"line_number":134,"context_line":""},{"line_number":135,"context_line":"    @wsgi.expected_errors((400, 403, 404, 409, 500, 501, 503))"},{"line_number":136,"context_line":"    @validation.schema(attach_interfaces.create, \u00272.0\u0027, \u00272.48\u0027)"},{"line_number":137,"context_line":"    @validation.schema(attach_interfaces.create_v249, \u00272.49\u0027)"},{"line_number":138,"context_line":"    def create(self, req, server_id, body):"}],"source_content_type":"text/x-python","patch_set":1,"id":"318c99f2_a030034a","line":135,"range":{"start_line":135,"start_character":57,"end_line":135,"end_character":60},"updated":"2021-08-18 10:07:11.000000000","message":"I know this API isn\u0027t a proxy to Neutron but wouldn\u0027t 502 be better here?","commit_id":"cffecd0d7a77889e6493127ab55790f44076eb54"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"de1d1225c3cb221b7dea6729c81558bce7c65b12","unresolved":true,"context_lines":[{"line_number":132,"context_line":"                    context, port_info[\u0027port\u0027],"},{"line_number":133,"context_line":"                    show_tag\u003dapi_version_request.is_supported(req, \u00272.70\u0027))}"},{"line_number":134,"context_line":""},{"line_number":135,"context_line":"    @wsgi.expected_errors((400, 403, 404, 409, 500, 501, 503))"},{"line_number":136,"context_line":"    @validation.schema(attach_interfaces.create, \u00272.0\u0027, \u00272.48\u0027)"},{"line_number":137,"context_line":"    @validation.schema(attach_interfaces.create_v249, \u00272.49\u0027)"},{"line_number":138,"context_line":"    def create(self, req, server_id, body):"}],"source_content_type":"text/x-python","patch_set":1,"id":"a4ed156f_ff1679b0","line":135,"range":{"start_line":135,"start_character":57,"end_line":135,"end_character":60},"in_reply_to":"1ca33c65_bde5d6b3","updated":"2021-08-18 14:16:16.000000000","message":"I\u0027m not sure it really matters that much between 502 and 503. Returning 502 every time we can\u0027t talk to another service seems a little bit like blame instead of reporting the actual problem. Especially in the case of placement, most users don\u0027t even know it exists or why we need to talk to it so saying \"that other service you asked me to talk to is not available\" seems like the wrong thing to me. It would be like us returning 502 because we failed to talk to libvirt which _technically_ happens over a socket. I guess the above makes me lean towards 503 if we\u0027re going with 5xx.\n\nI think the thinking behind a 4xx code for the compute service being down was to legitimize the condition. It could be down for maintenance, we\u0027re still able to handle some requests for the instance, just not state changes right now, hence the \"conflict\" being that the instance is not in an actionable state. I don\u0027t think that\u0027s wrong.\n\nIf you agree with the above about instance actions, then I\u0027m thinking that maybe 5xx for not being able to create right now is questionable. When apache returns 502 for something it can\u0027t proxy to, I think the expectation is \"nothing here is going to work until the situation is resolved\" and/or \"don\u0027t try that again\". You don\u0027t expect a GET to return 500 but a PUT would succeed, for example. I guess that\u0027s true for create specifically, meaning there\u0027s nothing the client can change about their request to make it successful, but it also seems maybe a little weird for POST to return 500 but PUT to return 2xx, so I dunno.","commit_id":"cffecd0d7a77889e6493127ab55790f44076eb54"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"a4dfabfae88417e3f9c42f6a91b0550c8fec6732","unresolved":true,"context_lines":[{"line_number":132,"context_line":"                    context, port_info[\u0027port\u0027],"},{"line_number":133,"context_line":"                    show_tag\u003dapi_version_request.is_supported(req, \u00272.70\u0027))}"},{"line_number":134,"context_line":""},{"line_number":135,"context_line":"    @wsgi.expected_errors((400, 403, 404, 409, 500, 501, 503))"},{"line_number":136,"context_line":"    @validation.schema(attach_interfaces.create, \u00272.0\u0027, \u00272.48\u0027)"},{"line_number":137,"context_line":"    @validation.schema(attach_interfaces.create_v249, \u00272.49\u0027)"},{"line_number":138,"context_line":"    def create(self, req, server_id, body):"}],"source_content_type":"text/x-python","patch_set":1,"id":"1ca33c65_bde5d6b3","line":135,"range":{"start_line":135,"start_character":57,"end_line":135,"end_character":60},"in_reply_to":"318c99f2_a030034a","updated":"2021-08-18 12:18:59.000000000","message":"Let\u0027s discuss this. I\u0027ve added other cores to the review now. \n\nI have no hard opinion. As you noted elsewhere 502 means some kind of proxying while in this case it is not a proxy it is just a dependency.\n\nI quickly checked and nova returns HTTP 409 Conflict for the case when the instance action is invoked on an instance that is running on a host where the compute service is unavailable[1][2]. (This sounds bad :/) Or in case of hypervisor uptime we even return HTTP 400. \n\n\n\n[1] https://github.com/openstack/nova/blob/370830e9445c9825d1e34e60cca01fdfe88d5d82/nova/api/openstack/compute/servers.py#L970-L972\n[2] https://github.com/openstack/nova/blob/370830e9445c9825d1e34e60cca01fdfe88d5d82/nova/api/openstack/compute/servers.py#L1040","commit_id":"cffecd0d7a77889e6493127ab55790f44076eb54"}]}
