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 1722744 - dummy can't be set down with nmstatectl soon after it is created
Summary: dummy can't be set down with nmstatectl soon after it is created
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: nmstate
Version: 8.1
Hardware: Unspecified
OS: Linux
medium
medium
Target Milestone: rc
: 8.2
Assignee: Gris Ge
QA Contact: Mingyu Shi
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-06-21 07:09 UTC by Jianlin Shi
Modified: 2023-04-29 09:46 UTC (History)
2 users (show)

Fixed In Version: nmstate-0.2.3-1.el8
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-04-28 16:00:05 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker NMT-504 0 None None None 2023-04-29 09:46:02 UTC
Red Hat Issue Tracker RHELPLAN-37318 0 None None None 2023-04-29 09:45:45 UTC
Red Hat Product Errata RHBA-2020:1696 0 None None None 2020-04-28 16:00:25 UTC

Description Jianlin Shi 2019-06-21 07:09:58 UTC
Description of problem:
dummy can't be set down with nmstatectl soon after it is created

Version-Release number of selected component (if applicable):
nmstate-0.0.7-1.el8.noarch

How reproducible:
Always

Steps to Reproduce:
#!/bin/bash

cat > dummy1_test.yaml << EOF
---
dns-resolver:
  config:
    search: []
    server: []
  running:
    search:
    - rhts.eng.pek2.redhat.com
    server:
    - 10.73.2.107
    - 10.73.2.108
    - 10.10.160.1
routes:
  config: []
  running:
  - destination: 1.1.1.0/24
    metric: 550
    next-hop-address: ''
    next-hop-interface: dummy1
    table-id: 254
  - destination: fe80::/64
    metric: 550
    next-hop-address: ''
    next-hop-interface: dummy1
    table-id: 254
  - destination: ff00::/8
    metric: 256
    next-hop-address: ''
    next-hop-interface: dummy1
    table-id: 255
interfaces:
- name: dummy1
  type: dummy
  state: up
  ipv4:
    address:
    - ip: 1.1.1.1
      prefix-length: 24
    dhcp: false
    enabled: true
  ipv6:
    address:
    - ip: fe80::4b56:deb5:1f47:20c8
      prefix-length: 64
    autoconf: false
    dhcp: false
    enabled: true
  mac-address: CE:6E:CD:16:69:21
  mtu: 1600
EOF

nmstatectl set dummy1_test.yaml
sed -i 's/state: up/state: down/' dummy1_test.yaml
nmstatectl set dummy1_test.yaml
sleep 10
nmstatectl set dummy1_test.yaml

Actual results:
fail to set down for the first time

Expected results:
can be set down

Additional info:

+ sed -i 's/state: up/state: down/' dummy1_test.yaml
+ nmstatectl set dummy1_test.yaml
2019-06-21 03:07:10,268 root         DEBUG    Checkpoint /org/freedesktop/NetworkManager/Checkpoint/275 created for all devices: 60
2019-06-21 03:07:10,269 root         DEBUG    Adding new interfaces: []
2019-06-21 03:07:10,296 root         DEBUG    Editing interfaces: ['dummy1']
2019-06-21 03:07:10,299 root         DEBUG    Executing NM action: func=_safe_deactivate_async
2019-06-21 03:07:10,310 root         DEBUG    Connection deactivation succeeded on dummy1
2019-06-21 03:07:10,310 root         DEBUG    Executing NM action: func=_safe_delete_async
2019-06-21 03:07:10,336 root         DEBUG    Connection deletion succeeded: dev=dummy1
2019-06-21 03:07:10,336 root         DEBUG    NM action queue exhausted, quiting mainloop
2019-06-21 03:07:10,436 root         DEBUG    Checkpoint /org/freedesktop/NetworkManager/Checkpoint/275 rollback executed: dbus.Dictionary({dbus.String('/org/freedesktop/NetworkManager/Devices/134'): dbus.UInt32(0), dbus.String('/org/freedesktop/NetworkManager/Devices/1'): dbus.UInt32(0), dbus.String('/org/freedesktop/NetworkManager/Devices/2'): dbus.UInt32(0)}, signature=dbus.Signature('su'))
Traceback (most recent call last):
  File "/usr/bin/nmstatectl", line 11, in <module>
    load_entry_point('nmstate==0.0.7', 'console_scripts', 'nmstatectl')()
  File "/usr/lib/python3.6/site-packages/nmstatectl/nmstatectl.py", line 59, in main
    return args.func(args)
  File "/usr/lib/python3.6/site-packages/nmstatectl/nmstatectl.py", line 187, in apply
    args.timeout)
  File "/usr/lib/python3.6/site-packages/nmstatectl/nmstatectl.py", line 206, in apply_state
    checkpoint = libnmstate.apply(state, verify_change, commit, timeout)
  File "/usr/lib/python3.6/site-packages/libnmstate/netapplier.py", line 59, in apply
    state.State(desired_state), verify_change, commit, rollback_timeout)
  File "/usr/lib/python3.6/site-packages/libnmstate/netapplier.py", line 134, in _apply_ifaces_state
    _verify_change(desired_state)
  File "/usr/lib/python3.6/site-packages/libnmstate/netapplier.py", line 171, in _verify_change
    desired_state.verify_interfaces(current_state)
  File "/usr/lib/python3.6/site-packages/libnmstate/state.py", line 219, in verify_interfaces
    self._assert_interfaces_included_in(other_state)
  File "/usr/lib/python3.6/site-packages/libnmstate/state.py", line 448, in _assert_interfaces_included_in
    current_state.interfaces))
libnmstate.error.NmstateVerificationError:
desired
=======
---
dummy1:
  ipv4:
    address:
    - ip: 1.1.1.1
      prefix-length: 24
    dhcp: false
    enabled: true
  ipv6:
    address:
    - ip: fe80::4b56:deb5:1f47:20c8
      prefix-length: 64
    autoconf: false
    dhcp: false
    enabled: true
  mac-address: CE:6E:CD:16:69:21
  mtu: 1600
  name: dummy1
  state: down
  type: dummy

current
=======
---
ens3:
  ipv4:
    address:
    - ip: 10.73.4.124
      prefix-length: 23
    auto-dns: true
    auto-gateway: true
    auto-routes: true
    dhcp: true
    enabled: true
  ipv6:
    address:
    - ip: 2620:52:0:4904:5054:ff:feb7:7d2e
      prefix-length: 64
    - ip: fe80::5054:ff:feb7:7d2e
      prefix-length: 64
    auto-dns: true
    auto-gateway: true
    auto-routes: true
    autoconf: true
    dhcp: true
    enabled: true
  mac-address: 52:54:00:B7:7D:2E
  mtu: 1500
  name: ens3
  state: up
  type: ethernet
lo:
  ipv4:
    enabled: false
  ipv6:
    enabled: false
  mtu: 65536
  name: lo
  state: down
  type: unknown

difference
==========
--- desired
+++ current
@@ -1,20 +1,37 @@
 ---
-dummy1:
+ens3:
   ipv4:
     address:
-    - ip: 1.1.1.1
-      prefix-length: 24
-    dhcp: false
+    - ip: 10.73.4.124
+      prefix-length: 23
+    auto-dns: true
+    auto-gateway: true
+    auto-routes: true
+    dhcp: true
     enabled: true
   ipv6:
     address:
-    - ip: fe80::4b56:deb5:1f47:20c8
+    - ip: 2620:52:0:4904:5054:ff:feb7:7d2e
       prefix-length: 64
-    autoconf: false
-    dhcp: false
+    - ip: fe80::5054:ff:feb7:7d2e
+      prefix-length: 64
+    auto-dns: true
+    auto-gateway: true
+    auto-routes: true
+    autoconf: true
+    dhcp: true
     enabled: true
-  mac-address: CE:6E:CD:16:69:21
-  mtu: 1600
-  name: dummy1
+  mac-address: 52:54:00:B7:7D:2E
+  mtu: 1500
+  name: ens3
+  state: up
+  type: ethernet
+lo:
+  ipv4:
+    enabled: false
+  ipv6:
+    enabled: false
+  mtu: 65536
+  name: lo
   state: down
-  type: dummy
+  type: unknown

<==== failed for the first time

+ sleep 10
+ nmstatectl set dummy1_test.yaml
2019-06-21 03:07:21,400 root         DEBUG    Checkpoint /org/freedesktop/NetworkManager/Checkpoint/276 created for all devices: 60
2019-06-21 03:07:21,400 root         DEBUG    Adding new interfaces: []
2019-06-21 03:07:21,428 root         DEBUG    Editing interfaces: ['dummy1']
2019-06-21 03:07:21,432 root         DEBUG    Executing NM action: func=_safe_deactivate_async
2019-06-21 03:07:21,451 root         DEBUG    Connection deactivation succeeded on dummy1
2019-06-21 03:07:21,451 root         DEBUG    Executing NM action: func=_safe_delete_async
2019-06-21 03:07:21,458 root         DEBUG    Connection deletion succeeded: dev=dummy1
2019-06-21 03:07:21,458 root         DEBUG    NM action queue exhausted, quiting mainloop
2019-06-21 03:07:21,497 root         DEBUG    Checkpoint /org/freedesktop/NetworkManager/Checkpoint/276 destroyed
Desired state applied:
---
dns-resolver:
  config:
    search: []
    server: []
  running:
    search:
    - rhts.eng.pek2.redhat.com
    server:
    - 10.73.2.107
    - 10.73.2.108
    - 10.10.160.1
routes:
  config: []
  running:
  - destination: 1.1.1.0/24
    metric: 550
    next-hop-address: ''
    next-hop-interface: dummy1
    table-id: 254
  - destination: fe80::/64
    metric: 550
    next-hop-address: ''
    next-hop-interface: dummy1
    table-id: 254
  - destination: ff00::/8
    metric: 256
    next-hop-address: ''
    next-hop-interface: dummy1
    table-id: 255
interfaces:
- name: dummy1
  type: dummy
  state: down
  ipv4:
    address:
    - ip: 1.1.1.1
      prefix-length: 24
    dhcp: false
    enabled: true
  ipv6:
    address:
    - ip: fe80::4b56:deb5:1f47:20c8
      prefix-length: 64
    autoconf: false
    dhcp: false
    enabled: true
  mac-address: CE:6E:CD:16:69:21
  mtu: 1600

<==== passed when try after 10 seconds

Comment 6 errata-xmlrpc 2020-04-28 16:00:05 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-2020:1696


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