Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
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.
Description of problem:
CheckpointRollback call does not remove newly created connections and devices even with NM_CHECKPOINT_CREATE_FLAG_DELETE_NEW_CONNECTIONS | NM_CHECKPOINT_CREATE_FLAG_DISCONNECT_NEW_DEVICES flags.
Version-Release number of selected component (if applicable):
CentOS 7.3.1611
NetworkManager-1.4.0-20
How reproducible:
Always
Steps to Reproduce:
1. Create a bridge and attach NIC to it.
2. Create a checkpoint.
3. Create another bridge and reattach NIC to it.
4. Start rollback.
Actual results:
Although NIC was reconnected to the original bridge, new bridge and its connection are still there.
Expected results:
New connection and created device will be removed when CheckpointCreate is called with flags NM_CHECKPOINT_CREATE_FLAG_DELETE_NEW_CONNECTIONS | NM_CHECKPOINT_CREATE_FLAG_DISCONNECT_NEW_DEVICES.
Reproducer script:
import dbus
import subprocess
import time
bus = dbus.SystemBus()
proxy = bus.get_object('org.freedesktop.NetworkManager', '/org/freedesktop/NetworkManager')
manager = dbus.Interface(proxy, 'org.freedesktop.NetworkManager')
# create a bridge and attach NIC to it
subprocess.check_call(['/usr/bin/nmcli', 'con', 'add', 'type', 'bridge', 'ifname', 'br1', 'autoconnect', 'yes', '--', 'connection.autoconnect-slaves', '1'])
subprocess.check_call(['/usr/bin/nmcli', 'con', 'add', 'type', 'ethernet', 'ifname', 'eth0', 'autoconnect', 'yes', '--', 'connection.master', 'br1', 'connection.slave-type', 'bridge'])
subprocess.check_call(['/usr/bin/nmcli', 'con', 'up', 'bridge-br1'])
time.sleep(2)
# create checkpoint
ALL_DEVICES = dbus.Array([], signature=dbus.Signature('ao'))
FOREVER = 0
NM_CHECKPOINT_CREATE_FLAG_DESTROY_ALL = 0x01
NM_CHECKPOINT_CREATE_FLAG_DELETE_NEW_CONNECTIONS = 0x02
NM_CHECKPOINT_CREATE_FLAG_DISCONNECT_NEW_DEVICES = 0x04
checkpoint = manager.CheckpointCreate(
ALL_DEVICES,
FOREVER,
NM_CHECKPOINT_CREATE_FLAG_DESTROY_ALL |
NM_CHECKPOINT_CREATE_FLAG_DELETE_NEW_CONNECTIONS |
NM_CHECKPOINT_CREATE_FLAG_DISCONNECT_NEW_DEVICES
)
time.sleep(2)
# create another bridge and reattach NIC to it
subprocess.check_call(['/usr/bin/nmcli', 'con', 'down', 'bridge-br1'])
subprocess.check_call(['/usr/bin/nmcli', 'con', 'add', 'type', 'bridge', 'ifname', 'br2', 'autoconnect', 'yes', '--', 'connection.autoconnect-slaves', '1'])
subprocess.check_call(['/usr/bin/nmcli', 'con', 'modify', 'bridge-slave-eth0', 'connection.master', 'br2', 'connection.slave-type', 'bridge'])
subprocess.check_call(['/usr/bin/nmcli', 'con', 'up', 'bridge-br2'])
time.sleep(2)
# rollback to the checkpoint
manager.CheckpointRollback(checkpoint)
nmcli con show output:
NAME UUID TYPE DEVICE
bridge-br1 955c27cf-6948-43aa-bb82-026b2e798e68 bridge br1
bridge-br2 be417a69-1a83-4f4f-8567-0f80e97a9857 bridge br2
bridge-slave-eth0 7403cede-e1cb-4138-88dc-dba4f2e6a4ff 802-3-ethernet eth0
System eth0 5fb06bd0-0bb0-7ffb-45f1-d6edd65f3e03 802-3-ethernet --
ip link output:
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT qlen 1
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast master br1 state UP mode DEFAULT qlen 1000
link/ether 52:54:00:55:e6:7c brd ff:ff:ff:ff:ff:ff
41: br2: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN mode DEFAULT qlen 1000
link/ether 00:00:00:00:00:00 brd ff:ff:ff:ff:ff:ff
42: br1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP mode DEFAULT qlen 1000
link/ether 52:54:00:55:e6:7c brd ff:ff:ff:ff:ff:ff
Comment 2Beniamino Galvani
2017-07-24 09:21:53 UTC
Hi,
flags NM_CHECKPOINT_CREATE_FLAG_DELETE_NEW_CONNECTIONS and NM_CHECKPOINT_CREATE_FLAG_DISCONNECT_NEW_DEVICES are only available since NetworkManager version 1.6.
Thus, they are available on RHEL 7.4 (NM 1.8) but not on RHEL 7.3 (NM 1.4).
Comment 4Beniamino Galvani
2017-07-24 12:18:03 UTC
(In reply to Petr Horáček from comment #3)
> Thank you. According to documentation it should be in "Since: 1.4". Does it
> mean that flag option is there since 1.4, but
> NM_CHECKPOINT_CREATE_FLAG_DELETE_NEW_CONNECTIONS and
> NM_CHECKPOINT_CREATE_FLAG_DISCONNECT_NEW_DEVICES only since 1.6?
Exactly, the "Since: 1.4" refers to the enum itself, but some values were added later.
I don't know if this is standard practice, but it would be better to have "Since" tags for the members too...
Comment 5Beniamino Galvani
2017-07-24 12:21:09 UTC
Description of problem: CheckpointRollback call does not remove newly created connections and devices even with NM_CHECKPOINT_CREATE_FLAG_DELETE_NEW_CONNECTIONS | NM_CHECKPOINT_CREATE_FLAG_DISCONNECT_NEW_DEVICES flags. Version-Release number of selected component (if applicable): CentOS 7.3.1611 NetworkManager-1.4.0-20 How reproducible: Always Steps to Reproduce: 1. Create a bridge and attach NIC to it. 2. Create a checkpoint. 3. Create another bridge and reattach NIC to it. 4. Start rollback. Actual results: Although NIC was reconnected to the original bridge, new bridge and its connection are still there. Expected results: New connection and created device will be removed when CheckpointCreate is called with flags NM_CHECKPOINT_CREATE_FLAG_DELETE_NEW_CONNECTIONS | NM_CHECKPOINT_CREATE_FLAG_DISCONNECT_NEW_DEVICES. Reproducer script: import dbus import subprocess import time bus = dbus.SystemBus() proxy = bus.get_object('org.freedesktop.NetworkManager', '/org/freedesktop/NetworkManager') manager = dbus.Interface(proxy, 'org.freedesktop.NetworkManager') # create a bridge and attach NIC to it subprocess.check_call(['/usr/bin/nmcli', 'con', 'add', 'type', 'bridge', 'ifname', 'br1', 'autoconnect', 'yes', '--', 'connection.autoconnect-slaves', '1']) subprocess.check_call(['/usr/bin/nmcli', 'con', 'add', 'type', 'ethernet', 'ifname', 'eth0', 'autoconnect', 'yes', '--', 'connection.master', 'br1', 'connection.slave-type', 'bridge']) subprocess.check_call(['/usr/bin/nmcli', 'con', 'up', 'bridge-br1']) time.sleep(2) # create checkpoint ALL_DEVICES = dbus.Array([], signature=dbus.Signature('ao')) FOREVER = 0 NM_CHECKPOINT_CREATE_FLAG_DESTROY_ALL = 0x01 NM_CHECKPOINT_CREATE_FLAG_DELETE_NEW_CONNECTIONS = 0x02 NM_CHECKPOINT_CREATE_FLAG_DISCONNECT_NEW_DEVICES = 0x04 checkpoint = manager.CheckpointCreate( ALL_DEVICES, FOREVER, NM_CHECKPOINT_CREATE_FLAG_DESTROY_ALL | NM_CHECKPOINT_CREATE_FLAG_DELETE_NEW_CONNECTIONS | NM_CHECKPOINT_CREATE_FLAG_DISCONNECT_NEW_DEVICES ) time.sleep(2) # create another bridge and reattach NIC to it subprocess.check_call(['/usr/bin/nmcli', 'con', 'down', 'bridge-br1']) subprocess.check_call(['/usr/bin/nmcli', 'con', 'add', 'type', 'bridge', 'ifname', 'br2', 'autoconnect', 'yes', '--', 'connection.autoconnect-slaves', '1']) subprocess.check_call(['/usr/bin/nmcli', 'con', 'modify', 'bridge-slave-eth0', 'connection.master', 'br2', 'connection.slave-type', 'bridge']) subprocess.check_call(['/usr/bin/nmcli', 'con', 'up', 'bridge-br2']) time.sleep(2) # rollback to the checkpoint manager.CheckpointRollback(checkpoint) nmcli con show output: NAME UUID TYPE DEVICE bridge-br1 955c27cf-6948-43aa-bb82-026b2e798e68 bridge br1 bridge-br2 be417a69-1a83-4f4f-8567-0f80e97a9857 bridge br2 bridge-slave-eth0 7403cede-e1cb-4138-88dc-dba4f2e6a4ff 802-3-ethernet eth0 System eth0 5fb06bd0-0bb0-7ffb-45f1-d6edd65f3e03 802-3-ethernet -- ip link output: 1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT qlen 1 link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast master br1 state UP mode DEFAULT qlen 1000 link/ether 52:54:00:55:e6:7c brd ff:ff:ff:ff:ff:ff 41: br2: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN mode DEFAULT qlen 1000 link/ether 00:00:00:00:00:00 brd ff:ff:ff:ff:ff:ff 42: br1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP mode DEFAULT qlen 1000 link/ether 52:54:00:55:e6:7c brd ff:ff:ff:ff:ff:ff