test_volume_from_snapshot does not work with Dell PowerFlex driver

Bug #1949927 reported by Sam Wan
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
tempest
Fix Released
Undecided
Sam Wan

Bug Description

PowerFlex/VxFlex OS requires volumes to be sized in multiples of 8GB.
Even if 1GB is given when creating a volume, a 8GB volume will be created if powerflex_round_volume_capacity = True, otherwise the volume creation will fail.
[https://docs.openstack.org/cinder/latest/configuration/block-storage/drivers/dell-emc-powerflex-driver.html]

The test case test_volume_from_snapshot has extra_size hardcoded to 1 and it expects the returned size increased by 1GB. However this does not work with PowerFlex driver due to the above reason, so error occurs.
==================================
{0} tempest.api.volume.test_volumes_snapshots.VolumesSnapshotTestJSON.test_volume_from_snapshot [4.715851s] ... FAILED

Captured traceback:
~~~~~~~~~~~~~~~~~~~
    Traceback (most recent call last):

      File "/opt/stack/new/tempest/tempest/api/volume/test_volumes_snapshots.py", line 170, in test_volume_from_snapshot
    self._create_volume_from_snapshot(extra_size=1)

      File "/opt/stack/new/tempest/tempest/api/volume/test_volumes_snapshots.py", line 165, in _create_volume_from_snapshot
    self.assertEqual(volume['size'], size)

      File "/usr/local/lib/python3.8/dist-packages/testtools/testcase.py", line 393, in assertEqual
    self.assertThat(observed, matcher, message)

      File "/usr/local/lib/python3.8/dist-packages/testtools/testcase.py", line 480, in assertThat
    raise mismatch_error

    testtools.matchers._impl.MismatchError: 16 != 9
===================================

extra_size should not be hardcoded to 1, instead it should be set to CONF.volume.volume_size, for PowerFlex, it's 8.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to tempest (master)

Fix proposed to branch: master
Review: https://review.opendev.org/c/openstack/tempest/+/816779

Changed in tempest:
status: New → In Progress
Sam Wan (sam-wan)
Changed in tempest:
assignee: nobody → Sam Wan (sam-wan)
Revision history for this message
Martin Kopec (mkopec) wrote :

Let's use CONF.volume.volume_size_extend option in the test, the opt was introduced by the following commit - seems like we forgot to edit this test back then:

https://opendev.org/openstack/tempest/commit/37c4bd3023110f2a00e55439e2086d393b44a974

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to tempest (master)

Reviewed: https://review.opendev.org/c/openstack/tempest/+/816779
Committed: https://opendev.org/openstack/tempest/commit/0bacf984313a337cdfce49d61949e585aa134e19
Submitter: "Zuul (22348)"
Branch: master

commit 0bacf984313a337cdfce49d61949e585aa134e19
Author: Sam Wan <email address hidden>
Date: Fri Nov 5 10:07:42 2021 +0800

    Change extra_size from hardcoded 1 to CONF.volume.volume_size_extend

    test_volume_from_snapshot has extra_size hardcoded to 1 and it expects
    the returned size increased by 1GB. This does not work with PowerFlex
    cinder driver because PowerFlex/VxFlex OS requires volumes to be sized
    in multiples of 8GB. Even if 1GB is given, 8GB will be actually used
    when powerflex_round_volume_capacity = True.

    Closes-Bug: #1949927
    Change-Id: I04c3d6145fbc201355d38a7a058a37791227f733

Changed in tempest:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/tempest 30.0.0

This issue was fixed in the openstack/tempest 30.0.0 release.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.