{"action":"opened","issue":{"url":"https://api.github.com/repos/linux-system-roles/network/issues/35","repository_url":"https://api.github.com/repos/linux-system-roles/network","labels_url":"https://api.github.com/repos/linux-system-roles/network/issues/35/labels{/name}","comments_url":"https://api.github.com/repos/linux-system-roles/network/issues/35/comments","events_url":"https://api.github.com/repos/linux-system-roles/network/issues/35/events","html_url":"https://github.com/linux-system-roles/network/issues/35","id":303190135,"number":35,"title":"[RFE] don't do any changes to network configuration for state present/absent","user":{"login":"thom311","id":1295078,"avatar_url":"https://avatars0.githubusercontent.com/u/1295078?v=4","gravatar_id":"","url":"https://api.github.com/users/thom311","html_url":"https://github.com/thom311","followers_url":"https://api.github.com/users/thom311/followers","following_url":"https://api.github.com/users/thom311/following{/other_user}","gists_url":"https://api.github.com/users/thom311/gists{/gist_id}","starred_url":"https://api.github.com/users/thom311/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thom311/subscriptions","organizations_url":"https://api.github.com/users/thom311/orgs","repos_url":"https://api.github.com/users/thom311/repos","events_url":"https://api.github.com/users/thom311/events{/privacy}","received_events_url":"https://api.github.com/users/thom311/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-03-07T17:29:06Z","updated_at":"2018-03-07T17:29:06Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"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.\r\n\r\nFor initscripts, this is rather trivially the case, because the `present`/`absent` states just ensure that the ifcfg files are there or absent.\r\n\r\nFor NetworkManager, it's more complicated.\r\n\r\n- 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()`](https://developer.gnome.org/NetworkManager/stable/gdbus-org.freedesktop.NetworkManager.Settings.Connection.html#gdbus-method-org-freedesktop-NetworkManager-Settings-Connection.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.\r\n\r\n- 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`.\r\n\r\n- 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.\r\n"}}
{"actor":{"display_login":"thom311"}}