)]}'
{"/PATCHSET_LEVEL":[{"author":{"_account_id":25437,"name":"Allain Legacy","email":"alegacy@redhat.com","username":"alegacy"},"change_message_id":"3a87d42e025f361b458bc61cddc4e1f74c128d4c","unresolved":true,"context_lines":[],"source_content_type":"","patch_set":2,"id":"c9c36b87_1b5220cf","updated":"2026-10-14 18:00:30.000000000","message":"You\u0027re correct.  A trunk-\u003eaccess or trunk-\u003etrunk change would require a reset to clear the allowed_vlans, in fact an access-\u003etrunk might also require one as well.","commit_id":"0f2e60bcb5bf9658773141bd857103652fae11c4"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"33d8a865e71057de696b05160daba232a7e220fb","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":3,"id":"9ee538d2_b1544891","updated":"2026-10-27 22:57:53.000000000","message":"Greetings, this change is in merge conflict. It would be helpful if you could rebase it. Thanks!","commit_id":"bde65a4d6fc80c7df1e9e64541e0bf9d500c21c7"},{"author":{"_account_id":39539,"name":"葉力維","display_name":"Yeh Li Wei","email":"yeisimon657@gmail.com","username":"Simon657"},"change_message_id":"8bc7eea3a43e4c1b962e5df99d09928afa53bd07","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":3,"id":"f5f1d3cf_97cd49dd","in_reply_to":"9ee538d2_b1544891","updated":"2026-10-29 05:59:35.000000000","message":"Hi Julia, thanks for the heads-up! I have resolved the merge conflicts and rebased the change in Patch set 4. Please take a look when you have a chance!","commit_id":"bde65a4d6fc80c7df1e9e64541e0bf9d500c21c7"}],"ironic/drivers/modules/network/ironic_networking.py":[{"author":{"_account_id":25437,"name":"Allain Legacy","email":"alegacy@redhat.com","username":"alegacy"},"change_message_id":"bad19bf633a6616a128ba4b42014d9b24ed56951","unresolved":true,"context_lines":[{"line_number":681,"context_line":"                switch_id \u003d current_local_link.get(\u0027switch_id\u0027)"},{"line_number":682,"context_line":"                port_name \u003d current_local_link.get(\u0027port_id\u0027)"},{"line_number":683,"context_line":"                if switch_id and port_name:"},{"line_number":684,"context_line":"                    reset_result \u003d networking_api.reset_port("},{"line_number":685,"context_line":"                        task.context, switch_id, port_name,"},{"line_number":686,"context_line":"                        original_config.native_vlan,"},{"line_number":687,"context_line":"                        allowed_vlans\u003doriginal_config.allowed_vlans,"},{"line_number":688,"context_line":"                        default_vlan\u003didle_vlan)"},{"line_number":689,"context_line":"                    LOG.debug("},{"line_number":690,"context_line":"                        \"Successfully reset previous VLAN for port \""},{"line_number":691,"context_line":"                        \"%(port_name)s on switch %(switch_id)s before \""}],"source_content_type":"text/x-python","patch_set":1,"id":"467582d7_eb77b094","line":688,"range":{"start_line":684,"start_character":0,"end_line":688,"end_character":47},"updated":"2026-10-14 17:27:52.000000000","message":"Is this reset_port() necessary?  Couldn\u0027t the `original_config.native_vlan` be passed to `update_port()` below as `default_vlan\u003doriginal_config.native_vlan`.  That was sort of the intent of adding that parameter (albeit maybe poorly named).","commit_id":"4794bc38c78c54688006e57898f3156382a9d8ba"},{"author":{"_account_id":25437,"name":"Allain Legacy","email":"alegacy@redhat.com","username":"alegacy"},"change_message_id":"62a9f674c32170077298274455c1bf1739eb7726","unresolved":true,"context_lines":[{"line_number":702,"context_line":"                if access_only:"},{"line_number":703,"context_line":"                    current_vlan \u003d original_config.native_vlan"},{"line_number":704,"context_line":"                elif switch_id and port_name:"},{"line_number":705,"context_line":"                    networking_api.reset_port("},{"line_number":706,"context_line":"                        task.context, switch_id, port_name,"},{"line_number":707,"context_line":"                        original_config.native_vlan,"},{"line_number":708,"context_line":"                        allowed_vlans\u003doriginal_config.allowed_vlans,"}],"source_content_type":"text/x-python","patch_set":4,"id":"6b23b187_3550f12d","line":705,"updated":"2026-10-29 12:43:44.000000000","message":"Sorry, I didn\u0027t pick this up on my first pass, but there\u0027s an issue here with the possibility that the reset succeeds and the update fails.  That would leave the port in a reset state.  It would be good if there was an attempt to update again back to the original state.","commit_id":"4748f38e3339baa466dde26cb73a7c33190ef37e"},{"author":{"_account_id":39539,"name":"葉力維","display_name":"Yeh Li Wei","email":"yeisimon657@gmail.com","username":"Simon657"},"change_message_id":"bf171db17de64d96048935dbf7b2b373326a63f7","unresolved":false,"context_lines":[{"line_number":702,"context_line":"                if access_only:"},{"line_number":703,"context_line":"                    current_vlan \u003d original_config.native_vlan"},{"line_number":704,"context_line":"                elif switch_id and port_name:"},{"line_number":705,"context_line":"                    networking_api.reset_port("},{"line_number":706,"context_line":"                        task.context, switch_id, port_name,"},{"line_number":707,"context_line":"                        original_config.native_vlan,"},{"line_number":708,"context_line":"                        allowed_vlans\u003doriginal_config.allowed_vlans,"}],"source_content_type":"text/x-python","patch_set":4,"id":"0cb1ac6d_6d8eee62","line":705,"in_reply_to":"6b23b187_3550f12d","updated":"2026-10-29 15:10:16.000000000","message":"Thanks a lot for catching this, Allain, and no need to apologize. It\u0027s a really good point, and I hadn\u0027t thought through the case where the reset succeeds but the update fails.\n\nAddressed in PS5: if update_port() fails after reset_port(), the port is now restored to its previous configuration on a best-effort basis. A failed restore is logged, and the original error is still re-raised so the failure isn\u0027t hidden.\n\nWhile looking at this, I also found a related case and added a small extra safeguard: if the new switchport configuration isn\u0027t valid for its mode (e.g. a trunk without allowed_vlans), the reset is now skipped entirely. No update would follow in that case, so resetting first would only leave the port on the idle network. The port now stays on its previous configuration, which matches the behavior before this change.\n\nI\u0027ve added unit tests for the restore-success, restore-failure, no-reset (access to access), and invalid-new-config paths.\n\nThanks again for the careful review!","commit_id":"4748f38e3339baa466dde26cb73a7c33190ef37e"}]}
