-
Notifications
You must be signed in to change notification settings - Fork 56
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
ncm-network: nmstate enhancements #1647
Conversation
nmstatectl apply merges current route state config with desired state. Adding state: absent to route config for the interface will clear routes before adding the desired state instead of merge. Therefore keeping only the routes configured through the profiles.
@ned21 thank your for review to the recent pr's I created, I thought its best just do one PR because the changes are related, especially with the testing that I've added, it requires all 3 commits. first 2 you already reviewed. hope that is ok. All changes are now in this one. @jrha please can this be looked into in your own time. |
- add a default absent rule to clear route rules entries for the table. nmstate by default will merge rules therefore won't clear if there are any old rules already present. This will make sure only rules defined by profile is present.
bc4b03b
to
3b6aff5
Compare
- mimic bootproto settings to default to static, to match network.pm. - refactored the conditions for setting config based on bootproto. - support to configure dhcp interface. - fixed the way bonded interface is recognised - add advance testing for nmstate interface config
3b6aff5
to
7a72ad9
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like a lot of good improvements here, I'll have more of a think about how best to integrate the nmstate
specific options.
@jrha is there anything outstanding on this PR or can this be merged? Regards |
Add the following enhancements:
nmstatectl
apply does not replace running config, it instead merges current state config with desired state. This is not useful when settings have been removed such as routing and policy routing and rules.state: absent
will remove config routes entry that matches the interface as next hop and therefore will only apply the routes configured in host profile profile. so following changes added.absent entry added when route for that interface. will clean all routes matching that interface when applying:
absent entry add route-rules to match any rules with the table id and clear it when applying rules.
made nmstate mimic bootproto setting of network.pm
refactored configuration settings of each interfaces type.
add more advance testing for interface configuration, bonding and valn.