Description of problem:
When NetworkManager service is stopped, nmcli hangs in multiple situations after raising an exception to stdout.
Such a hang is very unpleasant for tools or scripts running nmcli command and expecting (prompt) output.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. service NetworkManager stop
2. nmcli con status
3. nmcli con show
4. nmcli con --help
5. nmcli con whateverWrong
commands 2. to 5. hung after raising:
** (process:18982): WARNING **: get_all_cb: couldn't retrieve system settings properties: (2) The name org.freedesktop.NetworkManagerSystemSettings was not provided by any .service files.
** (process:18982): WARNING **: fetch_connections_done: error fetching system connections: (2) The name org.freedesktop.NetworkManagerSystemSettings was not provided by any .service files.
Commands should not hung.
nmcli only hangs when neither NetworkManager nor nm-applet is running. NetworkManager 0.8 (in RHEL 6) has two setting services supplying connections: one is NetworkManager itself handling system connections, and the other is a user service handling user connections - usually nm-applet. From NetworkManager 0.9 upwards all connections are managed by NetworkManager itself.
Also note that nmcli commands in RHEL6 differ from RHEL7. For example:
List all connections:
nmcli con [show] - RHEL7
nmcli con list [user | system] - RHEL6
nmcli con show -a - RHEL7
nmcli con status - RHEL6
But, of course, the nmcli freeze is a bug and I will post a patch to fix it.
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.
For information on the advisory, and where to find the updated
files, follow the link below.
If the solution does not work for you, open a new bug report.