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 #3724

Merged
merged 1 commit into from
Jun 26, 2024

Conversation

c-po
Copy link
Member

@c-po c-po 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

…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
Copy link

github-actions bot commented Jun 26, 2024

👍
No issues in PR Title / Commit Title

@c-po
Copy link
Member Author

c-po commented Jun 26, 2024

@Mergifyio backport sagitta circinus

Copy link

mergify bot commented Jun 26, 2024

backport sagitta circinus

✅ Backports have been created

@c-po c-po merged commit 5dfe56e into vyos:current Jun 26, 2024
11 of 14 checks passed
@c-po c-po deleted the T6519-migration branch June 26, 2024 14:35
@jestabro jestabro mentioned this pull request Jun 26, 2024
12 tasks
c-po added a commit that referenced this pull request Jun 26, 2024
interfaces: T6519: harden config migration if ethernet interface is missing (backport #3724)
c-po added a commit that referenced this pull request Jun 26, 2024
interfaces: T6519: harden config migration if ethernet interface is missing (backport #3724)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
3 participants