)]}'
{"/PATCHSET_LEVEL":[{"author":{"_account_id":30911,"name":"Jan Horstmann","email":"horstmann@osism.tech","username":"jhorstmann"},"change_message_id":"6555588a8e23b2b7bbf4847fbe55ef2f617be797","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":2,"id":"91564f9c_a8517ac2","updated":"2023-03-17 15:13:47.000000000","message":"The whole approach is a bit hacky right now, but could maybe be cleaned up by rewriting some logic in a custom ansible module.\n\nRight now there is no prior art in kolla-ansible for using an openstack service API to orchestrate a container restart. I would love to hear some feedback","commit_id":"3786a35d3442ba9a48a516a98d9e60a28281f01e"},{"author":{"_account_id":32553,"name":"Sven Kieske","email":"sven_oss@posteo.de","username":"skieske"},"change_message_id":"8820eac9995ef1c208af1e43addb1ec4578c36ee","unresolved":true,"context_lines":[],"source_content_type":"","patch_set":3,"id":"6a7844cb_6a2638d9","updated":"2024-02-26 16:33:10.000000000","message":"so people ask about this (most can\u0027t use it, because it\u0027s not merged upstream).\n\nthe current solution with calculating how long it takes to create a router and then extrapolate that and configure the delay option is impractical in some environments.\n\nwhat happened to the alternate solution with regards to splitting the processes up in more containers @mnasiadka@gmail.com ? Do you happen to know?","commit_id":"459ca9f45dc9d39e1d36cc5f1d8ddb4978f60f6d"},{"author":{"_account_id":30911,"name":"Jan Horstmann","email":"horstmann@osism.tech","username":"jhorstmann"},"change_message_id":"77c0f8fa3188d751da7fb7aefd99561943f6309b","unresolved":true,"context_lines":[],"source_content_type":"","patch_set":3,"id":"8b5a65e4_2dd4aeb0","in_reply_to":"4b1d5ce5_b59b23b3","updated":"2025-07-14 13:37:43.000000000","message":"Glad the proper solution found its way into a release. I totally missed it. Thanks @mnasiadka@gmail.com\n\nI don\u0027t think anybody should use this anymore","commit_id":"459ca9f45dc9d39e1d36cc5f1d8ddb4978f60f6d"},{"author":{"_account_id":22629,"name":"Michal Nasiadka","email":"mnasiadka@gmail.com","username":"mnasiadka"},"change_message_id":"a22a61e04c82a6c87d87ae86903339e89be5a810","unresolved":true,"context_lines":[],"source_content_type":"","patch_set":3,"id":"4b1d5ce5_b59b23b3","in_reply_to":"6a7844cb_6a2638d9","updated":"2025-07-14 11:58:39.000000000","message":"The alternate solution is merged since 2025.1 - and I believe this is not required anymore, unless someone wants to point out that it is :-)","commit_id":"459ca9f45dc9d39e1d36cc5f1d8ddb4978f60f6d"}],"ansible/roles/neutron/defaults/main.yml":[{"author":{"_account_id":22629,"name":"Michal Nasiadka","email":"mnasiadka@gmail.com","username":"mnasiadka"},"change_message_id":"a9d353d23dd39a020fe7b1c8587b4322de3f8251","unresolved":true,"context_lines":[{"line_number":601,"context_line":""},{"line_number":602,"context_line":"# When true, neutron l3 agents on network nodes will be disabled before being restarted and enabled afterwards."},{"line_number":603,"context_line":"# A check is run before to make sure that routers are synced on the remaining l3 agents"},{"line_number":604,"context_line":"neutron_l3_agent_graceful_failover: false"},{"line_number":605,"context_line":""},{"line_number":606,"context_line":"ovsdb_timeout: 10"},{"line_number":607,"context_line":""}],"source_content_type":"text/x-yaml","patch_set":2,"id":"a6009cf3_e04b9d31","line":604,"updated":"2023-08-23 13:24:15.000000000","message":"should we enable that in CI jobs for testing coverage?","commit_id":"3786a35d3442ba9a48a516a98d9e60a28281f01e"},{"author":{"_account_id":30911,"name":"Jan Horstmann","email":"horstmann@osism.tech","username":"jhorstmann"},"change_message_id":"9ad3c456ae2a5f22c558a9fd057a86c1ffab0a6b","unresolved":true,"context_lines":[{"line_number":601,"context_line":""},{"line_number":602,"context_line":"# When true, neutron l3 agents on network nodes will be disabled before being restarted and enabled afterwards."},{"line_number":603,"context_line":"# A check is run before to make sure that routers are synced on the remaining l3 agents"},{"line_number":604,"context_line":"neutron_l3_agent_graceful_failover: false"},{"line_number":605,"context_line":""},{"line_number":606,"context_line":"ovsdb_timeout: 10"},{"line_number":607,"context_line":""}],"source_content_type":"text/x-yaml","patch_set":2,"id":"bee28a1b_be1598a9","line":604,"in_reply_to":"a6009cf3_e04b9d31","updated":"2023-08-31 11:30:45.000000000","message":"I had a quick look at the tests kolla-ansible does. Most of this change would be skipped during initial deployments ([1]), but it should get triggered during upgrade tests.\nAre there tests that check instance availability during upgrades? If not then we will only check whether the code in this change runs successfully, but not if it has the desired effect.\nAre upgrade tests run in a high available deployment? If not then this change will only delay the restart of the l3 agent without any agents to take over, thus increasing the downtime compared to a simple restart.\n\nIf the intention is to just run this code on upgrades then I could simply switch this to `true` during tests. For anything more I would have to check how to implement that.\n\n[1]\nhttps://review.opendev.org/c/openstack/kolla-ansible/+/874769/2/ansible/roles/neutron/handlers/main.yml#143","commit_id":"3786a35d3442ba9a48a516a98d9e60a28281f01e"}],"ansible/roles/neutron/tasks/restart_neutron_l3_agent.yml":[{"author":{"_account_id":22629,"name":"Michal Nasiadka","email":"mnasiadka@gmail.com","username":"mnasiadka"},"change_message_id":"d666bdade723c52d0efa22f5caa4ec1e8f175396","unresolved":true,"context_lines":[{"line_number":20,"context_line":"  failed_when: l3_agent_id.stdout \u003d\u003d \"\""},{"line_number":21,"context_line":"  when: neutron_l3_agent_graceful_failover | bool"},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"- name: Wait for routers to be synced on foreign network node l3 agents"},{"line_number":24,"context_line":"  become: true"},{"line_number":25,"context_line":"  kolla_toolbox:"},{"line_number":26,"context_line":"    module_name: command"}],"source_content_type":"text/x-yaml","patch_set":2,"id":"e0f1235c_e6d224bd","line":23,"updated":"2023-08-23 13:22:35.000000000","message":"can we move it an ansible module or something similar? inline python is a bit unreadable ;-)","commit_id":"3786a35d3442ba9a48a516a98d9e60a28281f01e"},{"author":{"_account_id":30911,"name":"Jan Horstmann","email":"horstmann@osism.tech","username":"jhorstmann"},"change_message_id":"9ad3c456ae2a5f22c558a9fd057a86c1ffab0a6b","unresolved":true,"context_lines":[{"line_number":20,"context_line":"  failed_when: l3_agent_id.stdout \u003d\u003d \"\""},{"line_number":21,"context_line":"  when: neutron_l3_agent_graceful_failover | bool"},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"- name: Wait for routers to be synced on foreign network node l3 agents"},{"line_number":24,"context_line":"  become: true"},{"line_number":25,"context_line":"  kolla_toolbox:"},{"line_number":26,"context_line":"    module_name: command"}],"source_content_type":"text/x-yaml","patch_set":2,"id":"a165527d_bc500407","line":23,"in_reply_to":"e0f1235c_e6d224bd","updated":"2023-08-31 11:30:45.000000000","message":"I absolutely agree, but did not want to put any more effort into this change at this point.\nI whipped it up as a proof of concept and to alleviate some of the operational pain we had with neutron deployments.\nThe approach of comparing configured routers with routers marked as active on the l3 agent is inherently racy and probably only works well in environments with little churn in router creation/deletion. It was dismissed rather briefly when I mentioned it on the mailing list ([1]).\nAfter writing this it was my impression that the proper fix for the issue was the approach taken by tripleo ([2]) and that this was also favoured by kolla ([3]).\nThat being said, we have this running in our production environment and have done a couple of deployments with it. It works reasonably well and we do not have the resources right now to work on an alternative version.\nHowever, if kolla really wants to use this approach I could probably set some time apart to get this into an acceptable state. If there is no definite commitment on that then I would rather carry this change along downstream and hope that I do not have to touch it again until a proper solution has been found ;)\n\n\n[1]\nhttps://lists.openstack.org/pipermail/openstack-discuss/2023-March/032823.html\n\n[2]\nhttps://bugs.launchpad.net/tripleo/+bug/1749209\n\n[3]\nhttps://review.opendev.org/c/openstack/kolla-ansible/+/864780/29","commit_id":"3786a35d3442ba9a48a516a98d9e60a28281f01e"},{"author":{"_account_id":32553,"name":"Sven Kieske","email":"sven_oss@posteo.de","username":"skieske"},"change_message_id":"dc38f2da801db10558865bddab0cad480c7ddb11","unresolved":true,"context_lines":[{"line_number":24,"context_line":"  become: true"},{"line_number":25,"context_line":"  kolla_toolbox:"},{"line_number":26,"context_line":"    module_name: command"},{"line_number":27,"context_line":"    module_args: |"},{"line_number":28,"context_line":"      /usr/bin/python3 -c \u0027"},{"line_number":29,"context_line":"      import os"},{"line_number":30,"context_line":"      import sys"},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"      for f in os.scandir(\"/opt/ansible/lib\"):"},{"line_number":33,"context_line":"          if f.is_dir() and f.name.startswith(\"python\"):"},{"line_number":34,"context_line":"              sys.path.append(f.path  + \"/site-packages\")"},{"line_number":35,"context_line":""},{"line_number":36,"context_line":"      import openstack"},{"line_number":37,"context_line":""},{"line_number":38,"context_line":"      this_agent_id \u003d \"{{ l3_agent_id.stdout }}\""},{"line_number":39,"context_line":""},{"line_number":40,"context_line":"      client \u003d openstack.connection.Connection("},{"line_number":41,"context_line":"          interface\u003d\"internal\","},{"line_number":42,"context_line":"          identity_api_version\u003d\"3\","},{"line_number":43,"context_line":"          region_name\u003d\"{{ openstack_region_name }}\","},{"line_number":44,"context_line":"          auth\u003ddict("},{"line_number":45,"context_line":"            auth_url\u003d\"{{ openstack_auth.auth_url }}\","},{"line_number":46,"context_line":"            project_domain_name\u003d\"{{ openstack_auth.domain_name }}\","},{"line_number":47,"context_line":"            project_name\u003d\"{{ openstack_auth.project_name }}\","},{"line_number":48,"context_line":"            username\u003d\"{{ openstack_auth.username }}\","},{"line_number":49,"context_line":"            password\u003d\"{{ openstack_auth.password }}\","},{"line_number":50,"context_line":"            user_domain_name\u003d\"{{ openstack_auth.user_domain_name }}\""},{"line_number":51,"context_line":"          )"},{"line_number":52,"context_line":"      )"},{"line_number":53,"context_line":"      l3_agent_synced \u003d ["},{"line_number":54,"context_line":"          len(["},{"line_number":55,"context_line":"              router"},{"line_number":56,"context_line":"              for router in client.network.agent_hosted_routers(agent)"},{"line_number":57,"context_line":"                  if router.is_admin_state_up"},{"line_number":58,"context_line":"          ]) \u003c\u003d client.network.get_agent(agent).configuration[\"routers\"]"},{"line_number":59,"context_line":"          for agent in client.network.agents()"},{"line_number":60,"context_line":"              if agent.agent_type \u003d\u003d \"L3 agent\""},{"line_number":61,"context_line":"                 and agent.id !\u003d this_agent_id"},{"line_number":62,"context_line":"                 and (agent.configuration[\"agent_mode\"] \u003d\u003d \"dvr_snat\" or agent.configuration[\"agent_mode\"] \u003d\u003d \"legacy\")"},{"line_number":63,"context_line":"      ]"},{"line_number":64,"context_line":"      if not all(l3_agent_synced):"},{"line_number":65,"context_line":"          sys.exit(1)"},{"line_number":66,"context_line":"      \u0027"},{"line_number":67,"context_line":"  register: router_ha"},{"line_number":68,"context_line":"  until: router_ha.rc \u003d\u003d 0"},{"line_number":69,"context_line":"  retries: 30"}],"source_content_type":"text/x-yaml","patch_set":2,"id":"2f40ef18_ac533944","line":66,"range":{"start_line":27,"start_character":3,"end_line":66,"end_character":7},"updated":"2023-08-23 14:07:43.000000000","message":"so, I\u0027m not sure if this complex python program really should be part of this restart task or be split out into it\u0027s own python file and just being called here.\n\nthis way we would get additional benefits like actual python linting and it would be possible to test this code on it\u0027s own.\n\nthat being said, this could also be done in a follow up.","commit_id":"3786a35d3442ba9a48a516a98d9e60a28281f01e"},{"author":{"_account_id":30911,"name":"Jan Horstmann","email":"horstmann@osism.tech","username":"jhorstmann"},"change_message_id":"9ad3c456ae2a5f22c558a9fd057a86c1ffab0a6b","unresolved":true,"context_lines":[{"line_number":24,"context_line":"  become: true"},{"line_number":25,"context_line":"  kolla_toolbox:"},{"line_number":26,"context_line":"    module_name: command"},{"line_number":27,"context_line":"    module_args: |"},{"line_number":28,"context_line":"      /usr/bin/python3 -c \u0027"},{"line_number":29,"context_line":"      import os"},{"line_number":30,"context_line":"      import sys"},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"      for f in os.scandir(\"/opt/ansible/lib\"):"},{"line_number":33,"context_line":"          if f.is_dir() and f.name.startswith(\"python\"):"},{"line_number":34,"context_line":"              sys.path.append(f.path  + \"/site-packages\")"},{"line_number":35,"context_line":""},{"line_number":36,"context_line":"      import openstack"},{"line_number":37,"context_line":""},{"line_number":38,"context_line":"      this_agent_id \u003d \"{{ l3_agent_id.stdout }}\""},{"line_number":39,"context_line":""},{"line_number":40,"context_line":"      client \u003d openstack.connection.Connection("},{"line_number":41,"context_line":"          interface\u003d\"internal\","},{"line_number":42,"context_line":"          identity_api_version\u003d\"3\","},{"line_number":43,"context_line":"          region_name\u003d\"{{ openstack_region_name }}\","},{"line_number":44,"context_line":"          auth\u003ddict("},{"line_number":45,"context_line":"            auth_url\u003d\"{{ openstack_auth.auth_url }}\","},{"line_number":46,"context_line":"            project_domain_name\u003d\"{{ openstack_auth.domain_name }}\","},{"line_number":47,"context_line":"            project_name\u003d\"{{ openstack_auth.project_name }}\","},{"line_number":48,"context_line":"            username\u003d\"{{ openstack_auth.username }}\","},{"line_number":49,"context_line":"            password\u003d\"{{ openstack_auth.password }}\","},{"line_number":50,"context_line":"            user_domain_name\u003d\"{{ openstack_auth.user_domain_name }}\""},{"line_number":51,"context_line":"          )"},{"line_number":52,"context_line":"      )"},{"line_number":53,"context_line":"      l3_agent_synced \u003d ["},{"line_number":54,"context_line":"          len(["},{"line_number":55,"context_line":"              router"},{"line_number":56,"context_line":"              for router in client.network.agent_hosted_routers(agent)"},{"line_number":57,"context_line":"                  if router.is_admin_state_up"},{"line_number":58,"context_line":"          ]) \u003c\u003d client.network.get_agent(agent).configuration[\"routers\"]"},{"line_number":59,"context_line":"          for agent in client.network.agents()"},{"line_number":60,"context_line":"              if agent.agent_type \u003d\u003d \"L3 agent\""},{"line_number":61,"context_line":"                 and agent.id !\u003d this_agent_id"},{"line_number":62,"context_line":"                 and (agent.configuration[\"agent_mode\"] \u003d\u003d \"dvr_snat\" or agent.configuration[\"agent_mode\"] \u003d\u003d \"legacy\")"},{"line_number":63,"context_line":"      ]"},{"line_number":64,"context_line":"      if not all(l3_agent_synced):"},{"line_number":65,"context_line":"          sys.exit(1)"},{"line_number":66,"context_line":"      \u0027"},{"line_number":67,"context_line":"  register: router_ha"},{"line_number":68,"context_line":"  until: router_ha.rc \u003d\u003d 0"},{"line_number":69,"context_line":"  retries: 30"}],"source_content_type":"text/x-yaml","patch_set":2,"id":"9d037030_ef5a9d2a","line":66,"range":{"start_line":27,"start_character":3,"end_line":66,"end_character":7},"in_reply_to":"2f40ef18_ac533944","updated":"2023-08-31 11:30:45.000000000","message":"Hi Sven,\nI agree that this should not be merged like this. This is more in a proof of concept state. Michal Nasiadka made a similar comment ([1]), which I have replied to. Let\u0027s take this discussion there.\n\n[1]\nhttps://review.opendev.org/c/openstack/kolla-ansible/+/874769/2#message-d666bdade723c52d0efa22f5caa4ec1e8f175396","commit_id":"3786a35d3442ba9a48a516a98d9e60a28281f01e"},{"author":{"_account_id":32553,"name":"Sven Kieske","email":"sven_oss@posteo.de","username":"skieske"},"change_message_id":"00c879c9b589f4d2bc284d9cc397dd0e23d5d1dd","unresolved":false,"context_lines":[{"line_number":24,"context_line":"  become: true"},{"line_number":25,"context_line":"  kolla_toolbox:"},{"line_number":26,"context_line":"    module_name: command"},{"line_number":27,"context_line":"    module_args: |"},{"line_number":28,"context_line":"      /usr/bin/python3 -c \u0027"},{"line_number":29,"context_line":"      import os"},{"line_number":30,"context_line":"      import sys"},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"      for f in os.scandir(\"/opt/ansible/lib\"):"},{"line_number":33,"context_line":"          if f.is_dir() and f.name.startswith(\"python\"):"},{"line_number":34,"context_line":"              sys.path.append(f.path  + \"/site-packages\")"},{"line_number":35,"context_line":""},{"line_number":36,"context_line":"      import openstack"},{"line_number":37,"context_line":""},{"line_number":38,"context_line":"      this_agent_id \u003d \"{{ l3_agent_id.stdout }}\""},{"line_number":39,"context_line":""},{"line_number":40,"context_line":"      client \u003d openstack.connection.Connection("},{"line_number":41,"context_line":"          interface\u003d\"internal\","},{"line_number":42,"context_line":"          identity_api_version\u003d\"3\","},{"line_number":43,"context_line":"          region_name\u003d\"{{ openstack_region_name }}\","},{"line_number":44,"context_line":"          auth\u003ddict("},{"line_number":45,"context_line":"            auth_url\u003d\"{{ openstack_auth.auth_url }}\","},{"line_number":46,"context_line":"            project_domain_name\u003d\"{{ openstack_auth.domain_name }}\","},{"line_number":47,"context_line":"            project_name\u003d\"{{ openstack_auth.project_name }}\","},{"line_number":48,"context_line":"            username\u003d\"{{ openstack_auth.username }}\","},{"line_number":49,"context_line":"            password\u003d\"{{ openstack_auth.password }}\","},{"line_number":50,"context_line":"            user_domain_name\u003d\"{{ openstack_auth.user_domain_name }}\""},{"line_number":51,"context_line":"          )"},{"line_number":52,"context_line":"      )"},{"line_number":53,"context_line":"      l3_agent_synced \u003d ["},{"line_number":54,"context_line":"          len(["},{"line_number":55,"context_line":"              router"},{"line_number":56,"context_line":"              for router in client.network.agent_hosted_routers(agent)"},{"line_number":57,"context_line":"                  if router.is_admin_state_up"},{"line_number":58,"context_line":"          ]) \u003c\u003d client.network.get_agent(agent).configuration[\"routers\"]"},{"line_number":59,"context_line":"          for agent in client.network.agents()"},{"line_number":60,"context_line":"              if agent.agent_type \u003d\u003d \"L3 agent\""},{"line_number":61,"context_line":"                 and agent.id !\u003d this_agent_id"},{"line_number":62,"context_line":"                 and (agent.configuration[\"agent_mode\"] \u003d\u003d \"dvr_snat\" or agent.configuration[\"agent_mode\"] \u003d\u003d \"legacy\")"},{"line_number":63,"context_line":"      ]"},{"line_number":64,"context_line":"      if not all(l3_agent_synced):"},{"line_number":65,"context_line":"          sys.exit(1)"},{"line_number":66,"context_line":"      \u0027"},{"line_number":67,"context_line":"  register: router_ha"},{"line_number":68,"context_line":"  until: router_ha.rc \u003d\u003d 0"},{"line_number":69,"context_line":"  retries: 30"}],"source_content_type":"text/x-yaml","patch_set":2,"id":"c49b6386_fe1228b7","line":66,"range":{"start_line":27,"start_character":3,"end_line":66,"end_character":7},"in_reply_to":"9d037030_ef5a9d2a","updated":"2023-08-31 12:13:14.000000000","message":"Ack","commit_id":"3786a35d3442ba9a48a516a98d9e60a28281f01e"}]}
