Bug 1708890

Summary: Network manager images vs tempest
Product: Red Hat OpenStack Reporter: Martin Kopec <mkopec>
Component: openstack-tempestAssignee: Martin Kopec <mkopec>
Status: CLOSED ERRATA QA Contact: svyas
Severity: medium Docs Contact:
Priority: medium    
Version: 10.0 (Newton)CC: afazekas, apevec, chkumar, jschluet, lhh, slinaber, udesale
Target Milestone: ---Keywords: Triaged, ZStream
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: openstack-tempest-13.0.0-23.bafe630git.el7ost Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: 1689153 Environment:
Last Closed: 2019-10-16 09:41:06 UTC Type: ---
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: 1689153, 1707442, 1714145    
Bug Blocks:    
Attachments:
Description Flags
attachment none

Description Martin Kopec 2019-05-11 12:44:34 UTC
+++ This bug was initially created as a clone of Bug #1689153 +++

Looks like beside the IPv6 address association tempest has issues with network manager images with  tempest.scenario.test_network_basic_ops.TestNetworkBasicOps.test_hotplug_nic .

The issue 100% percent reproducible, but looks related to interface auto-configuration. 

Either move nm out of they way,  preferably have nm to the job.

Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/tempest/common/utils/__init__.py", line 88, in wrapper
    return f(*func_args, **func_kwargs)
  File "/usr/lib/python2.7/site-packages/tempest/scenario/test_network_basic_ops.py", line 505, in test_hotplug_nic
    self._hotplug_server()
  File "/usr/lib/python2.7/site-packages/tempest/scenario/test_network_basic_ops.py", line 293, in _hotplug_server
    new_nic))
  File "/usr/lib/python2.7/site-packages/tempest/lib/common/utils/linux/remote_client.py", line 33, in wrapper
    return function(self, *args, **kwargs)
  File "/usr/lib/python2.7/site-packages/tempest/lib/common/utils/linux/remote_client.py", line 108, in exec_command
    return self.ssh_client.exec_command(cmd)
  File "/usr/lib/python2.7/site-packages/tempest/lib/common/ssh.py", line 202, in exec_command
    stderr=err_data, stdout=out_data)
tempest.lib.exceptions.SSHExecCommandFailed: Command 'set -eu -o pipefail; PATH=$PATH:/sbin; sudo ip addr add 10.100.0.23/28 dev eth1', exit status: 2, stderr:
RTNETLINK answers: File exists

Steps to reproduce:
$ source ~/overcloudrc
$ openstack flavor create --id 200 --ram 1024 --disk 10 --vcpus 1 rhel
$ openstack flavor create --id 201 --ram 2048 --disk 11 --vcpus 2 rhel_alt

$ discover-tempest-config --debug --create --image <path/to/rhel8> --deployer-input ../ir-tempest-deployer-input.conf compute.flavor_ref 200 compute.flavor_ref_alt 201  compute.image_ssh_user cloud-user validation.image_ssh_user cloud-user scenario.dhcp_client dhclient volume.volume_size 12

$ tempest run --regex tempest.scenario.test_network_basic_ops.TestNetworkBasicOps.test_hotplug_nic

--- Additional comment from Martin Kopec on 2019-05-07 13:12:12 UTC ---

The test fails here [1] when the interface is already associated with an IP address.

[1] https://github.com/openstack/tempest/blob/7fb6e810279219ff75d4013957530f177ee9d27a/tempest/scenario/test_network_basic_ops.py#L295-L298

Comment 2 Martin Kopec 2019-05-12 13:32:12 UTC
Actually the following commands are valid for RHOS-10 (instead of the 'discover-tempest-config' and 'tempest run' in the previous comment:
$ ./tools/config_tempest.py --image <path/to/rhel8> --deployer-input ../tempest-deployer-input.conf  --debug --create identity.uri $OS_AUTH_URL  compute.allow_tenant_isolation true  object-storage.operator_role swiftoperator  identity.admin_password $OS_PASSWORD compute.flavor_ref 200 compute.flavor_ref_alt 201  compute.image_ssh_user cloud-user validation.image_ssh_user cloud-user scenario.dhcp_client dhclient volume.volume_size 12

$ ostestr --regex tempest.scenario.test_network_basic_ops.TestNetworkBasicOps.test_hotplug_nic

Comment 15 svyas 2019-09-17 10:04:27 UTC
Created attachment 1615786 [details]
attachment

Comment 16 svyas 2019-09-17 10:09:31 UTC
The above attachment contains verification output for the https://bugzilla.redhat.com/show_bug.cgi?id=1708890.
The 'Fixed in version' package is present in the tested environment. The backported code is also present in the codebase. Please refer to verification output for more details.

Comment 18 errata-xmlrpc 2019-10-16 09:41:06 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:3122