Bug 1816026

Summary: Switching ovirtmgmt from DHCP to IPv4 static is blocked becasue nmstate accepts only 2 name servers
Product: [oVirt] vdsm Reporter: Michael Burman <mburman>
Component: CoreAssignee: bugs <bugs>
Status: CLOSED CURRENTRELEASE QA Contact: Michael Burman <mburman>
Severity: high Docs Contact:
Priority: unspecified    
Version: 4.40.2CC: amusil, bugs, dholler, michal.skrivanek
Target Milestone: ovirt-4.4.0Keywords: Automation, AutomationBlocker, Regression
Target Release: ---Flags: michal.skrivanek: ovirt-4.4?
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: vdsm-4.40.9-1.el8ev.x86_64 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-05-20 20:00:06 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Network RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1816043    
Bug Blocks:    

Description Michael Burman 2020-03-23 08:06:08 UTC
Description of problem:
Switching ovirtmgmt from DHCP to IPv4 static is blocked becasue nmstate accepts only 2 name servers 

nmstate doesn't allow to set more than 2 name servers, so when we try to switch host from dhcp to ip static and host has 3 name servers(like all our hosts) the operation is blocked.
We need to handle this in our side and pass only two name servers and if nmstate doesn't allow it.

libnmstate.error.NmstateNotImplementedError: Nmstate only support at most 2 DNS name servers

Version-Release number of selected component (if applicable):
vdsm-4.40.7-1.el8ev.x86_64
nmstate-0.2.6-4.8.el8.noarch

How reproducible:
100%

Steps to Reproduce:
1. Have dhcp host with 3 name servers
2. Try to switch ovirtmgmt bootprotocol from dhcp to static ipv4 address

Actual results:
Operation blocked
libnmstate.error.NmstateNotImplementedError: Nmstate only support at most 2 DNS name servers

Expected results:
Must work

Additional info:
At the current it's not clear why nmstate support only 2 name servers in resolv.conf

Comment 1 Michael Burman 2020-03-30 12:20:28 UTC
Verified on - vdsm-4.40.9-1.el8ev.x86_64 with 
nmstate-0.2.6-6.el8.noarch
rhvm-4.4.0-0.29.master.el8ev.noarch

Comment 2 Sandro Bonazzola 2020-05-20 20:00:06 UTC
This bugzilla is included in oVirt 4.4.0 release, published on May 20th 2020.

Since the problem described in this bug report should be
resolved in oVirt 4.4.0 release, it has been closed with a resolution of CURRENT RELEASE.

If the solution does not work for you, please open a new bug report.