Bug 2100979

Summary: [RFE] [network] Support managing the network through nmstate schema
Product: Red Hat Enterprise Linux 8 Reporter: Wen Liang <wenliang>
Component: rhel-system-rolesAssignee: Rich Megginson <rmeggins>
Status: CLOSED ERRATA QA Contact: Jon Trossbach <jtrossba>
Severity: medium Docs Contact: Gabi Fialová <gfialova>
Priority: unspecified    
Version: 8.7CC: djez, fge, gfialova, nhosoi, rmeggins, spetrosi, till, zhguan
Target Milestone: rcKeywords: FutureFeature, Triaged
Target Release: 8.7   
Hardware: x86_64   
OS: Linux   
Whiteboard: role:network
Fixed In Version: rhel-system-roles-1.20.0-1.el8 Doc Type: Enhancement
Doc Text:
.The `network` RHEL System Role supports network configuration using the `nmstate` API With this update, the `network` RHEL System Role supports network configuration through the `nmstate` API. Users can now directly apply the configuration of the required network state to a network interface instead of creating connection profiles. The feature also allows partial configuration of a network. As a result, the following benefits exist: * decreased network configuration complexity * reliable way to apply the network state changes * no need to track the entire network configuration
Story Points: ---
Clone Of: 2072385 Environment:
Last Closed: 2022-11-08 09:41:52 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: 2072385    
Bug Blocks:    

Comment 9 Jon Trossbach 2022-07-29 14:47:59 UTC
Unfortunately, this is not ready for primetime.

The 2.9 reversioning is not working as intended at the moment. David Jez and I will fix that and get this out the door. 2.13 is confirmed to not be supporting RHEL 6 as of now:
https://issues.redhat.com/browse/RHELPLAN-125014

It is entirely possible that RHEL 6 is working with this change however our testsuite needs an update that will be essential for ensuring escapes don't happen going forward.

Noting that RHEL 6.10 is failing, the below test results are verified as working for 2.13:

export ANSIBLE_VER=2.13
:: [ 20:45:32 ] :: [   PASS   ] :: Test network with ANSIBLE-2.13 against RHEL_7_9_GA (Expected 0, got 0)
:: [ 20:53:35 ] :: [   PASS   ] :: Test network with ANSIBLE-2.13 against RHEL_8_6_0_GA (Expected 0, got 0)
:: [ 21:01:43 ] :: [   PASS   ] :: Test network with ANSIBLE-2.13 against RHEL_8_7_TESTING (Expected 0, got 0)
:: [ 20:58:35 ] :: [   PASS   ] :: Test network with ANSIBLE-2.13 against RHEL_9_0_0_GA (Expected 0, got 0)
:: [ 21:04:18 ] :: [   PASS   ] :: Test network with ANSIBLE-2.13 against RHEL_9_1_TESTING (Expected 0, got 0)

# uname -r
4.18.0-411.el8.x86_64
# rpm -q rhel-system-roles
rhel-system-roles-1.19.3-1.el8.noarch

from http://download.eng.bos.redhat.com/brewroot/vol/rhel-9/packages/rhel-system-roles/1.19.3/1.el9/noarch/rhel-system-roles-1.19.3-1.el9.noarch.rpm

