RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1904299 - sort the OVS ports by name
Summary: sort the OVS ports by name
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: nmstate
Version: 8.4
Hardware: Unspecified
OS: Unspecified
low
low
Target Milestone: rc
: 8.0
Assignee: Gris Ge
QA Contact: Mingyu Shi
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-12-04 02:50 UTC by Mingyu Shi
Modified: 2021-05-18 15:18 UTC (History)
6 users (show)

Fixed In Version: nmstate-1.0.1-0.1.el8
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-05-18 15:18:22 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
example (1.20 KB, text/plain)
2020-12-04 02:50 UTC, Mingyu Shi
no flags Details

Description Mingyu Shi 2020-12-04 02:50:02 UTC
Created attachment 1736287 [details]
example

Description of problem:
When running 'nmstatectl show', the port part of ovs bridge may be shown with unpredictable order, looks like it depends on port's name, type or maybe the order when nmstate attached them.
For the state consistence, by default, we can sort them by name.

Version-Release number of selected component (if applicable):


How reproducible:
100%

Steps to Reproduce:
See the attachment as an example.

Actual results:
The order of the ports may vary

Expected results:
Consistent order

Additional info:

Comment 2 Mingyu Shi 2020-12-04 02:52:28 UTC
Already pre-tested with https://github.com/nmstate/nmstate/pull/1436

Comment 3 Mingyu Shi 2020-12-04 03:15:53 UTC
The reported version is nmstate-1.0.0-0.1.el8.noarch

Comment 6 Mingyu Shi 2020-12-25 07:38:30 UTC
Hi Gris, strange it doesn't work anymore, can you take a look? Still use the transaction in the attachment.

After apply, you will see:
# nmstatectl show ovs-br0
*******
interfaces:
- name: ovs-br0
  type: ovs-bridge
  state: up
  bridge:
    options:
      fail-mode: ''
      mcast-snooping-enable: false
      rstp: false
      stp: false
    port:
    - name: veth0
    - name: ovsbond0
      link-aggregation:
        mode: balance-slb
        port:
        - name: dummy0
        - name: veth1
    - name: ovs0
  lldp:
    enabled: false
  ovs-db:
    external_ids:
      NM.connection.uuid: 2ab5c8cf-5382-448b-a3c5-78e3df8ae077

You will see it is veth0 -> ovsbond0 -> ovs0, the order should be [0-9] -> [aA-zZ]

Comment 8 Gris Ge 2021-01-04 05:35:58 UTC
The patch is not included in the build.

Will provide new build next week.

Comment 9 Mingyu Shi 2021-01-06 11:56:12 UTC
Verified with versions:
nmstate-1.0.1-0.1.el8.noarch
nispor-1.0.1-2.el8.x86_64
NetworkManager-1.30.0-0.5.el8.x86_64

[19:53:58@dell-per740-01 ~]0# nmstatectl show ovs-br0
2021-01-06 19:54:02,020 root         DEBUG    Async action: Retrieve applied config: ethernet eno1 started
2021-01-06 19:54:02,021 root         DEBUG    Async action: Retrieve applied config: dummy dummy0 started
2021-01-06 19:54:02,021 root         DEBUG    Async action: Retrieve applied config: ovs-interface ovs0 started
2021-01-06 19:54:02,021 root         DEBUG    Async action: Retrieve applied config: ovs-interface veth0 started
2021-01-06 19:54:02,021 root         DEBUG    Async action: Retrieve applied config: ovs-interface veth1 started
2021-01-06 19:54:02,021 root         DEBUG    Async action: Retrieve applied config: ovs-bridge ovs-br0 started
2021-01-06 19:54:02,021 root         DEBUG    Async action: Retrieve applied config: ovs-port ovsbond0 started
2021-01-06 19:54:02,021 root         DEBUG    Async action: Retrieve applied config: ovs-port ovs-port-ovs0 started
2021-01-06 19:54:02,022 root         DEBUG    Async action: Retrieve applied config: ovs-port ovs-port-veth0 started
2021-01-06 19:54:02,023 root         DEBUG    Async action: Retrieve applied config: ethernet eno1 finished
2021-01-06 19:54:02,024 root         DEBUG    Async action: Retrieve applied config: dummy dummy0 finished
2021-01-06 19:54:02,025 root         DEBUG    Async action: Retrieve applied config: ovs-interface ovs0 finished
2021-01-06 19:54:02,025 root         DEBUG    Async action: Retrieve applied config: ovs-interface veth0 finished
2021-01-06 19:54:02,025 root         DEBUG    Async action: Retrieve applied config: ovs-interface veth1 finished
2021-01-06 19:54:02,026 root         DEBUG    Async action: Retrieve applied config: ovs-bridge ovs-br0 finished
2021-01-06 19:54:02,026 root         DEBUG    Async action: Retrieve applied config: ovs-port ovsbond0 finished
2021-01-06 19:54:02,026 root         DEBUG    Async action: Retrieve applied config: ovs-port ovs-port-ovs0 finished
2021-01-06 19:54:02,026 root         DEBUG    Async action: Retrieve applied config: ovs-port ovs-port-veth0 finished
---
dns-resolver:
  config: {}
  running:
    search:
    - rhts.eng.pek2.redhat.com
    server:
    - 10.73.2.107
    - 10.73.2.108
    - 10.66.127.10
route-rules:
  config: []
routes:
  config: []
  running: []
interfaces:
- name: ovs-br0
  type: ovs-bridge
  state: up
  bridge:
    options:
      fail-mode: ''
      mcast-snooping-enable: false
      rstp: false
      stp: false
    port:
    - name: ovs0
    - name: ovsbond0
      link-aggregation:
        mode: balance-slb
        port:
        - name: dummy0
        - name: veth1
    - name: veth0
  lldp:
    enabled: false
  ovs-db:
    external_ids:
      NM.connection.uuid: 936675b6-8be2-4912-9922-ac61a2caa7d9

Comment 11 errata-xmlrpc 2021-05-18 15:18:22 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 (nmstate bug fix and enhancement update), 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-2021:1748


Note You need to log in before you can comment on or make changes to this bug.