Share network create and update test is failing

Bug #1849377 reported by Carlos Eduardo
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
python-manilaclient
Fix Released
High
Douglas Viroel

Bug Description

Bug description:
After a bugfix for share networks update got merged, two python-manilaclient functional tests stopped working. The patch that fixed the issue in Manila API also added a validation. Now, due to the validation, the API do not allow the user to update a share network if it will remain only with a `neutron_net_id` or a `neutron_subnet_id`. After the update operation, both fields must be filled or empty.
The tests that creates and update a share network were fitting into the bug that the patch just fixed. When the bug got fixed, the tests stopped working.

How to reproduce:
Run the python-manilaclient functional tests with the following regex:
- manilaclient.tests.functional.test_share_networks.ShareNetworksReadWriteTest.test_create_update_share_network_6
- manilaclient.tests.functional.test_share_networks.ShareNetworksReadWriteTest.test_create_update_share_network_7

The stacktrace:
Captured traceback:
~~~~~~~~~~~~~~~~~~~
Traceback (most recent call last):'
  File "/opt/stack/new/python-manilaclient/.tox/functional/lib/python3.6/site-packages/ddt.py", line 145, in wrapper'
    return func(self, *args, **kwargs)'
  File "/opt/stack/new/python-manilaclient/manilaclient/tests/functional/test_share_networks.py", line 141, in test_create_update_share_network'
    update = self.admin_client.update_share_network(sn['id'], **net_data)"
  File "/opt/stack/new/python-manilaclient/manilaclient/tests/functional/client.py", line 47, in wrapped_func'
    return f(self, *args, **kwargs)'
  File "/opt/stack/new/python-manilaclient/manilaclient/tests/functional/client.py", line 541, in update_share_network'
    microversion=microversion)'
  File "/opt/stack/new/python-manilaclient/manilaclient/tests/functional/client.py", line 117, in manila'
    'manila', action, flags, params, fail_ok, merge_stderr)"
  File "/opt/stack/new/python-manilaclient/.tox/functional/lib/python3.6/site-packages/tempest/lib/cli/base.py", line 401, in cmd_with_auth'
    self.cli_dir, prefix=self.prefix)'
  File "/opt/stack/new/python-manilaclient/.tox/functional/lib/python3.6/site-packages/tempest/lib/cli/base.py", line 69, in execute'
    result_err)'
tempest.lib.exceptions.CommandFailed: Command '['/opt/stack/new/python-manilaclient/.tox/functional/bin/manila', '--os-username', 'admin', '--os-project-name', 'demo', '--os-password', 'secretadmin', '--os-auth-url', 'http://162.242.223.35/identity', '--os-user-domain-id', 'default', '--os-project-domain-id', 'default', '--endpoint-type', 'publicURL', '--os-share-api-version', '2.51', 'share-network-update', '9895b065-067c-43ba-94d7-602875652c46', '--neutron_net_id=']' returned non-zero exit status 1."
stdout:'
b''"
stderr:'
"ERROR: To update the share network 9895b065-067c-43ba-94d7-602875652c46 you need to specify both \'neutron_net_id\' and \'neutron_subnet_id\'. (HTTP 400) (Request-ID: req-499687f2-7c12-4935-8d13-a1a764fd02cc)\\n"'

Changed in python-manilaclient:
status: New → Confirmed
importance: Undecided → High
assignee: nobody → Carlos Eduardo (silvacarlose)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to python-manilaclient (master)

Fix proposed to branch: master
Review: https://review.opendev.org/690411

Changed in python-manilaclient:
status: Confirmed → In Progress
Changed in python-manilaclient:
milestone: none → ussuri-1
Changed in python-manilaclient:
assignee: Carlos Eduardo (silvacarlose) → Douglas Viroel (dviroel)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to python-manilaclient (master)

Reviewed: https://review.opendev.org/691116
Committed: https://git.openstack.org/cgit/openstack/python-manilaclient/commit/?id=0ca91287acffece4f78451e160fafa040a988f5a
Submitter: Zuul
Branch: master

commit 0ca91287acffece4f78451e160fafa040a988f5a
Author: Douglas Viroel <email address hidden>
Date: Thu Oct 24 17:48:22 2019 -0300

    Fix update share network tests and skip exception issue

    After fixing a bug that was allowing share network update when it
    shouldn't, the test that validates the share network creation and
    update started failing. An additional validation was introduced and
    it caused the new bug. This patch fixes the test and make it work
    properly.
    In addition this patch fixes test classes that are raising a skip
    exception inside the setUpClass function and failing due to testtool
    issue #272.

    Closes-Bug: #1849728
    Closes-Bug: #1849377
    Related-Bug: #1846836
    Co-Author: Carlos Eduardo <email address hidden>
    Change-Id: I5b27ee4a9e844ea48dc9324bcf38f5767223717f

Changed in python-manilaclient:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on python-manilaclient (master)

Change abandoned by Goutham Pacha Ravi (<email address hidden>) on branch: master
Review: https://review.opendev.org/690411
Reason: Thank you for merging this fix with https://review.opendev.org/#/c/691116/

Abandoning this review since it's no longer required

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to python-manilaclient (stable/train)

Fix proposed to branch: stable/train
Review: https://review.opendev.org/692186

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to python-manilaclient (stable/train)

Reviewed: https://review.opendev.org/692186
Committed: https://git.openstack.org/cgit/openstack/python-manilaclient/commit/?id=454ab514568d0943a685e7dd31e14dfed1e04925
Submitter: Zuul
Branch: stable/train

commit 454ab514568d0943a685e7dd31e14dfed1e04925
Author: Douglas Viroel <email address hidden>
Date: Thu Oct 24 17:48:22 2019 -0300

    Fix update share network tests and skip exception issue

    After fixing a bug that was allowing share network update when it
    shouldn't, the test that validates the share network creation and
    update started failing. An additional validation was introduced and
    it caused the new bug. This patch fixes the test and make it work
    properly.
    In addition this patch fixes test classes that are raising a skip
    exception inside the setUpClass function and failing due to testtool
    issue #272.

    Closes-Bug: #1849728
    Closes-Bug: #1849377
    Related-Bug: #1846836
    Co-Author: Carlos Eduardo <email address hidden>
    Change-Id: I5b27ee4a9e844ea48dc9324bcf38f5767223717f
    (cherry picked from commit 0ca91287acffece4f78451e160fafa040a988f5a)

tags: added: in-stable-train
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/python-manilaclient 2.0.0

This issue was fixed in the openstack/python-manilaclient 2.0.0 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/python-manilaclient train-eol

This issue was fixed in the openstack/python-manilaclient train-eol 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.