)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":34271,"name":"Miro Tomaska","display_name":"Miro Tomaska","email":"mtomaska@redhat.com","username":"mtomaska"},"change_message_id":"8c08ad620b9ceef5610e8efea1026903d36a874c","unresolved":true,"context_lines":[{"line_number":22,"context_line":"SVD is shared by every VNI on the host, so that removed the foundation"},{"line_number":23,"context_line":"under every VRF at once rather than one of them."},{"line_number":24,"context_line":""},{"line_number":25,"context_line":"Second, ``add_vni()`` reports \"this VNI is already configured\" as a"},{"line_number":26,"context_line":"``SvdNetlinkError``, indistinguishable from a real netlink failure, and"},{"line_number":27,"context_line":"its caller has no handler for it. An earlier revision of this change"},{"line_number":28,"context_line":"also fixed that, by raising a distinct subclass. It is dropped here:"},{"line_number":29,"context_line":"1003901 reworks the VNI mapping itself, which is the better fix, and"},{"line_number":30,"context_line":"carrying a narrower version alongside it would only conflict."},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"``_SvdBuilder`` now owns the build. It encapsulates the order the"},{"line_number":33,"context_line":"devices depend on each other in - add the vxlan, add the bridge, connect"},{"line_number":34,"context_line":"the two, then apply what needs both present - and records each device as"},{"line_number":35,"context_line":"it is created, so leaving the block by exception unwinds exactly those,"},{"line_number":36,"context_line":"in reverse. Nothing that was already there is removed, which is the fix:"},{"line_number":37,"context_line":"a pre-existing device belongs to an earlier agent start and may carry"},{"line_number":38,"context_line":"the SVIs and per-VNI dummies of live VNIs."},{"line_number":39,"context_line":""},{"line_number":40,"context_line":"The netlink sequence is unchanged: the same eight operations, in the"},{"line_number":41,"context_line":"same order, with the same arguments. Only which devices a failure"},{"line_number":42,"context_line":"removes has changed."},{"line_number":43,"context_line":""},{"line_number":44,"context_line":"A device that is already present is reported as ``SvdDeviceExists``,"},{"line_number":45,"context_line":"raised by the privileged module and mapped to ``SvdDeviceAlreadyExists``"},{"line_number":46,"context_line":"by ``Svd.create()``, mirroring how ``ip_lib.create_interface()`` raises"},{"line_number":47,"context_line":"``InterfaceAlreadyExists`` for ``BridgeDevice.addbr()`` to catch. An"},{"line_number":48,"context_line":"earlier revision signalled this with a return value; an exception"},{"line_number":49,"context_line":"carries across the stack without a variable per call, and keeps the"},{"line_number":50,"context_line":"create-or-fail contract that ``test_create_svd_device_exists`` asserts."},{"line_number":51,"context_line":"EADDRINUSE is deliberately not caught: a UDP port clash is a real"},{"line_number":52,"context_line":"failure that ``_create_svd_with_free_port()`` retries on another port."},{"line_number":53,"context_line":""},{"line_number":54,"context_line":"One consequence worth naming for merge order. With the ``add_vni()``"},{"line_number":55,"context_line":"half dropped here, an already-configured VNI raises a bare"},{"line_number":56,"context_line":"``SvdNetlinkError`` again, and the ``_PROVISIONING_ERRORS`` tuple in"},{"line_number":57,"context_line":"change 1003198 catches exactly that, logs \"Failed to advertise EVPN"},{"line_number":58,"context_line":"VRF\" and returns. So between 1003198 landing and 1003901 landing, that"},{"line_number":59,"context_line":"case fails silently instead of converging."},{"line_number":60,"context_line":""},{"line_number":61,"context_line":"Two functional tests, each of which fails without this change:"},{"line_number":62,"context_line":"create-twice must leave the existing devices in place, and a create"},{"line_number":63,"context_line":"that fails part way must remove only what it created and not a"},{"line_number":64,"context_line":"same-named pre-existing device."},{"line_number":65,"context_line":""},{"line_number":66,"context_line":"Verified on a five-node deployment, at a revision that still carried"},{"line_number":67,"context_line":"both halves. Before: with an SVD and an orphaned per-VNI dummy present,"},{"line_number":68,"context_line":"the agent crash-looped indefinitely, 0 successful starts,"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"7c584e52_005ea419","line":65,"range":{"start_line":25,"start_character":0,"end_line":65,"end_character":0},"updated":"2026-09-14 23:10:18.000000000","message":"I know this patch has changed a bit, mostly due to my merge conflicts:) but the commit message should just state what this patch is fixing. We can leave any conversation in the launchpad bug","commit_id":"f968f62093c732a1d4569ce1a1cca68d0d38b63a"}],"/PATCHSET_LEVEL":[{"author":{"_account_id":34271,"name":"Miro Tomaska","display_name":"Miro Tomaska","email":"mtomaska@redhat.com","username":"mtomaska"},"change_message_id":"42dc10129b0447dc6c96c00fab11af777643ab10","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":3,"id":"0a55c5fb_9be9cb95","updated":"2026-09-10 01:03:57.000000000","message":"I Phillip. I run into the issue you described in your bug. I mostly AI-coded my 1003901 and the reason I have it WIP is to get to it and really think about all the corner cases. \nI am ok going with your split proposal. I.e. this change keeps the create_svd unwind, while the 1003901 will only add VNI-mapping change.","commit_id":"b9a862f138e1ff0a610147f5d1a362fe8f81f9d0"},{"author":{"_account_id":34271,"name":"Miro Tomaska","display_name":"Miro Tomaska","email":"mtomaska@redhat.com","username":"mtomaska"},"change_message_id":"54dfc24b481e2b673ef70aeb3aed0dfc1ecc20ad","unresolved":true,"context_lines":[],"source_content_type":"","patch_set":4,"id":"963cddd3_3ecb367b","updated":"2026-09-16 02:12:21.000000000","message":"Hi Phillip, \n\nWe recently revisited the topic of SVD while discussing error handling and overall robustness for the EVPN extension. The plan is to add a new error state along with a retry mechanism to the state machine. To support this, we need idempotent commands for creating SVD and FRR configurations, allowing an operation state to continuously attempt recovery until the issue is resolved or cancelled. \n\nTo that end, I just submitted patch 1005817 to make SVD commands idempotent. We can likely still proceed with your patch for now, though a subsequent update may eventually overwrite it. \n\nFeel free to ping me on IRC if you\u0027d like to talk through this further or have concerns","commit_id":"f968f62093c732a1d4569ce1a1cca68d0d38b63a"},{"author":{"_account_id":34271,"name":"Miro Tomaska","display_name":"Miro Tomaska","email":"mtomaska@redhat.com","username":"mtomaska"},"change_message_id":"6d16d0b341de44e59f50b9b50b735aa7a1b54a1a","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":4,"id":"5ec6054b_1366fa9e","updated":"2026-09-17 18:59:03.000000000","message":"Hi Phillip. Sorry it is me again. I want to propose a slight redesign to the EVPN FSM. That will take care of this scenario as well. https://bugs.launchpad.net/neutron/+bug/2167627\n\nPlease add a comment to that LP if you have some concerns","commit_id":"f968f62093c732a1d4569ce1a1cca68d0d38b63a"}],"neutron/privileged/agent/linux/svd.py":[{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"f6d71e6de7cd92cc419f6bf82608ab1e3469f7c2","unresolved":true,"context_lines":[{"line_number":183,"context_line":""},{"line_number":184,"context_line":""},{"line_number":185,"context_line":"@privileged.default.entrypoint"},{"line_number":186,"context_line":"def create_svd(br_evpn, vxlan_evpn, local_ip, mac, vxlan_parent, dstport,"},{"line_number":187,"context_line":"               br_mtu):"},{"line_number":188,"context_line":"    \"\"\"Create a shared Single VxLAN Device (SVD)"},{"line_number":189,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"c52f3729_baccb153","line":186,"updated":"2026-08-31 15:02:35.000000000","message":"I haven\u0027t liked from the beginning the function creates everything in a single call with no error handling per device. I think now it\u0027s time to break it down to a function per device with its own error handling, instead of monitoring which device we actually created successfully and then loop over them in a cleanup.\n\nWhat do you think about that approach?","commit_id":"ee4669e7b35ebd4268c96ea93f9c122c238f3d19"},{"author":{"_account_id":32681,"name":"Phillip Dale","email":"phillip.dale@cleura.com","username":"pdale62"},"change_message_id":"3e0c2e2c68cab819c6dc5fe176106c1ab096d8cb","unresolved":true,"context_lines":[{"line_number":183,"context_line":""},{"line_number":184,"context_line":""},{"line_number":185,"context_line":"@privileged.default.entrypoint"},{"line_number":186,"context_line":"def create_svd(br_evpn, vxlan_evpn, local_ip, mac, vxlan_parent, dstport,"},{"line_number":187,"context_line":"               br_mtu):"},{"line_number":188,"context_line":"    \"\"\"Create a shared Single VxLAN Device (SVD)"},{"line_number":189,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"9dc67238_0583fbcb","line":186,"in_reply_to":"bc5ad64c_fd253834","updated":"2026-09-01 07:09:25.000000000","message":"Want to confirm I\u0027ve read this right before writing it: the objection is to tracking created devices so they can be rolled back, not to the fix itself, so the goal is a shape where nothing needs undoing.\n\nMiro - agreed they compose, and 1003198 looks right as is: yours stops the process dying, this one stops the SVD being destroyed.\n\nIf I have it right, the split is three rather than two, since one step is a relationship rather than a device:\n\n- create_bridge() - ADD bridge (vlan_filtering, pvid 0), mac, up, mtu, addrgenmode none\n- create_vxlan() - parent lookup, ADD vxlan (dstport, local, no learning, vnifilter), mac, addrgenmode none\n- attach() - vxlan master\u003dbridge and up, then brport vlan_tunnel / neigh_suppress / learning off\n\nThen the fork, which is where I\u0027d like your input:\n\n- create-or-fail (today\u0027s contract): attach() failing still leaves someone deciding whether to remove the bridge and vxlan, so the tracking moves up to the caller rather than disappearing.\n- create-or-reuse: no rollback at all, and a partially built SVD gets completed on the next agent start, which this path already runs on every start. This is the option that actually removes the created list.\n\nFour things worth naming before picking:\n\n1. create-or-reuse means rewriting test_create_svd_device_exists and test_add_vni_netlink_error, which assert a second call raises.\n\n2. A pre-existing vxlan can\u0027t be corrected by a SET - parent, dstport, local and vnifilter are creation-time - so reuse means either verifying those against the existing device or trusting it, and recreating to fix a mismatch would destroy the VNIs riding on it.\n\n3. It settles the interaction with 1003198: _PROVISIONING_ERRORS catches SvdNetlinkError, which is what \"VNI already configured\" raises today. Under create-or-fail that needs handling below the FSM or the VRF is logged as failed and left unadvertised; under create-or-reuse it never raises and the question disappears.\n\n4. Either way I\u0027d prefer attach() to re-apply its SETs unconditionally rather than be skipped when the master is already set. vlan_tunnel and neigh_suppress are what let the one vxlan carry many VNIs, so a port that is enslaved but missing those flags breaks multi-VNI while a single VNI can still look healthy. The SETs are idempotent, so re-applying costs nothing.\n\nWhich path?","commit_id":"ee4669e7b35ebd4268c96ea93f9c122c238f3d19"},{"author":{"_account_id":32681,"name":"Phillip Dale","email":"phillip.dale@cleura.com","username":"pdale62"},"change_message_id":"35a134bb020ca37bdd05eeca17dcf223764cb518","unresolved":true,"context_lines":[{"line_number":183,"context_line":""},{"line_number":184,"context_line":""},{"line_number":185,"context_line":"@privileged.default.entrypoint"},{"line_number":186,"context_line":"def create_svd(br_evpn, vxlan_evpn, local_ip, mac, vxlan_parent, dstport,"},{"line_number":187,"context_line":"               br_mtu):"},{"line_number":188,"context_line":"    \"\"\"Create a shared Single VxLAN Device (SVD)"},{"line_number":189,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"c59e8427_cdd1651e","line":186,"in_reply_to":"c52f3729_baccb153","updated":"2026-08-31 16:56:18.000000000","message":"Makes sense. Two shapes: bridge / vxlan / attach as helpers inside this entrypoint, or as separate entrypoints. The enslave-plus-brport step needs both devices, so it wants its own function either way.\n\nWhich would you prefer? And should those stay create-or-fail, or become create-or-reuse? Reuse drops the rollback entirely, but changes what test_create_svd_device_exists and test_add_vni_netlink_error assert.\n\nHappy to write it. Fold into this change, or land this fix and stack the restructure on top?","commit_id":"ee4669e7b35ebd4268c96ea93f9c122c238f3d19"},{"author":{"_account_id":34271,"name":"Miro Tomaska","display_name":"Miro Tomaska","email":"mtomaska@redhat.com","username":"mtomaska"},"change_message_id":"0d4e02c450a4959474c561368a70c3ec5f777394","unresolved":true,"context_lines":[{"line_number":183,"context_line":""},{"line_number":184,"context_line":""},{"line_number":185,"context_line":"@privileged.default.entrypoint"},{"line_number":186,"context_line":"def create_svd(br_evpn, vxlan_evpn, local_ip, mac, vxlan_parent, dstport,"},{"line_number":187,"context_line":"               br_mtu):"},{"line_number":188,"context_line":"    \"\"\"Create a shared Single VxLAN Device (SVD)"},{"line_number":189,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"bc5ad64c_fd253834","line":186,"in_reply_to":"c59e8427_cdd1651e","updated":"2026-09-01 02:52:01.000000000","message":"I agree with Jakub. I actually just added(before looking at this patch) error handling into nl_dispatcher [1]. I think that my patch is still OK as is, while this patch can improve the SVD mechanics and error operations\n\nhttps://review.opendev.org/c/openstack/neutron/+/1003198","commit_id":"ee4669e7b35ebd4268c96ea93f9c122c238f3d19"},{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"bd16a2369660301b76081c266ddb8343b5d6af0c","unresolved":true,"context_lines":[{"line_number":179,"context_line":"    \"\"\""},{"line_number":180,"context_line":"    try:"},{"line_number":181,"context_line":"        ipr.link(nl_const.IP_LINK_ADD, **kwargs)"},{"line_number":182,"context_line":"        return True"},{"line_number":183,"context_line":"    except netlink_exc.NetlinkError as e:"},{"line_number":184,"context_line":"        if e.code \u003d\u003d errno.EEXIST:"},{"line_number":185,"context_line":"            return False"}],"source_content_type":"text/x-python","patch_set":2,"id":"ca30cb27_3199826b","line":182,"updated":"2026-09-03 12:23:48.000000000","message":"using a boolean to indicate an error is a Python anti-pattern. Using custom exceptions is a way to go because you won\u0027t need to pass a variable in case of multiple calls and you can catch an exception across the stack.","commit_id":"9a52ed4620cbe655a20e8f256179799b7c09638f"},{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"bd16a2369660301b76081c266ddb8343b5d6af0c","unresolved":true,"context_lines":[{"line_number":284,"context_line":"    with priv_ip_lib.get_iproute(None) as ipr:"},{"line_number":285,"context_line":"        vxlan_idx, vxlan_new \u003d _ensure_vxlan("},{"line_number":286,"context_line":"            ipr, vxlan_evpn, local_ip, vxlan_parent, dstport)"},{"line_number":287,"context_line":"        br_idx, br_new \u003d _ensure_bridge(ipr, br_evpn, mac)"},{"line_number":288,"context_line":"        _attach_vxlan_to_bridge(ipr, br_idx, vxlan_idx, mac)"},{"line_number":289,"context_line":"        _finalise_svd(ipr, br_idx, vxlan_idx, br_mtu)"},{"line_number":290,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"180a233b_3cc7e0e5","line":287,"updated":"2026-09-03 12:23:48.000000000","message":"The right way here would be to have a data structure/class that encapsulates the dependency of devices on the SVD. For example if we go \"vxlan -\u003e bridge -\u003e connect the two\" then failing creating the bridge should delete the created vxlan, and failing to connect should delete both the vxlan device and the bridge.","commit_id":"9a52ed4620cbe655a20e8f256179799b7c09638f"}]}
