)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"cbb43c336ed84202ed0cc2ee81537932ba7f04ae","unresolved":false,"context_lines":[{"line_number":7,"context_line":"Don\u0027t check port quota in nova-api"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This spec describes the blueprint do-not-check-port-quota-in-nova-api"},{"line_number":10,"context_line":""},{"line_number":11,"context_line":"Change-Id: I837c56db3d704179e372620694aa78acd88c676b"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"9a8ffd7b_a04a9f81","line":10,"updated":"2015-12-02 02:49:23.000000000","message":"You should have the APIImpact tag in the commit message for this.","commit_id":"fb79b51648d7bd650ef41cf0a9e849b6ae34fc87"},{"author":{"_account_id":8976,"name":"shihanzhang","email":"ayshihanzhang@gmail.com","username":"shihanzhang"},"change_message_id":"a4d0677dfece2846fb81c7b78575f363f28d6f91","unresolved":false,"context_lines":[{"line_number":7,"context_line":"Don\u0027t check port quota in nova-api"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This spec describes the blueprint do-not-check-port-quota-in-nova-api"},{"line_number":10,"context_line":""},{"line_number":11,"context_line":"Change-Id: I837c56db3d704179e372620694aa78acd88c676b"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"9a8ffd7b_9b310a0e","line":10,"in_reply_to":"9a8ffd7b_a04a9f81","updated":"2015-12-02 03:27:40.000000000","message":"agree","commit_id":"fb79b51648d7bd650ef41cf0a9e849b6ae34fc87"}],"specs/mitaka/approved/do-not-check-port-quota-in-nova-api.rst":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"b2d210a018440f3d1ddfc040e357a8598b3fc7bd","unresolved":false,"context_lines":[{"line_number":20,"context_line":"When nova use neutron network-api, it will check neutron port quota"},{"line_number":21,"context_line":"in nova-api if we boot a instance with parameter network-id, in"},{"line_number":22,"context_line":"large-scale, if a tenant already has a large number instances, booting"},{"line_number":23,"context_line":"a instance needs much time to check port quota through neutron API,"},{"line_number":24,"context_line":"sometimes the REST api will timeout and fail to create instance. For"},{"line_number":25,"context_line":"this problem, there are two primary causes:"},{"line_number":26,"context_line":""}],"source_content_type":"text/x-rst","patch_set":1,"id":"9a8ffd7b_129bc673","line":23,"updated":"2015-12-01 22:54:27.000000000","message":"What\u0027s taking a long time?  Listing the ports via the neutron API or checking the quota, because checking the port quota should be fast.  I could see how listing the ports could be slower if there are a lot of them:\n\nhttps://github.com/openstack/nova/blob/master/nova/network/neutronv2/api.py#L1182\n\nWe could be smarter in that code and check the quota first, if it\u0027s unlimited then we don\u0027t need to list the ports, so do that in the else block.\n\nWe could also make the list_ports call faster by not getting the full details back and just requesting the \u0027id\u0027 field or something.","commit_id":"fb79b51648d7bd650ef41cf0a9e849b6ae34fc87"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"e1f75077897b3c28ff1fae3c5582b76486903e34","unresolved":false,"context_lines":[{"line_number":20,"context_line":"When nova use neutron network-api, it will check neutron port quota"},{"line_number":21,"context_line":"in nova-api if we boot a instance with parameter network-id, in"},{"line_number":22,"context_line":"large-scale, if a tenant already has a large number instances, booting"},{"line_number":23,"context_line":"a instance needs much time to check port quota through neutron API,"},{"line_number":24,"context_line":"sometimes the REST api will timeout and fail to create instance. For"},{"line_number":25,"context_line":"this problem, there are two primary causes:"},{"line_number":26,"context_line":""}],"source_content_type":"text/x-rst","patch_set":1,"id":"9a8ffd7b_40697324","line":23,"in_reply_to":"9a8ffd7b_129bc673","updated":"2015-12-02 02:43:50.000000000","message":"I\u0027ve opened bug 1521788 for optimizing the validate_networks method, which we can make better outside of this spec.","commit_id":"fb79b51648d7bd650ef41cf0a9e849b6ae34fc87"},{"author":{"_account_id":8976,"name":"shihanzhang","email":"ayshihanzhang@gmail.com","username":"shihanzhang"},"change_message_id":"a4d0677dfece2846fb81c7b78575f363f28d6f91","unresolved":false,"context_lines":[{"line_number":20,"context_line":"When nova use neutron network-api, it will check neutron port quota"},{"line_number":21,"context_line":"in nova-api if we boot a instance with parameter network-id, in"},{"line_number":22,"context_line":"large-scale, if a tenant already has a large number instances, booting"},{"line_number":23,"context_line":"a instance needs much time to check port quota through neutron API,"},{"line_number":24,"context_line":"sometimes the REST api will timeout and fail to create instance. For"},{"line_number":25,"context_line":"this problem, there are two primary causes:"},{"line_number":26,"context_line":""}],"source_content_type":"text/x-rst","patch_set":1,"id":"9a8ffd7b_fb15b6e4","line":23,"in_reply_to":"9a8ffd7b_129bc673","updated":"2015-12-02 03:27:40.000000000","message":"for your question \u0027We could be smarter in that code and check the quota first\u0027, I have done it in patch https://review.openstack.org/#/c/175742/2/, but Nikola think it is not a good solution, I agree with him, the reason it that \u0027we get a nice quota exception back from the nova API making for a smoother UX. But in other\u0027s - instance goes into error without warning\u0027.","commit_id":"fb79b51648d7bd650ef41cf0a9e849b6ae34fc87"},{"author":{"_account_id":8976,"name":"shihanzhang","email":"ayshihanzhang@gmail.com","username":"shihanzhang"},"change_message_id":"a4d0677dfece2846fb81c7b78575f363f28d6f91","unresolved":false,"context_lines":[{"line_number":20,"context_line":"When nova use neutron network-api, it will check neutron port quota"},{"line_number":21,"context_line":"in nova-api if we boot a instance with parameter network-id, in"},{"line_number":22,"context_line":"large-scale, if a tenant already has a large number instances, booting"},{"line_number":23,"context_line":"a instance needs much time to check port quota through neutron API,"},{"line_number":24,"context_line":"sometimes the REST api will timeout and fail to create instance. For"},{"line_number":25,"context_line":"this problem, there are two primary causes:"},{"line_number":26,"context_line":""}],"source_content_type":"text/x-rst","patch_set":1,"id":"9a8ffd7b_7bcd46b6","line":23,"in_reply_to":"9a8ffd7b_40697324","updated":"2015-12-02 03:27:40.000000000","message":"how to make it better? could you provide some detail?","commit_id":"fb79b51648d7bd650ef41cf0a9e849b6ae34fc87"},{"author":{"_account_id":8976,"name":"shihanzhang","email":"ayshihanzhang@gmail.com","username":"shihanzhang"},"change_message_id":"81b417564fa842a935a061843bf9c79721b729c1","unresolved":false,"context_lines":[{"line_number":20,"context_line":"When nova use neutron network-api, it will check neutron port quota"},{"line_number":21,"context_line":"in nova-api if we boot a instance with parameter network-id, in"},{"line_number":22,"context_line":"large-scale, if a tenant already has a large number instances, booting"},{"line_number":23,"context_line":"a instance needs much time to check port quota through neutron API,"},{"line_number":24,"context_line":"sometimes the REST api will timeout and fail to create instance. For"},{"line_number":25,"context_line":"this problem, there are two primary causes:"},{"line_number":26,"context_line":""}],"source_content_type":"text/x-rst","patch_set":1,"id":"9a8ffd7b_e904d07e","line":23,"in_reply_to":"9a8ffd7b_cf3799fc","updated":"2015-12-03 01:14:59.000000000","message":"if we set port quota be -1, I think your patch is ok, but most cases, the port quota can\u0027t be -1, because the very port will consume MAC resource, especially for public cloud","commit_id":"fb79b51648d7bd650ef41cf0a9e849b6ae34fc87"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"6761c50bbb4b57f336562e0a5413aba9fe4b9f79","unresolved":false,"context_lines":[{"line_number":20,"context_line":"When nova use neutron network-api, it will check neutron port quota"},{"line_number":21,"context_line":"in nova-api if we boot a instance with parameter network-id, in"},{"line_number":22,"context_line":"large-scale, if a tenant already has a large number instances, booting"},{"line_number":23,"context_line":"a instance needs much time to check port quota through neutron API,"},{"line_number":24,"context_line":"sometimes the REST api will timeout and fail to create instance. For"},{"line_number":25,"context_line":"this problem, there are two primary causes:"},{"line_number":26,"context_line":""}],"source_content_type":"text/x-rst","patch_set":1,"id":"9a8ffd7b_cf3799fc","line":23,"in_reply_to":"9a8ffd7b_fb15b6e4","updated":"2015-12-02 20:47:01.000000000","message":"https://review.openstack.org/#/c/175742/2/ is much more complicated than what I described in bug 1521788.","commit_id":"fb79b51648d7bd650ef41cf0a9e849b6ae34fc87"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"b2d210a018440f3d1ddfc040e357a8598b3fc7bd","unresolved":false,"context_lines":[{"line_number":29,"context_line":"  required ports as part ofnetwork validation, but port creation requires"},{"line_number":30,"context_line":"  some details from the hypervisor. So we just check the quota and return"},{"line_number":31,"context_line":"  how many of the requested number of instances can be created\". In some"},{"line_number":32,"context_line":"  case, there is a problem: during booting a instanc, neutron port quota"},{"line_number":33,"context_line":"  meets requirement in nova-api, but after nova-schedule, it creates port"},{"line_number":34,"context_line":"  in nova-compute, neutron already does not meet requirement."},{"line_number":35,"context_line":""}],"source_content_type":"text/x-rst","patch_set":1,"id":"9a8ffd7b_32cb6a55","line":32,"updated":"2015-12-01 22:54:27.000000000","message":"s/instanc/instance/","commit_id":"fb79b51648d7bd650ef41cf0a9e849b6ae34fc87"},{"author":{"_account_id":8976,"name":"shihanzhang","email":"ayshihanzhang@gmail.com","username":"shihanzhang"},"change_message_id":"a4d0677dfece2846fb81c7b78575f363f28d6f91","unresolved":false,"context_lines":[{"line_number":29,"context_line":"  required ports as part ofnetwork validation, but port creation requires"},{"line_number":30,"context_line":"  some details from the hypervisor. So we just check the quota and return"},{"line_number":31,"context_line":"  how many of the requested number of instances can be created\". In some"},{"line_number":32,"context_line":"  case, there is a problem: during booting a instanc, neutron port quota"},{"line_number":33,"context_line":"  meets requirement in nova-api, but after nova-schedule, it creates port"},{"line_number":34,"context_line":"  in nova-compute, neutron already does not meet requirement."},{"line_number":35,"context_line":""}],"source_content_type":"text/x-rst","patch_set":1,"id":"9a8ffd7b_5bdde240","line":32,"in_reply_to":"9a8ffd7b_32cb6a55","updated":"2015-12-02 03:27:40.000000000","message":"Done","commit_id":"fb79b51648d7bd650ef41cf0a9e849b6ae34fc87"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"b2d210a018440f3d1ddfc040e357a8598b3fc7bd","unresolved":false,"context_lines":[{"line_number":31,"context_line":"  how many of the requested number of instances can be created\". In some"},{"line_number":32,"context_line":"  case, there is a problem: during booting a instanc, neutron port quota"},{"line_number":33,"context_line":"  meets requirement in nova-api, but after nova-schedule, it creates port"},{"line_number":34,"context_line":"  in nova-compute, neutron already does not meet requirement."},{"line_number":35,"context_line":""},{"line_number":36,"context_line":"* from neutron side, it does not provide reservation mechanism, if nova"},{"line_number":37,"context_line":"  want to check the rest of port number for this tenant, nova must use"}],"source_content_type":"text/x-rst","patch_set":1,"id":"9a8ffd7b_32d28a01","line":34,"updated":"2015-12-01 22:54:27.000000000","message":"Can you provide a specific scenario here?  I\u0027m not really following. We\u0027re checking the quota in the API before scheduling *because* we\u0027re going to be creating ports in the compute.\n\nIt seems this would only be a conflict if you\u0027re doing multiple concurrent boots to the same project.","commit_id":"fb79b51648d7bd650ef41cf0a9e849b6ae34fc87"},{"author":{"_account_id":8976,"name":"shihanzhang","email":"ayshihanzhang@gmail.com","username":"shihanzhang"},"change_message_id":"a4d0677dfece2846fb81c7b78575f363f28d6f91","unresolved":false,"context_lines":[{"line_number":31,"context_line":"  how many of the requested number of instances can be created\". In some"},{"line_number":32,"context_line":"  case, there is a problem: during booting a instanc, neutron port quota"},{"line_number":33,"context_line":"  meets requirement in nova-api, but after nova-schedule, it creates port"},{"line_number":34,"context_line":"  in nova-compute, neutron already does not meet requirement."},{"line_number":35,"context_line":""},{"line_number":36,"context_line":"* from neutron side, it does not provide reservation mechanism, if nova"},{"line_number":37,"context_line":"  want to check the rest of port number for this tenant, nova must use"}],"source_content_type":"text/x-rst","patch_set":1,"id":"9a8ffd7b_bbcace18","line":34,"in_reply_to":"9a8ffd7b_32d28a01","updated":"2015-12-02 03:27:40.000000000","message":"for example, neutron port quota is 100, but only one available, two booting instance request come to nova-api at the same time, they all check port quota is ok, but after scheduling, one nova-compute will create port fail","commit_id":"fb79b51648d7bd650ef41cf0a9e849b6ae34fc87"},{"author":{"_account_id":8976,"name":"shihanzhang","email":"ayshihanzhang@gmail.com","username":"shihanzhang"},"change_message_id":"81b417564fa842a935a061843bf9c79721b729c1","unresolved":false,"context_lines":[{"line_number":31,"context_line":"  how many of the requested number of instances can be created\". In some"},{"line_number":32,"context_line":"  case, there is a problem: during booting a instanc, neutron port quota"},{"line_number":33,"context_line":"  meets requirement in nova-api, but after nova-schedule, it creates port"},{"line_number":34,"context_line":"  in nova-compute, neutron already does not meet requirement."},{"line_number":35,"context_line":""},{"line_number":36,"context_line":"* from neutron side, it does not provide reservation mechanism, if nova"},{"line_number":37,"context_line":"  want to check the rest of port number for this tenant, nova must use"}],"source_content_type":"text/x-rst","patch_set":1,"id":"9a8ffd7b_e9885024","line":34,"in_reply_to":"9a8ffd7b_6f00ed02","updated":"2015-12-03 01:14:59.000000000","message":"I think the main problem is the booting VM API is not consistency","commit_id":"fb79b51648d7bd650ef41cf0a9e849b6ae34fc87"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"6761c50bbb4b57f336562e0a5413aba9fe4b9f79","unresolved":false,"context_lines":[{"line_number":31,"context_line":"  how many of the requested number of instances can be created\". In some"},{"line_number":32,"context_line":"  case, there is a problem: during booting a instanc, neutron port quota"},{"line_number":33,"context_line":"  meets requirement in nova-api, but after nova-schedule, it creates port"},{"line_number":34,"context_line":"  in nova-compute, neutron already does not meet requirement."},{"line_number":35,"context_line":""},{"line_number":36,"context_line":"* from neutron side, it does not provide reservation mechanism, if nova"},{"line_number":37,"context_line":"  want to check the rest of port number for this tenant, nova must use"}],"source_content_type":"text/x-rst","patch_set":1,"id":"9a8ffd7b_6f00ed02","line":34,"in_reply_to":"9a8ffd7b_bbcace18","updated":"2015-12-02 20:47:01.000000000","message":"I guess I don\u0027t see a huge problem with this. It\u0027s a race condition if they are booting concurrently from the same project and not doing it on the same request with num_instances\u003d2.\n\nI don\u0027t think this use case justifies removing the port quota check from nova-api.","commit_id":"fb79b51648d7bd650ef41cf0a9e849b6ae34fc87"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"b2d210a018440f3d1ddfc040e357a8598b3fc7bd","unresolved":false,"context_lines":[{"line_number":37,"context_line":"  want to check the rest of port number for this tenant, nova must use"},{"line_number":38,"context_line":"  neutron quota-show to get port quota, and use port-list to get already"},{"line_number":39,"context_line":"  create port numbers, and then get the rest number, in large-scale,"},{"line_number":40,"context_line":"  port-list will consume much time."},{"line_number":41,"context_line":""},{"line_number":42,"context_line":""},{"line_number":43,"context_line":"Use Cases"}],"source_content_type":"text/x-rst","patch_set":1,"id":"9a8ffd7b_12ee66b4","line":40,"updated":"2015-12-01 22:54:27.000000000","message":"Maybe we need to investigate why port-list is slow on the neutron side, are they doing some unnecessary joins in the database or something?","commit_id":"fb79b51648d7bd650ef41cf0a9e849b6ae34fc87"},{"author":{"_account_id":8976,"name":"shihanzhang","email":"ayshihanzhang@gmail.com","username":"shihanzhang"},"change_message_id":"a4d0677dfece2846fb81c7b78575f363f28d6f91","unresolved":false,"context_lines":[{"line_number":37,"context_line":"  want to check the rest of port number for this tenant, nova must use"},{"line_number":38,"context_line":"  neutron quota-show to get port quota, and use port-list to get already"},{"line_number":39,"context_line":"  create port numbers, and then get the rest number, in large-scale,"},{"line_number":40,"context_line":"  port-list will consume much time."},{"line_number":41,"context_line":""},{"line_number":42,"context_line":""},{"line_number":43,"context_line":"Use Cases"}],"source_content_type":"text/x-rst","patch_set":1,"id":"9a8ffd7b_7ba2264d","line":40,"in_reply_to":"9a8ffd7b_12ee66b4","updated":"2015-12-02 03:27:40.000000000","message":"maybe there are two main reasons: 1. in large-scale, netron-server already is heave load, so port-list is slow 2. if a tenant has a large number ports, port-list give MQ much load.","commit_id":"fb79b51648d7bd650ef41cf0a9e849b6ae34fc87"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"6761c50bbb4b57f336562e0a5413aba9fe4b9f79","unresolved":false,"context_lines":[{"line_number":37,"context_line":"  want to check the rest of port number for this tenant, nova must use"},{"line_number":38,"context_line":"  neutron quota-show to get port quota, and use port-list to get already"},{"line_number":39,"context_line":"  create port numbers, and then get the rest number, in large-scale,"},{"line_number":40,"context_line":"  port-list will consume much time."},{"line_number":41,"context_line":""},{"line_number":42,"context_line":""},{"line_number":43,"context_line":"Use Cases"}],"source_content_type":"text/x-rst","patch_set":1,"id":"9a8ffd7b_8a141f44","line":40,"in_reply_to":"9a8ffd7b_7ba2264d","updated":"2015-12-02 20:47:01.000000000","message":"Isn\u0027t neutron just getting the port list from it\u0027s database?  What is the MQ load there?","commit_id":"fb79b51648d7bd650ef41cf0a9e849b6ae34fc87"},{"author":{"_account_id":8976,"name":"shihanzhang","email":"ayshihanzhang@gmail.com","username":"shihanzhang"},"change_message_id":"81b417564fa842a935a061843bf9c79721b729c1","unresolved":false,"context_lines":[{"line_number":37,"context_line":"  want to check the rest of port number for this tenant, nova must use"},{"line_number":38,"context_line":"  neutron quota-show to get port quota, and use port-list to get already"},{"line_number":39,"context_line":"  create port numbers, and then get the rest number, in large-scale,"},{"line_number":40,"context_line":"  port-list will consume much time."},{"line_number":41,"context_line":""},{"line_number":42,"context_line":""},{"line_number":43,"context_line":"Use Cases"}],"source_content_type":"text/x-rst","patch_set":1,"id":"9a8ffd7b_89cc248a","line":40,"in_reply_to":"9a8ffd7b_8a141f44","updated":"2015-12-03 01:14:59.000000000","message":"if a tenant has a large number ports, the response of list_port is very large, so there is load for MQ","commit_id":"fb79b51648d7bd650ef41cf0a9e849b6ae34fc87"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"b2d210a018440f3d1ddfc040e357a8598b3fc7bd","unresolved":false,"context_lines":[{"line_number":55,"context_line":""},{"line_number":56,"context_line":"To improve performance and make consistent API for nova booting"},{"line_number":57,"context_line":"instance API, this proposal will remove neutron port quota check in"},{"line_number":58,"context_line":"nova-api, just let nova-compute to check it, if port quota does not"},{"line_number":59,"context_line":"meet requirement in nova-compute, it fail to boot instanc."},{"line_number":60,"context_line":""},{"line_number":61,"context_line":""}],"source_content_type":"text/x-rst","patch_set":1,"id":"9a8ffd7b_32404aa5","line":58,"updated":"2015-12-01 22:54:27.000000000","message":"So you literally want to move the network_api.validate_networks call from the compute API to the compute manager?","commit_id":"fb79b51648d7bd650ef41cf0a9e849b6ae34fc87"},{"author":{"_account_id":8976,"name":"shihanzhang","email":"ayshihanzhang@gmail.com","username":"shihanzhang"},"change_message_id":"a4d0677dfece2846fb81c7b78575f363f28d6f91","unresolved":false,"context_lines":[{"line_number":55,"context_line":""},{"line_number":56,"context_line":"To improve performance and make consistent API for nova booting"},{"line_number":57,"context_line":"instance API, this proposal will remove neutron port quota check in"},{"line_number":58,"context_line":"nova-api, just let nova-compute to check it, if port quota does not"},{"line_number":59,"context_line":"meet requirement in nova-compute, it fail to boot instanc."},{"line_number":60,"context_line":""},{"line_number":61,"context_line":""}],"source_content_type":"text/x-rst","patch_set":1,"id":"9a8ffd7b_9b882a24","line":58,"in_reply_to":"9a8ffd7b_32404aa5","updated":"2015-12-02 03:27:40.000000000","message":"no, I mean that not checking port quota, if nova-compute creates port failed, it fail to boot instance","commit_id":"fb79b51648d7bd650ef41cf0a9e849b6ae34fc87"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"d938ad05981ada09cb17cfc0c72a8e77642ceb1c","unresolved":false,"context_lines":[{"line_number":139,"context_line":""},{"line_number":140,"context_line":"None"},{"line_number":141,"context_line":""},{"line_number":142,"context_line":"References"},{"line_number":143,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":144,"context_line":""},{"line_number":145,"context_line":"None"}],"source_content_type":"text/x-rst","patch_set":1,"id":"9a8ffd7b_77b6c48b","line":142,"updated":"2015-12-01 22:38:21.000000000","message":"Links to the actual code in question would be helpful.","commit_id":"fb79b51648d7bd650ef41cf0a9e849b6ae34fc87"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"1fb2edf0e2de7a2dd7407453ce76b321d7f241a2","unresolved":false,"context_lines":[{"line_number":139,"context_line":""},{"line_number":140,"context_line":"None"},{"line_number":141,"context_line":""},{"line_number":142,"context_line":"References"},{"line_number":143,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":144,"context_line":""},{"line_number":145,"context_line":"None"}],"source_content_type":"text/x-rst","patch_set":1,"id":"9a8ffd7b_9229f639","line":142,"in_reply_to":"9a8ffd7b_77b6c48b","updated":"2015-12-01 22:47:56.000000000","message":"This is the call from the compute API:\n\nhttps://github.com/openstack/nova/blob/master/nova/compute/api.py#L513\n\nAnd would adjust if there are fewer ports available than number of servers requested on boot:\n\nhttps://github.com/openstack/nova/blob/master/nova/compute/api.py#L1169\n\nWhich is part of the reason why we have this, to automatically adjust how many instances can be created in a single boot request.\n\nI\u0027m not seeing where network_api.validate_networks is called elsewhere though which makes it redundant.","commit_id":"fb79b51648d7bd650ef41cf0a9e849b6ae34fc87"},{"author":{"_account_id":8976,"name":"shihanzhang","email":"ayshihanzhang@gmail.com","username":"shihanzhang"},"change_message_id":"a4d0677dfece2846fb81c7b78575f363f28d6f91","unresolved":false,"context_lines":[{"line_number":139,"context_line":""},{"line_number":140,"context_line":"None"},{"line_number":141,"context_line":""},{"line_number":142,"context_line":"References"},{"line_number":143,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":144,"context_line":""},{"line_number":145,"context_line":"None"}],"source_content_type":"text/x-rst","patch_set":1,"id":"9a8ffd7b_1b8afabf","line":142,"in_reply_to":"9a8ffd7b_77b6c48b","updated":"2015-12-02 03:27:40.000000000","message":"agree","commit_id":"fb79b51648d7bd650ef41cf0a9e849b6ae34fc87"},{"author":{"_account_id":8976,"name":"shihanzhang","email":"ayshihanzhang@gmail.com","username":"shihanzhang"},"change_message_id":"a4d0677dfece2846fb81c7b78575f363f28d6f91","unresolved":false,"context_lines":[{"line_number":139,"context_line":""},{"line_number":140,"context_line":"None"},{"line_number":141,"context_line":""},{"line_number":142,"context_line":"References"},{"line_number":143,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":144,"context_line":""},{"line_number":145,"context_line":"None"}],"source_content_type":"text/x-rst","patch_set":1,"id":"9a8ffd7b_fb537637","line":142,"in_reply_to":"9a8ffd7b_9229f639","updated":"2015-12-02 03:27:40.000000000","message":"I also don\u0027t know why \u0027utomatically adjust how many instances can be created in a single boot request\u0027","commit_id":"fb79b51648d7bd650ef41cf0a9e849b6ae34fc87"},{"author":{"_account_id":6167,"name":"Ken\u0027ichi Ohmichi","email":"ken1ohmichi@gmail.com","username":"oomichi"},"change_message_id":"b6c7b6d70f4a4ca19bb946bed6099f67fe25a759","unresolved":false,"context_lines":[{"line_number":17,"context_line":"Problem description"},{"line_number":18,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"When nova use neutron network-api, it will check neutron port quota"},{"line_number":21,"context_line":"in nova-api if we boot a instance with parameter network-id, in"},{"line_number":22,"context_line":"large-scale, if a tenant already has a large number instances, booting"},{"line_number":23,"context_line":"a instance needs much time to get used port number[1] and check port"}],"source_content_type":"text/x-rst","patch_set":2,"id":"9a8ffd7b_6955404e","line":20,"updated":"2015-12-03 01:24:33.000000000","message":"s/use/uses/\n\ns/network-api/as network-api/","commit_id":"027c8c84dac842215d58526f6511d67614484216"},{"author":{"_account_id":8976,"name":"shihanzhang","email":"ayshihanzhang@gmail.com","username":"shihanzhang"},"change_message_id":"e3cf845dd5d743ec01267a14ba148912cf015a6d","unresolved":false,"context_lines":[{"line_number":17,"context_line":"Problem description"},{"line_number":18,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"When nova use neutron network-api, it will check neutron port quota"},{"line_number":21,"context_line":"in nova-api if we boot a instance with parameter network-id, in"},{"line_number":22,"context_line":"large-scale, if a tenant already has a large number instances, booting"},{"line_number":23,"context_line":"a instance needs much time to get used port number[1] and check port"}],"source_content_type":"text/x-rst","patch_set":2,"id":"9a8ffd7b_cdf9d781","line":20,"in_reply_to":"9a8ffd7b_6955404e","updated":"2015-12-03 02:50:10.000000000","message":"Done","commit_id":"027c8c84dac842215d58526f6511d67614484216"},{"author":{"_account_id":6167,"name":"Ken\u0027ichi Ohmichi","email":"ken1ohmichi@gmail.com","username":"oomichi"},"change_message_id":"b6c7b6d70f4a4ca19bb946bed6099f67fe25a759","unresolved":false,"context_lines":[{"line_number":26,"context_line":""},{"line_number":27,"context_line":"* from nova side, it checks port quota in nova-api and creates port"},{"line_number":28,"context_line":"  in nova-compute, the reason is that \"Ideally Nova would create all"},{"line_number":29,"context_line":"  required ports as part ofnetwork validation, but port creation requires"},{"line_number":30,"context_line":"  some details from the hypervisor. So we just check the quota and return"},{"line_number":31,"context_line":"  how many of the requested number of instances can be created\". In some"},{"line_number":32,"context_line":"  case, there is a problem: during booting a instance, neutron port quota"}],"source_content_type":"text/x-rst","patch_set":2,"id":"9a8ffd7b_89d984f5","line":29,"updated":"2015-12-03 01:24:33.000000000","message":"s/ofnetwork/of network/","commit_id":"027c8c84dac842215d58526f6511d67614484216"},{"author":{"_account_id":8976,"name":"shihanzhang","email":"ayshihanzhang@gmail.com","username":"shihanzhang"},"change_message_id":"e3cf845dd5d743ec01267a14ba148912cf015a6d","unresolved":false,"context_lines":[{"line_number":26,"context_line":""},{"line_number":27,"context_line":"* from nova side, it checks port quota in nova-api and creates port"},{"line_number":28,"context_line":"  in nova-compute, the reason is that \"Ideally Nova would create all"},{"line_number":29,"context_line":"  required ports as part ofnetwork validation, but port creation requires"},{"line_number":30,"context_line":"  some details from the hypervisor. So we just check the quota and return"},{"line_number":31,"context_line":"  how many of the requested number of instances can be created\". In some"},{"line_number":32,"context_line":"  case, there is a problem: during booting a instance, neutron port quota"}],"source_content_type":"text/x-rst","patch_set":2,"id":"9a8ffd7b_adec93bb","line":29,"in_reply_to":"9a8ffd7b_89d984f5","updated":"2015-12-03 02:50:10.000000000","message":"Done","commit_id":"027c8c84dac842215d58526f6511d67614484216"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"2e4d668b4450af5936f9f659a9de87fc27135718","unresolved":false,"context_lines":[{"line_number":30,"context_line":"  some details from the hypervisor. So we just check the quota and return"},{"line_number":31,"context_line":"  how many of the requested number of instances can be created\". In some"},{"line_number":32,"context_line":"  case, there is a problem: during booting a instance, neutron port quota"},{"line_number":33,"context_line":"  meets requirement in nova-api, but after nova-schedule, it creates port"},{"line_number":34,"context_line":"  in nova-compute, neutron already does not meet requirement."},{"line_number":35,"context_line":""},{"line_number":36,"context_line":"* from neutron side, it does not provide reservation mechanism, if nova"}],"source_content_type":"text/x-rst","patch_set":2,"id":"9a8ffd7b_aa94838a","line":33,"updated":"2015-12-02 20:49:44.000000000","message":"I think you should include the scenario you described from patch set 1, with concurrent boot requests for 1 server when there is only 1 port left in quota (from the same project).","commit_id":"027c8c84dac842215d58526f6511d67614484216"},{"author":{"_account_id":8976,"name":"shihanzhang","email":"ayshihanzhang@gmail.com","username":"shihanzhang"},"change_message_id":"7d40a275e3e9e1dec0e3dd0fcc94a42eea6ae0c5","unresolved":false,"context_lines":[{"line_number":30,"context_line":"  some details from the hypervisor. So we just check the quota and return"},{"line_number":31,"context_line":"  how many of the requested number of instances can be created\". In some"},{"line_number":32,"context_line":"  case, there is a problem: during booting a instance, neutron port quota"},{"line_number":33,"context_line":"  meets requirement in nova-api, but after nova-schedule, it creates port"},{"line_number":34,"context_line":"  in nova-compute, neutron already does not meet requirement."},{"line_number":35,"context_line":""},{"line_number":36,"context_line":"* from neutron side, it does not provide reservation mechanism, if nova"}],"source_content_type":"text/x-rst","patch_set":2,"id":"9a8ffd7b_2e2c1eab","line":33,"in_reply_to":"9a8ffd7b_aa94838a","updated":"2015-12-03 01:06:39.000000000","message":"agree","commit_id":"027c8c84dac842215d58526f6511d67614484216"},{"author":{"_account_id":6167,"name":"Ken\u0027ichi Ohmichi","email":"ken1ohmichi@gmail.com","username":"oomichi"},"change_message_id":"b6c7b6d70f4a4ca19bb946bed6099f67fe25a759","unresolved":false,"context_lines":[{"line_number":34,"context_line":"  in nova-compute, neutron already does not meet requirement."},{"line_number":35,"context_line":""},{"line_number":36,"context_line":"* from neutron side, it does not provide reservation mechanism, if nova"},{"line_number":37,"context_line":"  want to check the rest of port number for this tenant, nova must use"},{"line_number":38,"context_line":"  neutron quota-show to get port quota, and use port-list to get already"},{"line_number":39,"context_line":"  create port numbers, and then get the rest number, in large-scale,"},{"line_number":40,"context_line":"  port-list will consume much time."}],"source_content_type":"text/x-rst","patch_set":2,"id":"9a8ffd7b_49f63c5e","line":37,"updated":"2015-12-03 01:24:33.000000000","message":"s/want/wants/","commit_id":"027c8c84dac842215d58526f6511d67614484216"},{"author":{"_account_id":8976,"name":"shihanzhang","email":"ayshihanzhang@gmail.com","username":"shihanzhang"},"change_message_id":"e3cf845dd5d743ec01267a14ba148912cf015a6d","unresolved":false,"context_lines":[{"line_number":34,"context_line":"  in nova-compute, neutron already does not meet requirement."},{"line_number":35,"context_line":""},{"line_number":36,"context_line":"* from neutron side, it does not provide reservation mechanism, if nova"},{"line_number":37,"context_line":"  want to check the rest of port number for this tenant, nova must use"},{"line_number":38,"context_line":"  neutron quota-show to get port quota, and use port-list to get already"},{"line_number":39,"context_line":"  create port numbers, and then get the rest number, in large-scale,"},{"line_number":40,"context_line":"  port-list will consume much time."}],"source_content_type":"text/x-rst","patch_set":2,"id":"9a8ffd7b_4d2c0702","line":37,"in_reply_to":"9a8ffd7b_49f63c5e","updated":"2015-12-03 02:50:10.000000000","message":"Done","commit_id":"027c8c84dac842215d58526f6511d67614484216"},{"author":{"_account_id":6167,"name":"Ken\u0027ichi Ohmichi","email":"ken1ohmichi@gmail.com","username":"oomichi"},"change_message_id":"b6c7b6d70f4a4ca19bb946bed6099f67fe25a759","unresolved":false,"context_lines":[{"line_number":36,"context_line":"* from neutron side, it does not provide reservation mechanism, if nova"},{"line_number":37,"context_line":"  want to check the rest of port number for this tenant, nova must use"},{"line_number":38,"context_line":"  neutron quota-show to get port quota, and use port-list to get already"},{"line_number":39,"context_line":"  create port numbers, and then get the rest number, in large-scale,"},{"line_number":40,"context_line":"  port-list will consume much time."},{"line_number":41,"context_line":""},{"line_number":42,"context_line":""}],"source_content_type":"text/x-rst","patch_set":2,"id":"9a8ffd7b_698a20c1","line":39,"updated":"2015-12-03 01:24:33.000000000","message":"s/create/created/","commit_id":"027c8c84dac842215d58526f6511d67614484216"},{"author":{"_account_id":6167,"name":"Ken\u0027ichi Ohmichi","email":"ken1ohmichi@gmail.com","username":"oomichi"},"change_message_id":"b6c7b6d70f4a4ca19bb946bed6099f67fe25a759","unresolved":false,"context_lines":[{"line_number":55,"context_line":""},{"line_number":56,"context_line":"To improve performance and make consistent API for nova booting"},{"line_number":57,"context_line":"instance API, this proposal will remove neutron port quota check in"},{"line_number":58,"context_line":"nova-api, nova-compute direcly create port without checking port quota,"},{"line_number":59,"context_line":"if it fail to creat port, booting instance also fail."},{"line_number":60,"context_line":""},{"line_number":61,"context_line":""}],"source_content_type":"text/x-rst","patch_set":2,"id":"9a8ffd7b_c9b78c83","line":58,"updated":"2015-12-03 01:24:33.000000000","message":"s/create/creates/","commit_id":"027c8c84dac842215d58526f6511d67614484216"},{"author":{"_account_id":6167,"name":"Ken\u0027ichi Ohmichi","email":"ken1ohmichi@gmail.com","username":"oomichi"},"change_message_id":"b6c7b6d70f4a4ca19bb946bed6099f67fe25a759","unresolved":false,"context_lines":[{"line_number":56,"context_line":"To improve performance and make consistent API for nova booting"},{"line_number":57,"context_line":"instance API, this proposal will remove neutron port quota check in"},{"line_number":58,"context_line":"nova-api, nova-compute direcly create port without checking port quota,"},{"line_number":59,"context_line":"if it fail to creat port, booting instance also fail."},{"line_number":60,"context_line":""},{"line_number":61,"context_line":""},{"line_number":62,"context_line":"Alternatives"}],"source_content_type":"text/x-rst","patch_set":2,"id":"9a8ffd7b_6978e0c4","line":59,"updated":"2015-12-03 01:24:33.000000000","message":"s/fail/fails/ for two\n\ns/creat/create/","commit_id":"027c8c84dac842215d58526f6511d67614484216"},{"author":{"_account_id":8976,"name":"shihanzhang","email":"ayshihanzhang@gmail.com","username":"shihanzhang"},"change_message_id":"e3cf845dd5d743ec01267a14ba148912cf015a6d","unresolved":false,"context_lines":[{"line_number":56,"context_line":"To improve performance and make consistent API for nova booting"},{"line_number":57,"context_line":"instance API, this proposal will remove neutron port quota check in"},{"line_number":58,"context_line":"nova-api, nova-compute direcly create port without checking port quota,"},{"line_number":59,"context_line":"if it fail to creat port, booting instance also fail."},{"line_number":60,"context_line":""},{"line_number":61,"context_line":""},{"line_number":62,"context_line":"Alternatives"}],"source_content_type":"text/x-rst","patch_set":2,"id":"9a8ffd7b_0d803fbe","line":59,"in_reply_to":"9a8ffd7b_6978e0c4","updated":"2015-12-03 02:50:10.000000000","message":"Done","commit_id":"027c8c84dac842215d58526f6511d67614484216"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"2e4d668b4450af5936f9f659a9de87fc27135718","unresolved":false,"context_lines":[{"line_number":62,"context_line":"Alternatives"},{"line_number":63,"context_line":"------------"},{"line_number":64,"context_line":""},{"line_number":65,"context_line":"When nova check port quota in nova-api, it should first check the quota,"},{"line_number":66,"context_line":"if the quota getting from neutron is -1, there is no need to get the"},{"line_number":67,"context_line":"already created ports number. But this improvement just for neutron not"},{"line_number":68,"context_line":"limit port quota."}],"source_content_type":"text/x-rst","patch_set":2,"id":"9a8ffd7b_caef871b","line":65,"updated":"2015-12-02 20:49:44.000000000","message":"What do we do with quotas in the volume service today? How are those different?","commit_id":"027c8c84dac842215d58526f6511d67614484216"},{"author":{"_account_id":8976,"name":"shihanzhang","email":"ayshihanzhang@gmail.com","username":"shihanzhang"},"change_message_id":"7d40a275e3e9e1dec0e3dd0fcc94a42eea6ae0c5","unresolved":false,"context_lines":[{"line_number":62,"context_line":"Alternatives"},{"line_number":63,"context_line":"------------"},{"line_number":64,"context_line":""},{"line_number":65,"context_line":"When nova check port quota in nova-api, it should first check the quota,"},{"line_number":66,"context_line":"if the quota getting from neutron is -1, there is no need to get the"},{"line_number":67,"context_line":"already created ports number. But this improvement just for neutron not"},{"line_number":68,"context_line":"limit port quota."}],"source_content_type":"text/x-rst","patch_set":2,"id":"9a8ffd7b_e937f0ad","line":65,"in_reply_to":"9a8ffd7b_caef871b","updated":"2015-12-03 01:06:39.000000000","message":"cinder already provide the API \u0027quota-usage\u0027 to query the used resource, but neutron does not provide","commit_id":"027c8c84dac842215d58526f6511d67614484216"},{"author":{"_account_id":6167,"name":"Ken\u0027ichi Ohmichi","email":"ken1ohmichi@gmail.com","username":"oomichi"},"change_message_id":"b6c7b6d70f4a4ca19bb946bed6099f67fe25a759","unresolved":false,"context_lines":[{"line_number":64,"context_line":""},{"line_number":65,"context_line":"When nova check port quota in nova-api, it should first check the quota,"},{"line_number":66,"context_line":"if the quota getting from neutron is -1, there is no need to get the"},{"line_number":67,"context_line":"already created ports number. But this improvement just for neutron not"},{"line_number":68,"context_line":"limit port quota."},{"line_number":69,"context_line":""},{"line_number":70,"context_line":"Data model impact"}],"source_content_type":"text/x-rst","patch_set":2,"id":"9a8ffd7b_2955f81c","line":67,"updated":"2015-12-03 01:24:33.000000000","message":"s/just/is just/","commit_id":"027c8c84dac842215d58526f6511d67614484216"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"2e4d668b4450af5936f9f659a9de87fc27135718","unresolved":false,"context_lines":[{"line_number":142,"context_line":"References"},{"line_number":143,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":144,"context_line":""},{"line_number":145,"context_line":"1. https://github.com/openstack/nova/blob/master/nova/network/neutronv2/api.py#L1182"}],"source_content_type":"text/x-rst","patch_set":2,"id":"9a8ffd7b_2a7ad388","line":145,"updated":"2015-12-02 20:49:44.000000000","message":"Use a tag for a static link:\n\nhttps://github.com/openstack/nova/blob/12.0.0/nova/network/neutronv2/api.py#L1178\n\nOtherwise the line number will change on master.","commit_id":"027c8c84dac842215d58526f6511d67614484216"},{"author":{"_account_id":8976,"name":"shihanzhang","email":"ayshihanzhang@gmail.com","username":"shihanzhang"},"change_message_id":"7d40a275e3e9e1dec0e3dd0fcc94a42eea6ae0c5","unresolved":false,"context_lines":[{"line_number":142,"context_line":"References"},{"line_number":143,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":144,"context_line":""},{"line_number":145,"context_line":"1. https://github.com/openstack/nova/blob/master/nova/network/neutronv2/api.py#L1182"}],"source_content_type":"text/x-rst","patch_set":2,"id":"9a8ffd7b_a978087f","line":145,"in_reply_to":"9a8ffd7b_2a7ad388","updated":"2015-12-03 01:06:39.000000000","message":"agree","commit_id":"027c8c84dac842215d58526f6511d67614484216"},{"author":{"_account_id":4656,"name":"Sean M. Collins","email":"sean@coreitpro.com","username":"scollins"},"change_message_id":"16e1b573c762f263051ec0bb047aa210cae07beb","unresolved":false,"context_lines":[{"line_number":28,"context_line":"  in nova-compute, the reason is that \"Ideally Nova would create all"},{"line_number":29,"context_line":"  required ports as part of network validation, but port creation requires"},{"line_number":30,"context_line":"  some details from the hypervisor. So we just check the quota and return"},{"line_number":31,"context_line":"  how many of the requested number of instances can be created\".  From user"},{"line_number":32,"context_line":"  pespective, user will get different API response in below case:"},{"line_number":33,"context_line":""},{"line_number":34,"context_line":"  1. a tenant sets it\u0027s port quota 100, and it already used 100 ports, if a"}],"source_content_type":"text/x-rst","patch_set":3,"id":"9a8ffd7b_7369aaf8","line":31,"updated":"2015-12-03 02:50:07.000000000","message":"Where does this quote come from? It seems like there is a discussion that we are missing.","commit_id":"9d685adba2a5a56194d4920aa0832c7accbd2114"},{"author":{"_account_id":8976,"name":"shihanzhang","email":"ayshihanzhang@gmail.com","username":"shihanzhang"},"change_message_id":"f577ecbddd74aee09f0fd1fc2a56c65729b31ccb","unresolved":false,"context_lines":[{"line_number":28,"context_line":"  in nova-compute, the reason is that \"Ideally Nova would create all"},{"line_number":29,"context_line":"  required ports as part of network validation, but port creation requires"},{"line_number":30,"context_line":"  some details from the hypervisor. So we just check the quota and return"},{"line_number":31,"context_line":"  how many of the requested number of instances can be created\".  From user"},{"line_number":32,"context_line":"  pespective, user will get different API response in below case:"},{"line_number":33,"context_line":""},{"line_number":34,"context_line":"  1. a tenant sets it\u0027s port quota 100, and it already used 100 ports, if a"}],"source_content_type":"text/x-rst","patch_set":3,"id":"9a8ffd7b_166b6cba","line":31,"in_reply_to":"9a8ffd7b_7369aaf8","updated":"2015-12-03 02:56:23.000000000","message":"nova get port quota through neutron API, but neutron does not provide API to query used-port counts","commit_id":"9d685adba2a5a56194d4920aa0832c7accbd2114"},{"author":{"_account_id":6167,"name":"Ken\u0027ichi Ohmichi","email":"ken1ohmichi@gmail.com","username":"oomichi"},"change_message_id":"735bfffefd0ac7318490cd33922c65ee8af5e557","unresolved":false,"context_lines":[{"line_number":38,"context_line":"  2. a tenant sets it\u0027s port quota 100, and it already used 99 ports, if 2"},{"line_number":39,"context_line":"     users in this tenant boot 1 VM at the same time, sometimes one user fails"},{"line_number":40,"context_line":"     to boot VM, the error happens at nova-compute, because nova-compute"},{"line_number":41,"context_line":"     fails to create port.     "},{"line_number":42,"context_line":""},{"line_number":43,"context_line":"* from neutron side, it does not provide reservation mechanism, if nova"},{"line_number":44,"context_line":"  wants to check the rest of port number for this tenant, nova must use"}],"source_content_type":"text/x-rst","patch_set":3,"id":"9a8ffd7b_1006141c","line":41,"updated":"2015-12-03 01:54:50.000000000","message":"unnecessary spaces...","commit_id":"9d685adba2a5a56194d4920aa0832c7accbd2114"},{"author":{"_account_id":8976,"name":"shihanzhang","email":"ayshihanzhang@gmail.com","username":"shihanzhang"},"change_message_id":"29447f89baf71daf7910fbf991bd83556815af17","unresolved":false,"context_lines":[{"line_number":38,"context_line":"  2. a tenant sets it\u0027s port quota 100, and it already used 99 ports, if 2"},{"line_number":39,"context_line":"     users in this tenant boot 1 VM at the same time, sometimes one user fails"},{"line_number":40,"context_line":"     to boot VM, the error happens at nova-compute, because nova-compute"},{"line_number":41,"context_line":"     fails to create port.     "},{"line_number":42,"context_line":""},{"line_number":43,"context_line":"* from neutron side, it does not provide reservation mechanism, if nova"},{"line_number":44,"context_line":"  wants to check the rest of port number for this tenant, nova must use"}],"source_content_type":"text/x-rst","patch_set":3,"id":"9a8ffd7b_b3f6325b","line":41,"in_reply_to":"9a8ffd7b_1006141c","updated":"2015-12-03 02:50:02.000000000","message":"Done","commit_id":"9d685adba2a5a56194d4920aa0832c7accbd2114"},{"author":{"_account_id":6167,"name":"Ken\u0027ichi Ohmichi","email":"ken1ohmichi@gmail.com","username":"oomichi"},"change_message_id":"735bfffefd0ac7318490cd33922c65ee8af5e557","unresolved":false,"context_lines":[{"line_number":63,"context_line":"To improve performance and make consistent API for nova booting"},{"line_number":64,"context_line":"instance API, this proposal will remove neutron port quota check in"},{"line_number":65,"context_line":"nova-api, nova-compute direcly creates port without checking port quota,"},{"line_number":66,"context_line":"if it fails to create port, booting instance also fail."},{"line_number":67,"context_line":""},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"Alternatives"}],"source_content_type":"text/x-rst","patch_set":3,"id":"9a8ffd7b_302238a4","line":66,"updated":"2015-12-03 01:54:50.000000000","message":"s/fail/fails/ for one at the end also.","commit_id":"9d685adba2a5a56194d4920aa0832c7accbd2114"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"9458b71de871e555e0018396bb97d805f2f2cff3","unresolved":false,"context_lines":[{"line_number":21,"context_line":"in nova-api if we boot a instance with parameter network-id, in"},{"line_number":22,"context_line":"large-scale, if a tenant already has a large number instances, booting"},{"line_number":23,"context_line":"a instance needs much time to get used port number[1] and check port"},{"line_number":24,"context_line":"quota through neutron API, sometimes the REST api will timeout and fail"},{"line_number":25,"context_line":"to create instance. For this problem, there are two primary causes:"},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"* from nova side, it checks port quota in nova-api and creates port"}],"source_content_type":"text/x-rst","patch_set":4,"id":"7a740942_2e627cd9","line":24,"updated":"2015-12-03 17:26:04.000000000","message":"Do you mean the Neutron REST API?  You can configure the timeouts there btw.  Or is this a timeout in the Nova REST API before we do the cast to the compute manager to actually build the instance?","commit_id":"246e97f987b10aa512893c606ea37940cd1c9586"},{"author":{"_account_id":8976,"name":"shihanzhang","email":"ayshihanzhang@gmail.com","username":"shihanzhang"},"change_message_id":"b5885f5d12e71d2acd0986e0d01e60420963f7eb","unresolved":false,"context_lines":[{"line_number":21,"context_line":"in nova-api if we boot a instance with parameter network-id, in"},{"line_number":22,"context_line":"large-scale, if a tenant already has a large number instances, booting"},{"line_number":23,"context_line":"a instance needs much time to get used port number[1] and check port"},{"line_number":24,"context_line":"quota through neutron API, sometimes the REST api will timeout and fail"},{"line_number":25,"context_line":"to create instance. For this problem, there are two primary causes:"},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"* from nova side, it checks port quota in nova-api and creates port"}],"source_content_type":"text/x-rst","patch_set":4,"id":"7a740942_48a00af5","line":24,"in_reply_to":"7a740942_2e627cd9","updated":"2015-12-04 00:53:56.000000000","message":"I mean nova calling Neutron REST API will timeout, you are right, we can configure the timeouts, but how log we configure? it depend on the already created-ports number in a tenant.","commit_id":"246e97f987b10aa512893c606ea37940cd1c9586"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"9458b71de871e555e0018396bb97d805f2f2cff3","unresolved":false,"context_lines":[{"line_number":37,"context_line":""},{"line_number":38,"context_line":"  2. a tenant sets it\u0027s port quota 100, and it already used 99 ports, if 2"},{"line_number":39,"context_line":"     users in this tenant boot 1 VM at the same time, sometimes one user fails"},{"line_number":40,"context_line":"     to boot VM, the error happens at nova-compute, because nova-compute"},{"line_number":41,"context_line":"     fails to create port."},{"line_number":42,"context_line":""},{"line_number":43,"context_line":"* from neutron side, it does not provide reservation mechanism, if nova"}],"source_content_type":"text/x-rst","patch_set":4,"id":"7a740942_0eeea022","line":40,"updated":"2015-12-03 17:26:04.000000000","message":"True, but with your proposed change, this still still happen, the 2nd user will get and over quota error when creating the port in the compute node.  And we\u0027d lose the port quota validation that we have today in the Nova API.","commit_id":"246e97f987b10aa512893c606ea37940cd1c9586"},{"author":{"_account_id":8976,"name":"shihanzhang","email":"ayshihanzhang@gmail.com","username":"shihanzhang"},"change_message_id":"b5885f5d12e71d2acd0986e0d01e60420963f7eb","unresolved":false,"context_lines":[{"line_number":37,"context_line":""},{"line_number":38,"context_line":"  2. a tenant sets it\u0027s port quota 100, and it already used 99 ports, if 2"},{"line_number":39,"context_line":"     users in this tenant boot 1 VM at the same time, sometimes one user fails"},{"line_number":40,"context_line":"     to boot VM, the error happens at nova-compute, because nova-compute"},{"line_number":41,"context_line":"     fails to create port."},{"line_number":42,"context_line":""},{"line_number":43,"context_line":"* from neutron side, it does not provide reservation mechanism, if nova"}],"source_content_type":"text/x-rst","patch_set":4,"id":"7a740942_28825e53","line":40,"in_reply_to":"7a740942_0eeea022","updated":"2015-12-04 00:53:56.000000000","message":"yes, you are right, but from user pespective, the result is consistent","commit_id":"246e97f987b10aa512893c606ea37940cd1c9586"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"9458b71de871e555e0018396bb97d805f2f2cff3","unresolved":false,"context_lines":[{"line_number":49,"context_line":""},{"line_number":50,"context_line":"Use Cases"},{"line_number":51,"context_line":"----------"},{"line_number":52,"context_line":""},{"line_number":53,"context_line":"None"},{"line_number":54,"context_line":""},{"line_number":55,"context_line":"Project Priority"}],"source_content_type":"text/x-rst","patch_set":4,"id":"7a740942_8ec13083","line":52,"updated":"2015-12-03 17:26:04.000000000","message":"You have use case scenarios in the problem description, you could probably just move those here.","commit_id":"246e97f987b10aa512893c606ea37940cd1c9586"},{"author":{"_account_id":8976,"name":"shihanzhang","email":"ayshihanzhang@gmail.com","username":"shihanzhang"},"change_message_id":"b5885f5d12e71d2acd0986e0d01e60420963f7eb","unresolved":false,"context_lines":[{"line_number":49,"context_line":""},{"line_number":50,"context_line":"Use Cases"},{"line_number":51,"context_line":"----------"},{"line_number":52,"context_line":""},{"line_number":53,"context_line":"None"},{"line_number":54,"context_line":""},{"line_number":55,"context_line":"Project Priority"}],"source_content_type":"text/x-rst","patch_set":4,"id":"7a740942_a8964e92","line":52,"in_reply_to":"7a740942_8ec13083","updated":"2015-12-04 00:53:56.000000000","message":"agree","commit_id":"246e97f987b10aa512893c606ea37940cd1c9586"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"9458b71de871e555e0018396bb97d805f2f2cff3","unresolved":false,"context_lines":[{"line_number":52,"context_line":""},{"line_number":53,"context_line":"None"},{"line_number":54,"context_line":""},{"line_number":55,"context_line":"Project Priority"},{"line_number":56,"context_line":"-----------------"},{"line_number":57,"context_line":""},{"line_number":58,"context_line":"None"}],"source_content_type":"text/x-rst","patch_set":4,"id":"7a740942_8eda9077","line":55,"updated":"2015-12-03 17:26:04.000000000","message":"You can remove the priority section, we don\u0027t use this now.","commit_id":"246e97f987b10aa512893c606ea37940cd1c9586"},{"author":{"_account_id":8976,"name":"shihanzhang","email":"ayshihanzhang@gmail.com","username":"shihanzhang"},"change_message_id":"b5885f5d12e71d2acd0986e0d01e60420963f7eb","unresolved":false,"context_lines":[{"line_number":52,"context_line":""},{"line_number":53,"context_line":"None"},{"line_number":54,"context_line":""},{"line_number":55,"context_line":"Project Priority"},{"line_number":56,"context_line":"-----------------"},{"line_number":57,"context_line":""},{"line_number":58,"context_line":"None"}],"source_content_type":"text/x-rst","patch_set":4,"id":"7a740942_c8939aa2","line":55,"in_reply_to":"7a740942_8eda9077","updated":"2015-12-04 00:53:56.000000000","message":"agree","commit_id":"246e97f987b10aa512893c606ea37940cd1c9586"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"0b94432f80b09c83466a98fe63e7c1ba3f5c9d3f","unresolved":false,"context_lines":[{"line_number":67,"context_line":""},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"Alternatives"},{"line_number":70,"context_line":"------------"},{"line_number":71,"context_line":""},{"line_number":72,"context_line":"When nova check port quota in nova-api, it should first check the quota,"},{"line_number":73,"context_line":"if the quota getting from neutron is -1, there is no need to get the"}],"source_content_type":"text/x-rst","patch_set":4,"id":"7a740942_2e76fc3e","line":70,"updated":"2015-12-03 17:27:10.000000000","message":"Another alternative is a workaround config option that skips the list_ports check in validate_networks for neutron.","commit_id":"246e97f987b10aa512893c606ea37940cd1c9586"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"94398f06065800caccbb1e1a92bb25991c4f3e0a","unresolved":false,"context_lines":[{"line_number":67,"context_line":""},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"Alternatives"},{"line_number":70,"context_line":"------------"},{"line_number":71,"context_line":""},{"line_number":72,"context_line":"When nova check port quota in nova-api, it should first check the quota,"},{"line_number":73,"context_line":"if the quota getting from neutron is -1, there is no need to get the"}],"source_content_type":"text/x-rst","patch_set":4,"id":"7a740942_ae0bcc7c","line":70,"in_reply_to":"7a740942_2e76fc3e","updated":"2015-12-03 17:29:51.000000000","message":"Another alternative is adding a reservation API to neutron that nova could use which impacts how the quotas are calculated.","commit_id":"246e97f987b10aa512893c606ea37940cd1c9586"},{"author":{"_account_id":8976,"name":"shihanzhang","email":"ayshihanzhang@gmail.com","username":"shihanzhang"},"change_message_id":"b5885f5d12e71d2acd0986e0d01e60420963f7eb","unresolved":false,"context_lines":[{"line_number":67,"context_line":""},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"Alternatives"},{"line_number":70,"context_line":"------------"},{"line_number":71,"context_line":""},{"line_number":72,"context_line":"When nova check port quota in nova-api, it should first check the quota,"},{"line_number":73,"context_line":"if the quota getting from neutron is -1, there is no need to get the"}],"source_content_type":"text/x-rst","patch_set":4,"id":"7a740942_68906696","line":70,"in_reply_to":"7a740942_2e76fc3e","updated":"2015-12-04 00:53:56.000000000","message":"agree","commit_id":"246e97f987b10aa512893c606ea37940cd1c9586"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"d8c86660796aa88a028c4653a74ffca5906ba8f1","unresolved":false,"context_lines":[{"line_number":67,"context_line":""},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"Alternatives"},{"line_number":70,"context_line":"------------"},{"line_number":71,"context_line":""},{"line_number":72,"context_line":"When nova check port quota in nova-api, it should first check the quota,"},{"line_number":73,"context_line":"if the quota getting from neutron is -1, there is no need to get the"}],"source_content_type":"text/x-rst","patch_set":4,"id":"7a740942_ced5f8b9","line":70,"in_reply_to":"7a740942_ae0bcc7c","updated":"2015-12-03 17:30:58.000000000","message":"Another alternative (credit John Garbutt), is to just create the ports ahead of time in neutron and provide those in the server create request to nova, then nova doesn\u0027t need to do the quota checking since it won\u0027t be creating ports.","commit_id":"246e97f987b10aa512893c606ea37940cd1c9586"},{"author":{"_account_id":8976,"name":"shihanzhang","email":"ayshihanzhang@gmail.com","username":"shihanzhang"},"change_message_id":"b5885f5d12e71d2acd0986e0d01e60420963f7eb","unresolved":false,"context_lines":[{"line_number":67,"context_line":""},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"Alternatives"},{"line_number":70,"context_line":"------------"},{"line_number":71,"context_line":""},{"line_number":72,"context_line":"When nova check port quota in nova-api, it should first check the quota,"},{"line_number":73,"context_line":"if the quota getting from neutron is -1, there is no need to get the"}],"source_content_type":"text/x-rst","patch_set":4,"id":"7a740942_888d927d","line":70,"in_reply_to":"7a740942_ae0bcc7c","updated":"2015-12-04 00:53:56.000000000","message":"Done","commit_id":"246e97f987b10aa512893c606ea37940cd1c9586"},{"author":{"_account_id":8976,"name":"shihanzhang","email":"ayshihanzhang@gmail.com","username":"shihanzhang"},"change_message_id":"b5885f5d12e71d2acd0986e0d01e60420963f7eb","unresolved":false,"context_lines":[{"line_number":67,"context_line":""},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"Alternatives"},{"line_number":70,"context_line":"------------"},{"line_number":71,"context_line":""},{"line_number":72,"context_line":"When nova check port quota in nova-api, it should first check the quota,"},{"line_number":73,"context_line":"if the quota getting from neutron is -1, there is no need to get the"}],"source_content_type":"text/x-rst","patch_set":4,"id":"7a740942_48eeca23","line":70,"in_reply_to":"7a740942_ced5f8b9","updated":"2015-12-04 00:53:56.000000000","message":"Done","commit_id":"246e97f987b10aa512893c606ea37940cd1c9586"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"9458b71de871e555e0018396bb97d805f2f2cff3","unresolved":false,"context_lines":[{"line_number":71,"context_line":""},{"line_number":72,"context_line":"When nova check port quota in nova-api, it should first check the quota,"},{"line_number":73,"context_line":"if the quota getting from neutron is -1, there is no need to get the"},{"line_number":74,"context_line":"already created ports number. But this improvement is just for neutron not"},{"line_number":75,"context_line":"limit port quota."},{"line_number":76,"context_line":""},{"line_number":77,"context_line":"Data model impact"}],"source_content_type":"text/x-rst","patch_set":4,"id":"7a740942_ce45f817","line":74,"updated":"2015-12-03 17:26:04.000000000","message":"I actually already have part of this change:\n\nhttps://review.openstack.org/#/c/252659/","commit_id":"246e97f987b10aa512893c606ea37940cd1c9586"},{"author":{"_account_id":8976,"name":"shihanzhang","email":"ayshihanzhang@gmail.com","username":"shihanzhang"},"change_message_id":"b5885f5d12e71d2acd0986e0d01e60420963f7eb","unresolved":false,"context_lines":[{"line_number":71,"context_line":""},{"line_number":72,"context_line":"When nova check port quota in nova-api, it should first check the quota,"},{"line_number":73,"context_line":"if the quota getting from neutron is -1, there is no need to get the"},{"line_number":74,"context_line":"already created ports number. But this improvement is just for neutron not"},{"line_number":75,"context_line":"limit port quota."},{"line_number":76,"context_line":""},{"line_number":77,"context_line":"Data model impact"}],"source_content_type":"text/x-rst","patch_set":4,"id":"7a740942_c8daba78","line":74,"in_reply_to":"7a740942_ce45f817","updated":"2015-12-04 00:53:56.000000000","message":"yes, your patch is a good work","commit_id":"246e97f987b10aa512893c606ea37940cd1c9586"}],"specs/newton/approved/do-not-check-port-quota-in-nova-api.rst":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"ab931042fd6ef289149ce51582fc830dbe2bf6be","unresolved":false,"context_lines":[{"line_number":33,"context_line":"* from neutron side, it does not provide reservation mechanism, if nova"},{"line_number":34,"context_line":"  wants to check the rest of port number for this tenant, nova must use"},{"line_number":35,"context_line":"  neutron quota-show to get port quota, and use port-list to get already"},{"line_number":36,"context_line":"  created port numbers, and then get the rest number, in large-scale,"},{"line_number":37,"context_line":"  port-list will consume much time."},{"line_number":38,"context_line":""},{"line_number":39,"context_line":""},{"line_number":40,"context_line":"Use Cases"}],"source_content_type":"text/x-rst","patch_set":6,"id":"3a57f1b5_14207947","line":37,"range":{"start_line":36,"start_character":54,"end_line":37,"end_character":35},"updated":"2016-02-11 20:20:33.000000000","message":"Maybe neutron should provide a port-count API where it\u0027s not getting all of the port resources from the database, just the count, no joins on other tables or anything like that - just whatever would impact quota.","commit_id":"5393618b3e5c89e4ec7f9dce046af4e6300bb604"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"bf40137583091aec63920d0dfae124a04ea49693","unresolved":false,"context_lines":[{"line_number":34,"context_line":"  wants to check the rest of port number for this tenant, nova must use"},{"line_number":35,"context_line":"  neutron quota-show to get port quota, and use port-list to get already"},{"line_number":36,"context_line":"  created port numbers, and then get the rest number, in large-scale,"},{"line_number":37,"context_line":"  port-list will consume much time."},{"line_number":38,"context_line":""},{"line_number":39,"context_line":""},{"line_number":40,"context_line":"Use Cases"}],"source_content_type":"text/x-rst","patch_set":6,"id":"3afc51ec_cd58a0fd","line":37,"updated":"2016-03-13 19:26:35.000000000","message":"Or better yet, an addition to the quota API that just clearly states the remaining available so Nova doesn\u0027t have to implement Neutron\u0027s quota calculation logic.","commit_id":"5393618b3e5c89e4ec7f9dce046af4e6300bb604"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"ab931042fd6ef289149ce51582fc830dbe2bf6be","unresolved":false,"context_lines":[{"line_number":59,"context_line":"To improve performance and make consistent API for nova booting"},{"line_number":60,"context_line":"instance API, this proposal will remove neutron port quota check in"},{"line_number":61,"context_line":"nova-api, nova-compute direcly creates port without checking port quota,"},{"line_number":62,"context_line":"if it fails to create port, booting instance also fails."},{"line_number":63,"context_line":""},{"line_number":64,"context_line":""},{"line_number":65,"context_line":"Alternatives"}],"source_content_type":"text/x-rst","patch_set":6,"id":"3a57f1b5_b40165b1","line":62,"range":{"start_line":62,"start_character":0,"end_line":62,"end_character":56},"updated":"2016-02-11 20:20:33.000000000","message":"How is this any different from your 2nd use case above with the racing users booting at the same time trying to get the last available port within quota?","commit_id":"5393618b3e5c89e4ec7f9dce046af4e6300bb604"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"ab931042fd6ef289149ce51582fc830dbe2bf6be","unresolved":false,"context_lines":[{"line_number":99,"context_line":"Performance Impact"},{"line_number":100,"context_line":"------------------"},{"line_number":101,"context_line":""},{"line_number":102,"context_line":"booting instance would be significantly faster in large-scale."},{"line_number":103,"context_line":""},{"line_number":104,"context_line":"Other end user impact"},{"line_number":105,"context_line":"---------------------"}],"source_content_type":"text/x-rst","patch_set":6,"id":"3a57f1b5_94d7894a","line":102,"range":{"start_line":102,"start_character":0,"end_line":102,"end_character":62},"updated":"2016-02-11 20:20:33.000000000","message":"I think we\u0027d want to see some actual investigation and numbers to quantify this. As Sean pointed out, why is the neutron port list query so slow? Is it doing some crazy join in the neutron database that is unnecessary if you\u0027re just looking for a count? Is it hitting an agent for some reason? Other? Might be good to ask Kevin Benton if he knows anything about this.","commit_id":"5393618b3e5c89e4ec7f9dce046af4e6300bb604"}]}
