GNOME Bugzilla – Bug 698061
cli: idea: nmcli could detect potentially dangerous operations
Last modified: 2020-11-12 14:33:24 UTC
nmcli could detect operations that could not be simply reversed. An example of such an operation is when when 'nmcli networking off' is being run from an SSH terminal. Another example would be tearing down a connection that is (or may be) used to run the command. User interface: ssh# nmcli networking off -> error ssh# nmcli --force networking off -> success -f could be used as a shortcut for --force.
Hmm, it makes sense. On the other hand, how we define dangerous operations. E.g. deleting a connection could be regarded as dangerous too. But for basic cases it would be annoying that the operations fail. Standard 'rm' command actually does the opposite; without options it removes files; using '-i' it asks. Yes, it could be dangerous, but doesn't bother users every time they run it. We could use nmcli '--ask' for this.
(In reply to comment #1) > Hmm, it makes sense. > On the other hand, how we define dangerous operations. This is up to discussion and won't be easy to do. > E.g. deleting a > connection could be regarded as dangerous too. But for basic cases it would be > annoying that the operations fail. It should be possible to detect whether a specific connection is being used to access the server, e.g. using SSH environment variables. This is really a bonus feature. > Standard 'rm' command actually does the opposite; without options it removes > files; using '-i' it asks. And on many distributions, '-i' is used by default through aliases. And I usually don't delete my system accidentally, but I already disabled network on a remote host during my nmcli testing. > Yes, it could be dangerous, but doesn't bother users > every time they run it. Every time they run it over SSH, and only one connection should be affected. > We could use nmcli '--ask' for this. Possibly. It is perfectly ok to leave this RFE alone until we either know how to do that or decide that it's not worth it.
NM bugzilla reorganization... sorry for the bug spam.
bugzilla.gnome.org is being shut down in favor of a GitLab instance. We are closing all old bug reports and feature requests in GNOME Bugzilla which have not seen updates for a long time. If you still use NetworkManager and if you still see this bug / want this feature in a recent and supported version of NetworkManager, then please feel free to report it at https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/issues/ Thank you for creating this report and we are sorry it could not be implemented (workforce and time is unfortunately limited).