Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[202111][Arista] Fix arista-net initramfs renaming logic #10625

Merged
merged 2 commits into from
Apr 20, 2022

Conversation

Staphylo
Copy link
Collaborator

Why I did it

Part of this change is a missing backport of #9856 in 202111.
The second part is the fix for arista-net renaming logic fixed by #10624 in master.

Description for the changelog

Fix arista-net management interface rename logic in initramfs

On some products the pci enumeration adds randomness into which nic gets
initialized first.
Because SONiC doesn't use deterministic interface naming but instead old
style interface naming, this leads to eth0 not always being the
management port.
To make sure eth0 is always the management port (SONiC expectation)
rename the interfaces in the initramfs for Arista products.
The interface renaming logic fails if one interface is missing.
Because of the `set -e` the whole initramfs hook would abort early on
error.
This change fixes the current behavior to make sure missing interfaces
are properly skipped and ensure existing interface are renamed.
@Staphylo Staphylo requested a review from lguohan as a code owner April 20, 2022 09:11
@lguohan lguohan merged commit df8eaa0 into sonic-net:202111 Apr 20, 2022
@Staphylo Staphylo deleted the 202111-net-rename branch December 6, 2022 15:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants