Bug 1401426

Summary: Should reset Manual(static) ips when switching to Automatic(DHCP) mode
Product: Red Hat Enterprise Linux 7 Reporter: Huijuan Zhao <huzhao>
Component: cockpitAssignee: Marius Vollmer <mvollmer>
Status: CLOSED WONTFIX QA Contact: qe-baseos-daemons
Severity: high Docs Contact:
Priority: medium    
Version: 7.3CC: bugs, cshao, dougsland, huzhao, leiwang, mvollmer, qiyuan, weiwang, yaniwang, ycui
Target Milestone: pre-dev-freezeKeywords: Extras
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: 2021-01-15 07:28:58 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:
Bug Depends On:    
Bug Blocks: 1400961    
Attachments:
Description Flags
All logs and all files in /etc/sysconfig/network-scripts/
none
Screenshot of adding Manual(static) IP in Automatic(DHCP) mode
none
Screenshot of shows static IP in DHCP mode none

Description Huijuan Zhao 2016-12-05 08:53:38 UTC
Created attachment 1228014 [details]
All logs and all files in /etc/sysconfig/network-scripts/

Description of problem:
Should not permit setting Manual(static) ip in Automatic (DHCP) mode


Version-Release number of selected component (if applicable):
redhat-virtualization-host-4.0-20161130.0
imgbased-0.8.10-0.1.el7ev.noarch
cockpit-ws-122-3.el7.x86_64
NetworkManager-1.4.0-13.el7_3.x86_64

How reproducible:
100%

Steps to Reproduce:
1. Install RHVH via interactive anaconda.
2. Reboot RHVH and login cockpit, enter Networking page
3. Enter one NIC em1 interface page, enter IPV4 settings page, setup Addresses as "Automatic(DHCP)"
4. Click "+" to add manual(static) ip

Actual results:
After step4, it can add manual(static) ip in the Automatic(DHCP) mode

Expected results:
After step4, it should not permit clicking "+" to add manual(static) ip in the Automatic(DHCP) mode

Additional info:
1. If setup manual(static) mode and setup ip, then change to Automatic(DHCP), the static ip is still there.
2. Both IPV4 and IPV6 have this issue.

Comment 1 Huijuan Zhao 2016-12-05 08:55:58 UTC
Created attachment 1228015 [details]
Screenshot of adding Manual(static) IP in Automatic(DHCP) mode

Comment 2 Huijuan Zhao 2016-12-05 08:57:02 UTC
Created attachment 1228016 [details]
Screenshot of shows static IP in DHCP mode

Comment 4 Dominik Perpeet 2016-12-13 14:32:40 UTC
Is there a reason we shouldn't allow this? As far as I know this is a valid setting and can work.

Comment 5 Huijuan Zhao 2016-12-14 02:34:40 UTC
I am not sure the major purpose of allowing this, but this will cause an issue:

If first setup Manual mode, then change to Automatic(DHCP), the original Manual IP is still there, in other words, there are two IPs currently(original Manual IP, and DHCP IP). I think it should delete original Manual IP automatically after changing to Automatic(DHCP) mode.

Comment 6 Dominik Perpeet 2016-12-14 11:02:23 UTC
I think it's good for Cockpit to behave how one would expect it to behave, and not contrary to command line interactions.

Adding manual IP addresses is possible when you have DHCP mode, so I think we should also have that in Cockpit.

That leads to the question why we should then delete additional manual addresses if we switch to DHCP mode in the first place.

Marius, what do you think?

Comment 7 Marius Vollmer 2017-02-08 10:15:03 UTC
(In reply to Dominik Perpeet from comment #6)

> That leads to the question why we should then delete additional manual
> addresses if we switch to DHCP mode in the first place.

Using DHCP together with additional static IP addresses is possible, but afaics quite unusual.  Not all networking UIs support this, for example.

So having to explicitly delete a static IP address when switching to DHCP is unexpected.

Cockpit should reset the list of static IPs to empty when switching to DHCP.

https://trello.com/c/Jpho7Yzz/462-networking-reset-static-ips-when-switching-to-dhcp

Comment 8 Yaniv Lavi 2017-02-15 09:59:01 UTC
(In reply to Marius Vollmer from comment #7)
> (In reply to Dominik Perpeet from comment #6)
> 
> > That leads to the question why we should then delete additional manual
> > addresses if we switch to DHCP mode in the first place.
> 
> Using DHCP together with additional static IP addresses is possible, but
> afaics quite unusual.  Not all networking UIs support this, for example.
> 
> So having to explicitly delete a static IP address when switching to DHCP is
> unexpected.
> 
> Cockpit should reset the list of static IPs to empty when switching to DHCP.
> 
> https://trello.com/c/Jpho7Yzz/462-networking-reset-static-ips-when-switching-
> to-dhcp

I think this bug should be closed.
Even if this is unusual, it is still a useful feature.

Comment 9 Marius Vollmer 2017-02-15 11:04:36 UTC
(In reply to Yaniv Dary from comment #8)

> Even if this is unusual, it is still a useful feature.

The feature (DHCP plus additional status IP addresses) will remain.

>> Cockpit should reset the list of static IPs to empty when switching to DHCP.

After switching to DHCP, you can again add additional stats IP addresses.

Comment 10 Marius Vollmer 2017-02-21 11:47:20 UTC
https://github.com/cockpit-project/cockpit/pull/5918

Comment 11 Marius Vollmer 2017-02-22 08:20:49 UTC
> https://github.com/cockpit-project/cockpit/pull/5918

We do not want to go forward immediately with this pull request until we know whether this change is really the right thing.

Please comment on the PR or here to help us decide!

Comment 12 Marius Vollmer 2017-03-07 11:47:53 UTC
Back to NEW to more clearly show that we have to start over.

Comment 13 Yaniv Lavi 2017-03-09 10:42:01 UTC
(In reply to Marius Vollmer from comment #11)
> > https://github.com/cockpit-project/cockpit/pull/5918
> 
> We do not want to go forward immediately with this pull request until we
> know whether this change is really the right thing.
> 
> Please comment on the PR or here to help us decide!

I like the current behavior as it allows the user to switch to DHCP and decide on resetting the manually set IPs. I would close this bug without any changes.

Comment 15 RHEL Program Management 2021-01-15 07:28:58 UTC
After evaluating this issue, there are no plans to address it further or fix it in an upcoming release.  Therefore, it is being closed.  If plans change such that this issue will be fixed in an upcoming release, then the bug can be reopened.