Bug 1404663

Summary: NetworkManager vpn list not sorted
Product: Red Hat Enterprise Linux 7 Reporter: Oliver Ilian <oliver>
Component: gnome-shellAssignee: Florian Müllner <fmuellner>
Status: CLOSED ERRATA QA Contact: Desktop QE <desktop-qa-list>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 7.3CC: bberg, bmilar, jkoten, mboisver
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-08-01 22:41:41 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
ui: Allow moving menu items to a certain position
none
network: Ensure the connection list is sorted after rename none

Description Oliver Ilian 2016-12-14 11:47:23 UTC
Description of problem:
I am providing 2 rpms with VPN profiles to add them to NetworkManager. Lately we have migrated to another vpn technology, and I had to add new profiles and rename the current one. While doing this, I tried to keep the old configs on the bottom of the list by adding a prefix "x-. After updating the rpms, the list of VPNs was completely unsorted. The only way to get it sorted again, was to either log out and log in again, or to restart the gnome-shell (Alt+F2  -  "r")

Version-Release number of selected component (if applicable):
gnome-shell-3.14.4-53.el7.x86_64

Steps to Reproduce:
1. add several VPN configs
2. rename a VPN config at the bottom and add "A - " in front of the name so it should show up on top of the list
3.

Actual results:
VPN config shows up at the previous position (at the bottom of the list) until you restart the gnome shell

Expected results:
List should always be sorted in alphabetic order, even after rename

Additional info:

Comment 2 Benjamin Berg 2017-02-13 19:56:23 UTC
Created attachment 1250025 [details]
ui: Allow moving menu items to a certain position

This function is a helper to simplify keeping menu items ordered when
their order is updated on the fly (e.g. network connections being
renamed).

Comment 3 Benjamin Berg 2017-02-13 19:56:27 UTC
Created attachment 1250026 [details]
network: Ensure the connection list is sorted after rename

Items were inserted correctly but the synchronisation was lost if the
name of a connection was changed. Simply making sure the position is
correct after a connection is updated fixes the issue.

Reported-by: Oliver Haessler <ohaessle>

Comment 4 Benjamin Berg 2017-02-15 21:53:22 UTC
The above patches are now upstream and will find their way into 3.24. My guess is that Oliver would like to see them in RHEL 7.4.

Comment 5 Florian Müllner 2017-02-16 13:07:57 UTC
(In reply to Benjamin Berg from comment #4)
> The above patches are now upstream and will find their way into 3.24. My
> guess is that Oliver would like to see them in RHEL 7.4.

Fine with me.

Comment 7 Bohdan Milar 2017-06-20 10:29:37 UTC
Tested manually on
gnome-shell-3.22.3-16.el7.x86_64
gnome-shell-3.22.3-15.el7.aarch64
gnome-shell-3.22.3-15.el7.ppc64le
using the reproducer from Description.

After a VPN was renamed, its position in the VPN list (in Gnome system panel) was changed to keep the alphabetical order.

Comment 8 errata-xmlrpc 2017-08-01 22:41:41 UTC
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.

https://access.redhat.com/errata/RHBA-2017:2098