)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"f3040a75533df45589f7df63b5556a6c19977aa1","unresolved":false,"context_lines":[{"line_number":7,"context_line":"Enable user-specified port uuid"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This feature provides a way for nova-compute services to avoid"},{"line_number":10,"context_line":"deplicated port allocations when re-scheduling happens: in tempest"},{"line_number":11,"context_line":"or bulk creating scenario, neutron-server timeouts occasionally happen"},{"line_number":12,"context_line":"when nova-compute allocate ports in `_build_and_run` codes, and tasks"},{"line_number":13,"context_line":"will be re-scheduled to other compute nodes. However, new compute nodes"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"9fb8cfa7_c398b36b","line":10,"range":{"start_line":10,"start_character":59,"end_line":10,"end_character":66},"updated":"2019-06-05 07:38:09.000000000","message":"Could you paste an example link for this? Or just your locally testing?","commit_id":"58ebbee68145b0f73ad5845896797951e6615518"},{"author":{"_account_id":28889,"name":"Guo Jingyu","email":"guojy8993@163.com","username":"pandatt"},"change_message_id":"10f34fff9e14a0a200fbc13aa4b63438e44c9fe6","unresolved":false,"context_lines":[{"line_number":7,"context_line":"Enable user-specified port uuid"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This feature provides a way for nova-compute services to avoid"},{"line_number":10,"context_line":"deplicated port allocations when re-scheduling happens: in tempest"},{"line_number":11,"context_line":"or bulk creating scenario, neutron-server timeouts occasionally happen"},{"line_number":12,"context_line":"when nova-compute allocate ports in `_build_and_run` codes, and tasks"},{"line_number":13,"context_line":"will be re-scheduled to other compute nodes. However, new compute nodes"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"9fb8cfa7_6abe6566","line":10,"range":{"start_line":10,"start_character":59,"end_line":10,"end_character":66},"in_reply_to":"9fb8cfa7_2a0f0de2","updated":"2019-06-06 02:10:24.000000000","message":"I didn\u0027t get first-hand logs when problem occured, and this problem is not expected to always happen。\nI will wait for it happening again and file\u0026submit the bug.\nAnd as to you advices, I\u0027ll give them more consideration.\nThanks.","commit_id":"58ebbee68145b0f73ad5845896797951e6615518"},{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"c17baf1bc082fc88939b15d749c878ef4aa1c5d0","unresolved":false,"context_lines":[{"line_number":7,"context_line":"Enable user-specified port uuid"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This feature provides a way for nova-compute services to avoid"},{"line_number":10,"context_line":"deplicated port allocations when re-scheduling happens: in tempest"},{"line_number":11,"context_line":"or bulk creating scenario, neutron-server timeouts occasionally happen"},{"line_number":12,"context_line":"when nova-compute allocate ports in `_build_and_run` codes, and tasks"},{"line_number":13,"context_line":"will be re-scheduled to other compute nodes. However, new compute nodes"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"9fb8cfa7_2a0f0de2","line":10,"range":{"start_line":10,"start_character":59,"end_line":10,"end_character":66},"in_reply_to":"9fb8cfa7_8f2e5d41","updated":"2019-06-06 01:53:50.000000000","message":"You can file a new neutron bug for this. And this nova bug is really a good case, you can follow that format to write the neutron bug details:\nDescription\n\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\nSteps to reproduce\n\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\nExpected result\n\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\nActual result\n\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\nEnvironment\n\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d","commit_id":"58ebbee68145b0f73ad5845896797951e6615518"},{"author":{"_account_id":28889,"name":"Guo Jingyu","email":"guojy8993@163.com","username":"pandatt"},"change_message_id":"7ead8b14c27191226379d0fb3313d2580c606ce8","unresolved":false,"context_lines":[{"line_number":7,"context_line":"Enable user-specified port uuid"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This feature provides a way for nova-compute services to avoid"},{"line_number":10,"context_line":"deplicated port allocations when re-scheduling happens: in tempest"},{"line_number":11,"context_line":"or bulk creating scenario, neutron-server timeouts occasionally happen"},{"line_number":12,"context_line":"when nova-compute allocate ports in `_build_and_run` codes, and tasks"},{"line_number":13,"context_line":"will be re-scheduled to other compute nodes. However, new compute nodes"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"9fb8cfa7_8f2e5d41","line":10,"range":{"start_line":10,"start_character":59,"end_line":10,"end_character":66},"in_reply_to":"9fb8cfa7_c398b36b","updated":"2019-06-05 09:14:30.000000000","message":"See https://bugs.launchpad.net/nova/+bug/1603909. I\u0027ll paste this link in new patch set.\n\nIn our tempest, I just see the same problem happening.","commit_id":"58ebbee68145b0f73ad5845896797951e6615518"},{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"f3040a75533df45589f7df63b5556a6c19977aa1","unresolved":false,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This feature provides a way for nova-compute services to avoid"},{"line_number":10,"context_line":"deplicated port allocations when re-scheduling happens: in tempest"},{"line_number":11,"context_line":"or bulk creating scenario, neutron-server timeouts occasionally happen"},{"line_number":12,"context_line":"when nova-compute allocate ports in `_build_and_run` codes, and tasks"},{"line_number":13,"context_line":"will be re-scheduled to other compute nodes. However, new compute nodes"},{"line_number":14,"context_line":"know nothing about the allocated ports and will allocate ports from"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"9fb8cfa7_c3b193e3","line":11,"range":{"start_line":11,"start_character":3,"end_line":11,"end_character":25},"updated":"2019-06-05 07:38:09.000000000","message":"For large set instance booting, I suggest create the port first, and if possible set the IP for the port prior to calling API. Then use these ports to create the instances.","commit_id":"58ebbee68145b0f73ad5845896797951e6615518"},{"author":{"_account_id":28889,"name":"Guo Jingyu","email":"guojy8993@163.com","username":"pandatt"},"change_message_id":"c756a5408432f822173b1291a2e9d80a3109dfab","unresolved":false,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This feature provides a way for nova-compute services to avoid"},{"line_number":10,"context_line":"deplicated port allocations when re-scheduling happens: in tempest"},{"line_number":11,"context_line":"or bulk creating scenario, neutron-server timeouts occasionally happen"},{"line_number":12,"context_line":"when nova-compute allocate ports in `_build_and_run` codes, and tasks"},{"line_number":13,"context_line":"will be re-scheduled to other compute nodes. However, new compute nodes"},{"line_number":14,"context_line":"know nothing about the allocated ports and will allocate ports from"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"9fb8cfa7_f53b16c5","line":11,"range":{"start_line":11,"start_character":3,"end_line":11,"end_character":25},"in_reply_to":"9fb8cfa7_2a414d0c","updated":"2019-06-06 06:52:53.000000000","message":"nova boots instances with two types of `--nic`, specifing either a allocated port or a network from which nova-compute service will allocate ports for instances.\n\nThe former is what you suggested。\nThe latter one is where my issue exists, and It\u0027s quite a common user case.","commit_id":"58ebbee68145b0f73ad5845896797951e6615518"},{"author":{"_account_id":28889,"name":"Guo Jingyu","email":"guojy8993@163.com","username":"pandatt"},"change_message_id":"7ead8b14c27191226379d0fb3313d2580c606ce8","unresolved":false,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This feature provides a way for nova-compute services to avoid"},{"line_number":10,"context_line":"deplicated port allocations when re-scheduling happens: in tempest"},{"line_number":11,"context_line":"or bulk creating scenario, neutron-server timeouts occasionally happen"},{"line_number":12,"context_line":"when nova-compute allocate ports in `_build_and_run` codes, and tasks"},{"line_number":13,"context_line":"will be re-scheduled to other compute nodes. However, new compute nodes"},{"line_number":14,"context_line":"know nothing about the allocated ports and will allocate ports from"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"9fb8cfa7_ef991979","line":11,"range":{"start_line":11,"start_character":3,"end_line":11,"end_character":25},"in_reply_to":"9fb8cfa7_c3b193e3","updated":"2019-06-05 09:14:30.000000000","message":"Moving ports allocation operation forward to nova-scheduler or nova-conductor will lead to bottleneck, and thus triggering more problems, IMO.","commit_id":"58ebbee68145b0f73ad5845896797951e6615518"},{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"c17baf1bc082fc88939b15d749c878ef4aa1c5d0","unresolved":false,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This feature provides a way for nova-compute services to avoid"},{"line_number":10,"context_line":"deplicated port allocations when re-scheduling happens: in tempest"},{"line_number":11,"context_line":"or bulk creating scenario, neutron-server timeouts occasionally happen"},{"line_number":12,"context_line":"when nova-compute allocate ports in `_build_and_run` codes, and tasks"},{"line_number":13,"context_line":"will be re-scheduled to other compute nodes. However, new compute nodes"},{"line_number":14,"context_line":"know nothing about the allocated ports and will allocate ports from"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"9fb8cfa7_2a414d0c","line":11,"range":{"start_line":11,"start_character":3,"end_line":11,"end_character":25},"in_reply_to":"9fb8cfa7_ef991979","updated":"2019-06-06 01:53:50.000000000","message":"No, nova does not need to do such ip/port allocation. My point is to create port with specified IP address first by your CLI/portal/console/UI, and then boot instance like this:\nnova boot --nic port-id\u003d\u003cport-uuid\u003e ...","commit_id":"58ebbee68145b0f73ad5845896797951e6615518"},{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"f3040a75533df45589f7df63b5556a6c19977aa1","unresolved":false,"context_lines":[{"line_number":11,"context_line":"or bulk creating scenario, neutron-server timeouts occasionally happen"},{"line_number":12,"context_line":"when nova-compute allocate ports in `_build_and_run` codes, and tasks"},{"line_number":13,"context_line":"will be re-scheduled to other compute nodes. However, new compute nodes"},{"line_number":14,"context_line":"know nothing about the allocated ports and will allocate ports from"},{"line_number":15,"context_line":"neutron-server again. This usually leads to orphan ports. If nova-scheduler"},{"line_number":16,"context_line":"service generates ports identifiers before requests passed to nova-compute"},{"line_number":17,"context_line":"services, the existance checks for ports will be possible and already allocated"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"9fb8cfa7_a3c81f55","line":14,"range":{"start_line":14,"start_character":0,"end_line":14,"end_character":12},"updated":"2019-06-05 07:38:09.000000000","message":"Instance info_cache does not store these info in DB?","commit_id":"58ebbee68145b0f73ad5845896797951e6615518"},{"author":{"_account_id":28889,"name":"Guo Jingyu","email":"guojy8993@163.com","username":"pandatt"},"change_message_id":"7ead8b14c27191226379d0fb3313d2580c606ce8","unresolved":false,"context_lines":[{"line_number":11,"context_line":"or bulk creating scenario, neutron-server timeouts occasionally happen"},{"line_number":12,"context_line":"when nova-compute allocate ports in `_build_and_run` codes, and tasks"},{"line_number":13,"context_line":"will be re-scheduled to other compute nodes. However, new compute nodes"},{"line_number":14,"context_line":"know nothing about the allocated ports and will allocate ports from"},{"line_number":15,"context_line":"neutron-server again. This usually leads to orphan ports. If nova-scheduler"},{"line_number":16,"context_line":"service generates ports identifiers before requests passed to nova-compute"},{"line_number":17,"context_line":"services, the existance checks for ports will be possible and already allocated"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"9fb8cfa7_af6321b1","line":14,"range":{"start_line":14,"start_character":0,"end_line":14,"end_character":12},"in_reply_to":"9fb8cfa7_a3c81f55","updated":"2019-06-05 09:14:30.000000000","message":"I mean, neutron server TIMEOUT happens while nova-compute waiting for a response. This leads to task `_build_and_run` aborted and rescheduled. In this case, nova-compute can never retrievs port uuid from response body(howerver, ports\ncan still eventually be allocated by neutron-server). And  so, newly selected compute nodes konow nothing about the ports. If ports identifiers are pre-generated, and ports are allocated with user-specified uuids, things will be different.","commit_id":"58ebbee68145b0f73ad5845896797951e6615518"},{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"c17baf1bc082fc88939b15d749c878ef4aa1c5d0","unresolved":false,"context_lines":[{"line_number":11,"context_line":"or bulk creating scenario, neutron-server timeouts occasionally happen"},{"line_number":12,"context_line":"when nova-compute allocate ports in `_build_and_run` codes, and tasks"},{"line_number":13,"context_line":"will be re-scheduled to other compute nodes. However, new compute nodes"},{"line_number":14,"context_line":"know nothing about the allocated ports and will allocate ports from"},{"line_number":15,"context_line":"neutron-server again. This usually leads to orphan ports. If nova-scheduler"},{"line_number":16,"context_line":"service generates ports identifiers before requests passed to nova-compute"},{"line_number":17,"context_line":"services, the existance checks for ports will be possible and already allocated"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"9fb8cfa7_6a8ae51b","line":14,"range":{"start_line":14,"start_character":0,"end_line":14,"end_character":12},"in_reply_to":"9fb8cfa7_af6321b1","updated":"2019-06-06 01:53:50.000000000","message":"With this \"user-specified port uuid\", I\u0027m not quite sure if nova can work properly as excepted. If nova-compute node-1 creates a port with uuid-1, and it fails to boot, re-schedule to next compute node-2. Something elusive I can image will be:\nneutron still in port creating procesure (IPAM is time-consuming now), so node-2 may create it again, and probably fails due to conflicts of port uuid.\nAnd two condition for node-1 to deal with the port when it get booting failure:\n1. try to delete the port, there will be a race condition for node-2 to boot the instance. (delete may not work, since port can also not created.)\n2. does not delete the port, because of the port-uuid conflict I mentioned above, this port can also remain when nova stop re-schedule. \n\nThis leads to lots of work for nova to do:\n1. nova needs a place to store all its interface port uuid\n2. check if this port exist and then create or boot\n3. what\u0027s the behavior of boot failure\n4. re-schedule policy\n...","commit_id":"58ebbee68145b0f73ad5845896797951e6615518"}],"neutron_lib/api/definitions/port.py":[{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"f3040a75533df45589f7df63b5556a6c19977aa1","unresolved":false,"context_lines":[{"line_number":31,"context_line":"        \u0027id\u0027: {\u0027allow_post\u0027: True, \u0027allow_put\u0027: False,"},{"line_number":32,"context_line":"               \u0027validate\u0027: {\u0027type:uuid_or_none\u0027: None},"},{"line_number":33,"context_line":"               \u0027is_filter\u0027: True,"},{"line_number":34,"context_line":"               \u0027default\u0027: None,"},{"line_number":35,"context_line":"               \u0027is_sort_key\u0027: True,"},{"line_number":36,"context_line":"               \u0027is_visible\u0027: True,"},{"line_number":37,"context_line":"               \u0027primary_key\u0027: True},"}],"source_content_type":"text/x-python","patch_set":1,"id":"9fb8cfa7_23e2efd6","line":34,"range":{"start_line":34,"start_character":15,"end_line":34,"end_character":31},"updated":"2019-06-05 07:38:09.000000000","message":"None is absolutely not acceptable. Port id is widely used for device names.","commit_id":"58ebbee68145b0f73ad5845896797951e6615518"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"b7e0fe1a16a7ddb80914553e3ed8589c069bc1ca","unresolved":false,"context_lines":[{"line_number":31,"context_line":"        \u0027id\u0027: {\u0027allow_post\u0027: True, \u0027allow_put\u0027: False,"},{"line_number":32,"context_line":"               \u0027validate\u0027: {\u0027type:uuid_or_none\u0027: None},"},{"line_number":33,"context_line":"               \u0027is_filter\u0027: True,"},{"line_number":34,"context_line":"               \u0027default\u0027: None,"},{"line_number":35,"context_line":"               \u0027is_sort_key\u0027: True,"},{"line_number":36,"context_line":"               \u0027is_visible\u0027: True,"},{"line_number":37,"context_line":"               \u0027primary_key\u0027: True},"}],"source_content_type":"text/x-python","patch_set":1,"id":"9fb8cfa7_449364a4","line":34,"range":{"start_line":34,"start_character":15,"end_line":34,"end_character":31},"in_reply_to":"9fb8cfa7_1213725e","updated":"2019-06-05 14:03:55.000000000","message":"I agree with Liu.  Plus we can\u0027t just change the API like this anyways, something like this would need to be done in an extension so it\u0027s discoverable.","commit_id":"58ebbee68145b0f73ad5845896797951e6615518"},{"author":{"_account_id":28889,"name":"Guo Jingyu","email":"guojy8993@163.com","username":"pandatt"},"change_message_id":"7ead8b14c27191226379d0fb3313d2580c606ce8","unresolved":false,"context_lines":[{"line_number":31,"context_line":"        \u0027id\u0027: {\u0027allow_post\u0027: True, \u0027allow_put\u0027: False,"},{"line_number":32,"context_line":"               \u0027validate\u0027: {\u0027type:uuid_or_none\u0027: None},"},{"line_number":33,"context_line":"               \u0027is_filter\u0027: True,"},{"line_number":34,"context_line":"               \u0027default\u0027: None,"},{"line_number":35,"context_line":"               \u0027is_sort_key\u0027: True,"},{"line_number":36,"context_line":"               \u0027is_visible\u0027: True,"},{"line_number":37,"context_line":"               \u0027primary_key\u0027: True},"}],"source_content_type":"text/x-python","patch_set":1,"id":"9fb8cfa7_1213725e","line":34,"range":{"start_line":34,"start_character":15,"end_line":34,"end_character":31},"in_reply_to":"9fb8cfa7_23e2efd6","updated":"2019-06-05 09:14:30.000000000","message":"As I can see, validator with `type:uuid_or_none` supports:\n1. user-specified port uuid\n2. no user-specified port uuid. And port uuid will be assigned later(this is the current case).\n\nOnce created, port id will be populated and port id\nis not allowed to be updated(i.e allow_put\u003dFalse). When port identifiers appear as device names, It will still be OK.","commit_id":"58ebbee68145b0f73ad5845896797951e6615518"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"099837c208f05e597dd521b4a3f6020c04b3d405","unresolved":false,"context_lines":[{"line_number":31,"context_line":"        \u0027id\u0027: {\u0027allow_post\u0027: True, \u0027allow_put\u0027: False,"},{"line_number":32,"context_line":"               \u0027validate\u0027: {\u0027type:uuid_or_none\u0027: None},"},{"line_number":33,"context_line":"               \u0027is_filter\u0027: True,"},{"line_number":34,"context_line":"               \u0027default\u0027: None,"},{"line_number":35,"context_line":"               \u0027is_sort_key\u0027: True,"},{"line_number":36,"context_line":"               \u0027is_visible\u0027: True,"},{"line_number":37,"context_line":"               \u0027primary_key\u0027: True},"}],"source_content_type":"text/x-python","patch_set":1,"id":"9fb8cfa7_df9a88c3","line":34,"range":{"start_line":34,"start_character":15,"end_line":34,"end_character":31},"in_reply_to":"9fb8cfa7_449364a4","updated":"2019-06-24 11:58:47.000000000","message":"\u0027default\u0027 means the default value for \u0027id\u0027 attribute. \u0027default\u0027 here is unnecessary even if you allow to specify ID for a port as it can be handled in the logic of create_port.","commit_id":"58ebbee68145b0f73ad5845896797951e6615518"}]}
