Bug 1369905

Summary: [RFE] NetworkManager only configures static/manual IP addresses after DHCP completes
Product: Red Hat Enterprise Linux 7 Reporter: Thomas Haller <thaller>
Component: NetworkManagerAssignee: Beniamino Galvani <bgalvani>
Status: CLOSED ERRATA QA Contact: Desktop QE <desktop-qa-list>
Severity: medium Docs Contact:
Priority: medium    
Version: 7.3CC: aloughla, atragler, bgalvani, lrintel, mleitner, rkhan, sukulkar, thaller, vbenes
Target Milestone: rcKeywords: FutureFeature
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: NetworkManager-1.16.2-0.1.20190328git8ec0954570.el7 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1695070 (view as bug list) Environment:
Last Closed: 2019-08-06 13:16:20 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:
Attachments:
Description Flags
[PATCH] device: apply static addresses immediately for DHCPv4 method
none
[NM-CI PATCH] ipv4: add test @ipv4_dhcp_apply_static_address_immediately none

Description Thomas Haller 2016-08-24 16:37:55 UTC
subject...

it means, if you have a connection with ipv4.method=auto and additional static addresses ipv4.addresses, that the static addresses are not configured as early as possible, but only after DHCP completes.

That should be improved.

Comment 2 Beniamino Galvani 2018-07-06 16:53:00 UTC
Please review branch bg/dhcpv4-static-addr-rh1369905.

Comment 3 Thomas Haller 2018-07-11 15:27:50 UTC
(In reply to Beniamino Galvani from comment #2)
> Please review branch bg/dhcpv4-static-addr-rh1369905.

nice work, thanks for pushing this forward...


first patch lgtm. Maybe merge that one early and backport to 1.12.


Second patch also looks fine, but I think it could be improved.

Optimally, handling of manual addresses is always done the same, regardless of the ipv4.method. In the patch, it's once handled under

  if (strcmp (method, NM_SETTING_IP4_CONFIG_METHOD_AUTO) == 0) {

and then again below under

  } else if (strcmp (method, NM_SETTING_IP4_CONFIG_METHOD_MANUAL) == 0) {

I think these two places should be unified.


For example, both places result in the callbacks ipv4_dhcp_method_apply_manual() vs. ipv4_manual_method_apply(). These two callbacks look rather similar, is it really necessary that they are different? It seems to me, when ACD calls back, there should be one callback, and that should then figure out what to do (possibly on the enabled IP methods, etc). This is only a small example, where I think manual-addressing should be handled identical, both with method=auto and method=manual.

Comment 4 Beniamino Galvani 2018-08-01 15:18:52 UTC
Created attachment 1472140 [details]
[PATCH] device: apply static addresses immediately for DHCPv4 method

Comment 5 Beniamino Galvani 2018-08-01 15:20:04 UTC
Created attachment 1472141 [details]
[NM-CI PATCH] ipv4: add test @ipv4_dhcp_apply_static_address_immediately

Comment 6 Thomas Haller 2018-08-02 08:37:31 UTC
(In reply to Beniamino Galvani from comment #4)
> Created attachment 1472140 [details]
> [PATCH] device: apply static addresses immediately for DHCPv4 method

lgtm

Comment 11 errata-xmlrpc 2019-08-06 13:16:20 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-2019:2302