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

interfaces: T6519: harden config migration if ethernet interface is missing (backport #3724) #3726

Merged
merged 1 commit into from
Jun 26, 2024

Conversation

mergify[bot]
Copy link

@mergify mergify bot commented Jun 26, 2024

Change Summary

During a corner case where the configuration is migrated to a different system with fewer ethernet interfaces, migration will fail during an image upgrade.

vyos.ethtool.Ethtool() is instantiated with an invalid interface leading to an exception that kills the migrator

This fixes the following error:

vyos@vyos# load /usr/libexec/vyos/tests/config/bgp-evpn-l3vpn-pe-router
Loading configuration from '/usr/libexec/vyos/tests/config/bgp-evpn-l3vpn-pe-router'

Migration script error: /opt/vyatta/etc/config-migrate/migrate/interfaces/20-to-21: [Errno 1] failed to run command: ['/opt/vyatta/etc/con
fig-migrate/migrate/interfaces/20-to-21', '/tmp/tmprr8xf78f']
- op: set path: ['interfaces', 'ethernet', 'eth0', 'offload', 'gro'] value: None replace: True
- op: set path: ['interfaces', 'ethernet', 'eth0', 'offload', 'gso'] value: None replace: True
- op: set path: ['interfaces', 'ethernet', 'eth0', 'offload', 'sg'] value: None replace: True
- op: set path: ['interfaces', 'ethernet', 'eth0', 'offload', 'tso'] value: None replace: True
- op: set path: ['interfaces', 'ethernet', 'eth1', 'offload', 'gro'] value: None replace: True
- op: set path: ['interfaces', 'ethernet', 'eth1', 'offload', 'gso'] value: None replace: True
- op: set path: ['interfaces', 'ethernet', 'eth1', 'offload', 'sg'] value: None replace: True
- op: set path: ['interfaces', 'ethernet', 'eth1', 'offload', 'tso'] value: None replace: True
- op: set path: ['interfaces', 'ethernet', 'eth2', 'offload', 'gro'] value: None replace: True
- op: set path: ['interfaces', 'ethernet', 'eth2', 'offload', 'gso'] value: None replace: True
- op: set path: ['interfaces', 'ethernet', 'eth2', 'offload', 'sg'] value: None replace: True
- op: set path: ['interfaces', 'ethernet', 'eth2', 'offload', 'tso'] value: None replace: True

exit code: 1.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Code style update (formatting, renaming)
  • Refactoring (no functional changes)
  • Migration from an old Vyatta component to vyos-1x, please link to related PR inside obsoleted component
  • Other (please describe):

Related Task(s)

Related PR(s)

Component(s) name

Checklist:

  • I have read the CONTRIBUTING document
  • I have linked this PR to one or more Phabricator Task(s)
  • I have run the components SMOKETESTS if applicable
  • My commit headlines contain a valid Task id
  • My change requires a change to the documentation
  • I have updated the documentation accordingly

This is an automatic backport of pull request #3724 done by [Mergify](https://mergify.com).

…issing

During a corner case where the configuration is migrated to a different system
with fewer ethernet interfaces, migration will fail during an image upgrade.

vyos.ethtool.Ethtool() is instantiated with an invalid interface leading to an
exception that kills the migrator

(cherry picked from commit e47d4fd)
@mergify mergify bot requested a review from a team as a code owner June 26, 2024 14:36
@mergify mergify bot requested review from dmbaturin, sarthurdev, zdc, jestabro, c-po and fett0 and removed request for a team June 26, 2024 14:36
Copy link

👍
No issues in PR Title / Commit Title

@c-po c-po added the circinus label Jun 26, 2024
@c-po c-po merged commit 255dc6b into circinus Jun 26, 2024
6 checks passed
@mergify mergify bot deleted the mergify/bp/circinus/pr-3724 branch June 26, 2024 15:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2 participants