Comment 10 Rich Megginson 2022-07-29 15:29:56 UTC
(In reply to Jon Trossbach from comment #9)
> Unfortunately, this is not ready for primetime.
> 
> The 2.9 reversioning is not working as intnded at the moment. David Jez and
> I will fix that and get this out the door.

Not sure what you mean - do you mean you are not able to install and run ansible 2.9 on rhel 8.7?

> 2.13 is confirmed to not be
> supporting RHEL 6 as of now:
> https://issues.redhat.com/browse/RHELPLAN-125014

correct

> 
> It is entirely possible that RHEL 6 is working with this change however our
> testsuite needs an update that will be essential for ensuring escapes don't
> happen going forward.

"ensuring escapes"? Not sure what you mean.

> 
> Noting that RHEL 6.10 is failing, the below test results are verified as
> working for 2.13:
> 
> export ANSIBLE_VER=2.13
> :: [ 20:45:32 ] :: [   PASS   ] :: Test network with ANSIBLE-2.13 against
> RHEL_7_9_GA (Expected 0, got 0)
> :: [ 20:53:35 ] :: [   PASS   ] :: Test network with ANSIBLE-2.13 against
> RHEL_8_6_0_GA (Expected 0, got 0)
> :: [ 21:01:43 ] :: [   PASS   ] :: Test network with ANSIBLE-2.13 against
> RHEL_8_7_TESTING (Expected 0, got 0)
> :: [ 20:58:35 ] :: [   PASS   ] :: Test network with ANSIBLE-2.13 against
> RHEL_9_0_0_GA (Expected 0, got 0)
> :: [ 21:04:18 ] :: [   PASS   ] :: Test network with ANSIBLE-2.13 against
> RHEL_9_1_TESTING (Expected 0, got 0)
> 
> # uname -r
> 4.18.0-411.el8.x86_64
> # rpm -q rhel-system-roles
> rhel-system-roles-1.19.3-1.el8.noarch
> 
> from
> http://download.eng.bos.redhat.com/brewroot/vol/rhel-9/packages/rhel-system-
> roles/1.19.3/1.el9/noarch/rhel-system-roles-1.19.3-1.el9.noarch.rpm

Comment 11 Jon Trossbach 2022-08-02 00:30:23 UTC
> Not sure what you mean - do you mean you are not able to install and run ansible 2.9 on rhel 8.7?
Indeed this was my issue. Found a place to get an rpm for that for now.

> "ensuring escapes"? Not sure what you mean.
"escapes" is a word we use when a bug could and should have been caught by us but wasn't.

This looks good to go; I figured out a workflow with djez that should keep us going for a while.

# dnf install http://download.eng.bos.redhat.com/brewroot/vol/rhel-8/packages/rhel-system-roles/1.19.3/1.el8/n\
oarch/rhel-system-roles-1.19.3-1.el8.noarch.rpm

# rpm -q rhel-system-roles
rhel-system-roles-1.19.3-1.el8.noarch
# uname -r
4.18.0-411.el8.x86_64

EXPORT SYSTEM_ROLES_ONLY_TESTS=network/tests_network_state_nm.yml


# ansible --version
ansible [core 2.13.2]
  config file = /etc/ansible/ansible.cfg
  configured module search path = ['/root/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/lib/python3.9/site-packages/ansible
  ansible collection location = /root/.ansible/collections:/usr/share/ansible/collections
  executable location = /usr/bin/ansible
  python version = 3.9.13 (main, Jun 15 2022, 11:24:50) [GCC 8.5.0 20210514 (Red Hat 8.5.0-13)]
  jinja version = 3.1.2
  libyaml = True

:: [ 18:00:15 ] :: [   PASS   ] :: Test network with ANSIBLE-2.9 against RHEL_6_10_GA (Expected 0, got 0)
:: [ 18:01:30 ] :: [   PASS   ] :: Test network with ANSIBLE-2.9 against RHEL_7_9_GA (Expected 0, got 0)
:: [ 18:09:15 ] :: [   PASS   ] :: Test network with ANSIBLE-2.9 against RHEL_8_6_0_GA (Expected 0, got 0)
:: [ 18:12:16 ] :: [   PASS   ] :: Test network with ANSIBLE-2.9 against RHEL_8_7_TESTING (Expected 0, got 0)
:: [ 18:14:21 ] :: [   PASS   ] :: Test network with ANSIBLE-2.9 against RHEL_9_0_0_GA (Expected 0, got 0)
:: [ 18:18:08 ] :: [   PASS   ] :: Test network with ANSIBLE-2.9 against RHEL_9_1_TESTING (Expected 0, got 0)


# ansible --version
ansible [core 2.13.2]
  config file = /etc/ansible/ansible.cfg
  configured module search path = ['/root/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/lib/python3.9/site-packages/ansible
  ansible collection location = /root/.ansible/collections:/usr/share/ansible/collections
  executable location = /usr/bin/ansible
  python version = 3.9.13 (main, Jun 15 2022, 11:24:50) [GCC 8.5.0 20210514 (Red Hat 8.5.0-13)]
  jinja version = 3.1.2
  libyaml = True

:: [ 20:01:16 ] :: [   FAIL   ] :: Test network with ANSIBLE-2.13 against RHEL_6_10_GA (Expected 0, got 1)
:: [ 19:59:33 ] :: [   PASS   ] :: Test network with ANSIBLE-2.13 against RHEL_7_9_GA (Expected 0, got 0)
:: [ 19:15:00 ] :: [   PASS   ] :: Test network with ANSIBLE-2.13 against RHEL_8_6_0_GA (Expected 0, got 0)
:: [ 19:57:47 ] :: [   PASS   ] :: Test network with ANSIBLE-2.13 against RHEL_8_7_TESTING (Expected 0, got 0)
:: [ 19:00:06 ] :: [   PASS   ] :: Test network with ANSIBLE-2.13 against RHEL_9_0_0_GA (Expected 0, got 0)
:: [ 18:55:56 ] :: [   PASS   ] :: Test network with ANSIBLE-2.13 against RHEL_9_1_TESTING (Expected 0, got 0)

Comment 12 Jon Trossbach 2022-08-02 00:36:37 UTC
The top Ansible version should read 2.9 that was just a mistake that it says 2.13 with the corresponding 2.13 software versions.

Comment 14 errata-xmlrpc 2022-11-08 09:41:52 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 (rhel-system-roles bug fix and enhancement update), 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/RHEA-2022:7568