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

[RFE] don't do any changes to network configuration for state present/absent #35

Open
thom311 opened this issue Mar 7, 2018 · 2 comments
Labels
state definition Related to state definition

Comments

@thom311
Copy link
Contributor

thom311 commented Mar 7, 2018

The states present and absent are supposed to only deply/remove the persistant networking profiles on the host. They are not supposed to actually change the networking in any way. That is what the states up and down are for.

For initscripts, this is rather trivially the case, because the present/absent states just ensure that the ifcfg files are there or absent.

For NetworkManager, it's more complicated.

  • deleting a profile that is currently active causes the device to go down. That is, because in NetworkManager an active device must always have a profile. The solution in 1.10 is Update2() with the NM_SETTINGS_UPDATE2_FLAG_VOLATILE flag. Volatile means, that the connection is in-memory only, and will be automatically deleted once it goes down. If you make a connection volatile that currently is not active, it will be deleted right away.

  • adding or modifying a profile might always make it a candidate for autoconnecting. For state present, we would like to add/modify the profile without any changes. For that, 1.10 supports Update2() flag NM_SETTINGS_UPDATE2_FLAG_BLOCK_AUTOCONNECT. That works for the update case, but doesn't work for the add case. To add a connection that has connection.autoconnect=yes without activating it right away, we would either need new NetworkManager D-Bus API to block autoconnect form the start, or we first add the connection with connection.autoconnect=no, and then follow up with an Update2 call that sets connection.autoconnect=yes and uses NM_SETTINGS_UPDATE2_FLAG_BLOCK_AUTOCONNECT.

  • modifying the properties connection.metered or connection.zone takes effect immediately. There is currently no way to prevent that. NetworkManager should get a new flag for Update2 that allows to modify the profile and prevent these two properties from updating right away. Then, the role should use this new API.

@tyll
Copy link
Member

tyll commented Jan 9, 2019

For removing a profile, there is now #95

@tyll
Copy link
Member

tyll commented Feb 13, 2019

NetworkManager bugs for additional features:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
state definition Related to state definition
Projects
None yet
Development

No branches or pull requests

2 participants