Bug 1478121 - Nova unit tests failing on 15.0.6-3
Summary: Nova unit tests failing on 15.0.6-3
Keywords:
Status: CLOSED DUPLICATE of bug 1469225
Alias: None
Product: Red Hat OpenStack
Classification: Red Hat
Component: openstack-nova
Version: 11.0 (Ocata)
Hardware: All
OS: All
unspecified
medium
Target Milestone: async
: 11.0 (Ocata)
Assignee: Eoghan Glynn
QA Contact: Joe H. Rahme
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-08-03 15:46 UTC by Tim Clark
Modified: 2020-12-14 09:21 UTC (History)
10 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-08-11 15:16:53 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Tim Clark 2017-08-03 15:46:11 UTC
Description of problem:

Nova unit tests failing on 15.0.6-3

Version-Release number of selected component (if applicable):
python-nova-15.0.6-3.el7ost.noarch

How reproducible:
Consistently

Steps to Reproduce:
1. Expand SRPM for python-nova-15.0.6-3
2. Run `tox -e py27`


Actual results:

==============================
Failed 1 tests - output below:
==============================

nova.tests.unit.virt.libvirt.volume.test_net.LibvirtNetVolumeDriverTestCase.test_libvirt_rbd_driver_auth_enabled_flags_secret_uuid_fallback
-------------------------------------------------------------------------------------------------------------------------------------------

Captured traceback:
~~~~~~~~~~~~~~~~~~~
    Traceback (most recent call last):
      File "nova/tests/unit/virt/libvirt/volume/test_net.py", line 177, in test_libvirt_rbd_driver_auth_enabled_flags_secret_uuid_fallback
        libvirt_driver.disconnect_volume(connection_info, "vde")
    TypeError: disconnect_volume() takes exactly 4 arguments (3 given)


Expected results:

All tests pass

Additional info:

This looks like a conflict between the hotpatch 0001-libvirt-Pass-instance-to-connect_volume-and-disconne.patch and commit fb4184f1e690901378a155573368a55ff9a8a779.

From fb4184f1e690901378a155573368a55ff9a8a779:
> NOTE(mriedem): The unit test is modified slightly to not
> pass an instance to the disconnect_volume method as that
> was only available starting in Pike: b66b7d4f9d

It looks like the test was never squared after 0001-libvirt-Pass-instance-to-connect_volume-and-disconne.patch was added.  Looks like an easy fix via:
---
 nova/tests/unit/virt/libvirt/volume/test_net.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/nova/tests/unit/virt/libvirt/volume/test_net.py b/nova/tests/unit/virt/libvirt/volume/test_net.py
index e868ffa..6f10431 100644
--- a/nova/tests/unit/virt/libvirt/volume/test_net.py
+++ b/nova/tests/unit/virt/libvirt/volume/test_net.py
@@ -174,7 +174,8 @@ class LibvirtNetVolumeDriverTestCase(
         self.assertEqual(secret_type, tree.find('./auth/secret').get('type'))
         # Assert that the secret_uuid comes from CONF.libvirt.rbd_secret_uuid.
         self.assertEqual(flags_uuid, tree.find('./auth/secret').get('uuid'))
-        libvirt_driver.disconnect_volume(connection_info, "vde")
+        libvirt_driver.disconnect_volume(connection_info, "vde",
+                                         mock.sentinel.instance)

     def test_libvirt_rbd_driver_auth_disabled(self):
         libvirt_driver = net.LibvirtNetVolumeDriver(self.fake_host)
--

Comment 1 Tim Clark 2017-08-03 15:54:41 UTC
Correction:

> Steps to Reproduce:
> 1. Expand SRPM for python-nova-15.0.6-3
> 2. Apply patches from ./rpm/
> 3. Run `tox -e py27`

Comment 3 Sylvain Bauza 2017-08-11 15:16:53 UTC
The issue was identified previously and the fix is attached to another BZ. Please watch https://bugzilla.redhat.com/show_bug.cgi?id=1469225 that provides the NVR (number-versioned-release) of the bugfix instead.

Thanks.

*** This bug has been marked as a duplicate of bug 1469225 ***

Comment 4 awaugama 2017-09-07 19:01:20 UTC
Dup -- QE will decide about automating the original


Note You need to log in before you can comment on or make changes to this bug.