After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 698061 - cli: idea: nmcli could detect potentially dangerous operations
cli: idea: nmcli could detect potentially dangerous operations
Status: RESOLVED OBSOLETE
Product: NetworkManager
Classification: Platform
Component: nmcli
git master
Other Linux
: Normal normal
: ---
Assigned To: NetworkManager maintainer(s)
NetworkManager maintainer(s)
Depends on:
Blocks: tracker-nmcli
 
 
Reported: 2013-04-15 14:03 UTC by Pavel Simerda
Modified: 2020-11-12 14:33 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Pavel Simerda 2013-04-15 14:03:49 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.
Comment 1 Jiri Klimes 2013-04-15 16:56:41 UTC
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.
Comment 2 Pavel Simerda 2013-04-15 20:13:15 UTC
(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.
Comment 3 Dan Winship 2013-05-02 15:59:36 UTC
NM bugzilla reorganization... sorry for the bug spam.
Comment 4 André Klapper 2020-11-12 14:33:24 UTC
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).