Bug 1885857

Summary: RFE: Support static IP address and routes on DHCP/Autoconf interface.
Product: Red Hat Enterprise Linux 8 Reporter: Dominik Holler <dholler>
Component: nmstateAssignee: Gris Ge <fge>
Status: CLOSED DEFERRED QA Contact: Mingyu Shi <mshi>
Severity: medium Docs Contact:
Priority: medium    
Version: 8.2CC: amusil, ferferna, jiji, jishi, mburman, network-qe, till
Target Milestone: rcKeywords: FutureFeature, Triaged
Target Release: 8.5Flags: pm-rhel: mirror+
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-09-18 06:27:49 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:
Embargoed:
Bug Depends On:    
Bug Blocks: 1875520    
Attachments:
Description Flags
files referenced in the "Steps to Reproduce" none

Description Dominik Holler 2020-10-07 07:53:22 UTC
Created attachment 1719639 [details]
files referenced in the "Steps to Reproduce"

Description of problem:
If there is an static IPv6 without disabling dynamic IPv6, nmstate seems to be confused on the next change. 

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

How reproducible:
100%

Steps to Reproduce:
1. nmstatectl set ~/initial.state
2. nmcli c m eth0  ipv6.address fd::44/64
3. nmcli c m eth0  ipv6.gateway fe80::1
4. nmcli c up eth0
5. python3 ~/apply_desired.py


Actual results:
nmstate fails with "ipv6.gateway: gateway cannot be set if there are no addresses configured"

Expected results:
nmstate succeeds

Additional info:

Comment 1 Gris Ge 2020-12-02 08:25:35 UTC
Hi Dominik,

The problem only exists on RHEL 8.2(nmstate-0.2).
Do you still need a zstream fix there?

RHEL 8.3 and RHEL 8.4 does not have this problem.

Meanwhile, nmstate-0.3 and nmstate-1.0 does not support DHCP/AutoConf with static ip and gateway. When user have both static ip/gatway along with DHCP/AutoConf, the static ip/gateway will be removed. Is this acceptable?

Comment 2 Dominik Holler 2020-12-02 09:21:26 UTC
(In reply to Gris Ge from comment #1)
> Hi Dominik,
> 
> The problem only exists on RHEL 8.2(nmstate-0.2).
> Do you still need a zstream fix there?
> 

No, thanks for asking.
RHV is already completely on RHEL 8.3 now.

> RHEL 8.3 and RHEL 8.4 does not have this problem.
> 
> Meanwhile, nmstate-0.3 and nmstate-1.0 does not support DHCP/AutoConf with
> static ip and gateway. When user have both static ip/gatway along with
> DHCP/AutoConf, the static ip/gateway will be removed. Is this acceptable?

Yes, the only way to set an additional IP address in oVirt/RHV is
https://github.com/oVirt/vdsm/tree/master/vdsm_hooks/extra_ipv4_addrs
which is triggered after nmstate.

Please ensure that static routes, set by nmstate, are not removed by nmstate unintentionally.

Comment 3 Gris Ge 2020-12-05 02:10:34 UTC
Hi Dominik,

For any route set via nmstate, nmstate will not removed unintentionally. If you found otherwise, feel free to open a new bug.

If you need nmstate support of static ip/routes over auto interface, please share the use case with me, and we may plan it for RHEL 8.5.

Comment 5 Ales Musil 2021-03-15 10:47:35 UTC
(In reply to Gris Ge from comment #3)
> Hi Dominik,
> 
> For any route set via nmstate, nmstate will not removed unintentionally. If
> you found otherwise, feel free to open a new bug.
> 
> If you need nmstate support of static ip/routes over auto interface, please
> share the use case with me, and we may plan it for RHEL 8.5.

Hi Gris,

that in general contradicts what is allowed to configure in RHV. We don't mix dynamic with static ip+gateway config. 
From my point of view we don't need this feature.

Thanks

Comment 7 Gris Ge 2021-09-18 06:27:49 UTC
Closing as RHV does not require feature for assigning static IP address and routes on DHCP/Autoconf interface