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

isis: T5335: fix invalid isis config base in migration script #2070

Merged
merged 1 commit into from
Jul 3, 2023

Conversation

jvoss
Copy link
Contributor

@jvoss jvoss commented Jul 3, 2023

Change Summary

This PR resolves an issue when loading or merging configuration files containing IS-IS configuration items. Before this change an error in the migration script (/opt/vyatta/etc/config-migrate/migrate/isis/0-to-1) is experienced:

/tmp/test_isis.conf

interfaces {
  loopback lo {
  }
}
protocols {
  isis {
    interface lo {
    }
    net 49.0001.0000.0000.0001.00
  }
}
jvoss@vyos# merge /tmp/test_isis.conf

Migration script error: /opt/vyatta/etc/config-migrate/migrate/isis/0-to-1: [Errno 1] failed to run command: ['/opt/vyatta/etc/config-migrate/migrate/isis/0-to-1', '/tmp/tmpd0jll6fb']
returned: 
exit code: 1.
[edit]

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)

Component(s) name

  • IS-IS

Proposed changes

Update the configuration base used in the migration script to start at protocols isis instead of considering additional nodes that may be present in the proposed configuration file.

How to test

Create configuration file /tmp/test_isis.conf:

interfaces {
  loopback lo {
  }
}
protocols {
  isis {
    interface lo {
    }
    net 49.0001.0000.0000.0001.00
  }
}

Attempt to load the configuration:

jvoss@vyos# merge /tmp/test_isis.conf

Migration script error: /opt/vyatta/etc/config-migrate/migrate/isis/0-to-1: [Errno 1] failed to run command: ['/opt/vyatta/etc/config-migrate/migrate/isis/0-to-1', '/tmp/tmpd0jll6fb']
returned: 
exit code: 1.
[edit]

Make the proposed changes in this PR, then attempt to load and again:

jvoss@vyos# merge /tmp/test_isis.conf
Merge complete. Use 'commit' to make changes effective.
[edit]

jvoss@vyos# compare
[protocols]
+ isis {
+     interface     lo { }
+     net "49.0001.0000.0000.0001.00"
+ }

[edit]

Commit changes:

jvoss@vyos# commit
[edit]

Validate IS-IS is now running:

jvoss@vyos:~$ show isis interface 
Area VyOS:
  Interface   CircId   State    Type     Level
  lo          0x0      Up       loopback L1L2 

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

@vyosbot vyosbot requested review from a team, dmbaturin, sarthurdev, zdc, jestabro, sever-sever and c-po and removed request for a team July 3, 2023 14:53
@c-po c-po merged commit 5c18654 into vyos:current Jul 3, 2023
5 of 6 checks passed
@jvoss jvoss deleted the isis-merge-config branch July 3, 2023 19:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants