Bug 2056362

Summary: Changing NIC type rolls back the checkpoint
Product: Red Hat Enterprise Linux 8 Reporter: peyu
Component: cockpitAssignee: Martin Pitt <mpitt>
Status: CLOSED DUPLICATE QA Contact: peyu
Severity: high Docs Contact:
Priority: unspecified    
Version: 8.6CC: arachman, cshao, lsvaty, lveyde, mavital, peyu, qiyuan, sanja, sbonazzo, weiwang, yaniwang
Target Milestone: rcFlags: pm-rhel: mirror+
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: 2022-02-23 14:18:38 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Node RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
page after changing IPv{4,6} to manual none

Description peyu 2022-02-21 05:07:49 UTC
Description of problem:
Login cockpit, configure the NIC with IPv4 and IPv6 with "Manual" type:
1. The IPv6 setting does not take effect and will return to "Automatic" mode immediately.
2. The settings for IPv4 can take effect, but if switch from "Manual" mode to other modes, it fails.


Version-Release number of selected component (if applicable):
RHVH: rhvh-4.5.0.2-0.20220216.0+1

subscription-manager-cockpit-1.28.25-1.el8.noarch
cockpit-bridge-261-1.el8.x86_64
cockpit-system-261-1.el8.noarch
cockpit-storaged-261-1.el8.noarch
cockpit-ws-261-1.el8.x86_64
cockpit-261-1.el8.x86_64
cockpit-ovirt-dashboard-0.15.1-2.el8ev.noarch


How reproducible:
100%

Steps to Reproduce:
1. Install redhat-virtualization-host-4.5.0-202202161646_8.6
2. Login cockpit via firefox browser
3. Go to "Networking" -> "Interfaces"
4. Click a NIC to enter its configuration page
5. Configure the NIC with IPv4 and IPv6 with "Manual" type and fill in the IP address
6. Click the "Change the settings" button in the "Connection will be lost" dialog that pops up
7. Check the type of IPv4 and IPv6
8. Switch the settings from "Manual" type back to "Automatic"/or other type 


Actual results:
1. The IPv6 setting does not take effect and will return to "Automatic" mode immediately.
2. The settings for IPv4 can take effect, but if switch from "Manual" mode to other modes, it fails.

Expected results:
Set the IPv4 and IPv6 of the NIC to "Manual" mode should take effect, and can switch back to other modes.

Additional info:

Comment 1 peyu 2022-02-21 07:04:54 UTC
Configuring a type other than the default type for the NIC's IPv4 and IPv6 will also fail.

Comment 2 Martin Pitt 2022-02-22 08:18:20 UTC
Created attachment 1862565 [details]
page after changing IPv{4,6} to manual

Hello peyu, thanks for your report! I tried to reproduce this.

> 5. Configure the NIC with IPv4 and IPv6 with "Manual" type and fill in the IP address
> 6. Click the "Change the settings" button in the "Connection will be lost" dialog that pops up

I changed an "inactive" eth card to IPv4 "manual" with 1.2.3.4/24 and gw 1.2.3.1, then clicked "change the settings".
I then changed the IPv6 settings of the same card to "manual" with "ab12::2/32" and gw ab12::1, again clicked "change settings.
(These are completely bogus addresses of course)

> 7. Check the type of IPv4 and IPv6

This worked fine:

    IPv4:  Address 1.2.3.4/24 via 1.2.3.1
    IPv6:  Address ab12:0:0:0:0:0:0:2/32 via ab12:0:0:0:0:0:0:1

(See attached screenshot)

This was kept even after a page reload, and `nmcli con show 'System eth1'` agrees:

ipv4.method:                            manual
ipv4.dns:                               --
ipv4.addresses:                         1.2.3.4/24
ipv4.gateway:                           1.2.3.1

ipv6.method:                            manual
ipv6.dns:                               --
ipv6.addresses:                         ab12::2/32
ipv6.gateway:                           ab12::1


> 8. Switch the settings from "Manual" type back to "Automatic"/or other type 

I switched back to "Automatic", first with keeping the additional manual address. Then again with dropping it, so that both are only "Automatic". I also tried "Link local" and "Disabled", both worked.

I use the same version as you (cockpit-system-261-1.el8.noarch).

So there must be something subtly different. Most probably NetworkManager runs into some error and does not accept the new settings.

Can you please try this again, and capture

   journalctl --since '10 minutes ago' > /tmp/journal.txt

after the issue happens, and attach /tmp/journal.txt here? It's also worth opening the developer console (Ctrl+Shift+J) and watch out for errors/warnings when that happens.

Thanks!

Comment 5 Martin Pitt 2022-02-23 03:35:30 UTC
Thanks! This confirms that it's an unintended checkpoint rollback. I.e. the same root cause as bug #2056386, just that this is harder for me to reproduce.

Marius is working on the other one, and this is almost surely going to be addressed by the same fix.

Comment 6 Martin Pitt 2022-02-23 14:18:38 UTC
Marking this as a duplicate for now, as the other bug has a bit more state.

*** This bug has been marked as a duplicate of bug 2056386 ***