Skip to content

[mgmt-vrf]: Fix mgmt VRF configuration failure#25332

Merged
lihuay merged 12 commits intosonic-net:masterfrom
rminnikanti:fix_vrf
Feb 27, 2026
Merged

[mgmt-vrf]: Fix mgmt VRF configuration failure#25332
lihuay merged 12 commits intosonic-net:masterfrom
rminnikanti:fix_vrf

Conversation

@rminnikanti
Copy link
Copy Markdown
Contributor

Why I did it

Adding mgmt vrf is failing on latest 202511 images after trixie update. Older versions of iproute2 package on bookworm (6.1.0-3) has /etc/iproute2/rt_tables.d directory because of which ifupdown2_vrf_map.conf generated by ifupdown2 in this directory always succeeded.

New version of iproute2 (6.15.0-1) in trixie doesn't have /etc/iproute2 directory, because of which vrf map conf generation failing, in-turn resulting in mgmt VRF creation failure.

Work item tracking
  • Microsoft ADO (number only):

How I did it

Fix is to ensure /etc/iproute2/rt_tables.d directory present before generating ifupdown2_vrf_map.conf in ifupdown2 vrf addon.

How to verify it

Create mgmt VRF and observe the failure without the fix.

sudo config vrf add mgmt

show mgmt-vrf

ManagementVRF : Enabled

Management VRF interfaces in Linux:
Device "mgmt" does not exist. 

Which release branch to backport (provide reason below if selected)

  • 202305
  • 202311
  • 202405
  • 202411
  • 202505
  • 202511

Tested branch (Please provide the tested image version)

  • 202511

Description for the changelog

Fixed mgmt VRF addition failure after trixie upgrade

Link to config_db schema for YANG module changes

A picture of a cute animal (not mandatory but encouraged)

Older versions of iproute2 package created /etc/iproute2/rt_tables.d
directory because of which ifupdown2_vrf_map.conf generation succeeded.

New version of iproute2 (6.15.0-1) in trixie doesn't create
/etc/iproute2, because of this vrf map conf generation failing, inturn
resulting in mgmt VRF creation failure

Fix is to ensure /etc/iproute2/rt_tables.d directory present before
generating ifupdown2_vrf_map.conf

Signed-off-by: Ravi Minnikanti <rminnikanti@marvell.com>
@mssonicbld
Copy link
Copy Markdown
Collaborator

/azp run Azure.sonic-buildimage

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

@vivekrnv vivekrnv added the Trixie label Feb 3, 2026
@vivekrnv
Copy link
Copy Markdown
Contributor

vivekrnv commented Feb 3, 2026

@rminnikanti, Is this an upstream commit? If not, it is worth upstreaming it to ifupdown2 IMO

@mssonicbld
Copy link
Copy Markdown
Collaborator

/azp run Azure.sonic-buildimage

@rminnikanti
Copy link
Copy Markdown
Contributor Author

@rminnikanti, Is this an upstream commit? If not, it is worth upstreaming it to ifupdown2 IMO

@vivekrnv, thanks for the review. I see that this change is not present in upstream. Sure, I will upstream it.

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

@rminnikanti
Copy link
Copy Markdown
Contributor Author

@rminnikanti, Is this an upstream commit? If not, it is worth upstreaming it to ifupdown2 IMO

@vivekrnv, thanks for the review. I see that this change is not present in upstream. Sure, I will upstream it.

@rminnikanti, Is this an upstream commit? If not, it is worth upstreaming it to ifupdown2 IMO

@vivekrnv, thanks for the review. I see that this change is not present in upstream. Sure, I will upstream it.

Created:
CumulusNetworks/ifupdown2#348

@mssonicbld
Copy link
Copy Markdown
Collaborator

/azp run Azure.sonic-buildimage

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld
Copy link
Copy Markdown
Collaborator

/azp run Azure.sonic-buildimage

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

@vivekrnv
Copy link
Copy Markdown
Contributor

@rminnikanti , Please re-trigger the CI

@mssonicbld
Copy link
Copy Markdown
Collaborator

/azp run Azure.sonic-buildimage

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld
Copy link
Copy Markdown
Collaborator

/azp run Azure.sonic-buildimage

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

@rminnikanti
Copy link
Copy Markdown
Contributor Author

@saiarcot895 can this be merged?

@ronan-nexthop
Copy link
Copy Markdown
Contributor

Can a user with write-permission please approve this

@mssonicbld
Copy link
Copy Markdown
Collaborator

/azp run Azure.sonic-buildimage

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld
Copy link
Copy Markdown
Collaborator

/azp run Azure.sonic-buildimage

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld
Copy link
Copy Markdown
Collaborator

/azp run Azure.sonic-buildimage

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld
Copy link
Copy Markdown
Collaborator

/azp run Azure.sonic-buildimage

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld
Copy link
Copy Markdown
Collaborator

/azp run Azure.sonic-buildimage

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld
Copy link
Copy Markdown
Collaborator

/azp run Azure.sonic-buildimage

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

@lihuay lihuay merged commit 359fea4 into sonic-net:master Feb 27, 2026
7 of 15 checks passed
FengPan-Frank pushed a commit to FengPan-Frank/sonic-buildimage that referenced this pull request Mar 6, 2026
Older versions of iproute2 package created /etc/iproute2/rt_tables.d
directory because of which ifupdown2_vrf_map.conf generation succeeded.

New version of iproute2 (6.15.0-1) in trixie doesn't create
/etc/iproute2, because of this vrf map conf generation failing, inturn
resulting in mgmt VRF creation failure

Fix is to ensure /etc/iproute2/rt_tables.d directory present before
generating ifupdown2_vrf_map.conf

Signed-off-by: Ravi Minnikanti <rminnikanti@marvell.com>
Co-authored-by: Lihua Yuan <lihuay@users.noreply.github.com>
Signed-off-by: Feng Pan <fenpan@microsoft.com>
@mssonicbld
Copy link
Copy Markdown
Collaborator

Cherry-pick PR to 202511: #25978

yizhenzha pushed a commit to yizhenzha/sonic-buildimage that referenced this pull request Apr 7, 2026
Older versions of iproute2 package created /etc/iproute2/rt_tables.d
directory because of which ifupdown2_vrf_map.conf generation succeeded.

New version of iproute2 (6.15.0-1) in trixie doesn't create
/etc/iproute2, because of this vrf map conf generation failing, inturn
resulting in mgmt VRF creation failure

Fix is to ensure /etc/iproute2/rt_tables.d directory present before
generating ifupdown2_vrf_map.conf

Signed-off-by: Ravi Minnikanti <rminnikanti@marvell.com>
Co-authored-by: Lihua Yuan <lihuay@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants