Can't use manila_share_networks(share_networks) context in ManilaShares.set_and_delete_metadata test

Bug #2040486 reported by taeseop kim
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Rally
Fix Released
Undecided
Unassigned

Bug Description

In order to use "share_networks" context, I wrote as follows. However when the task worked, it createsd new share network.
https://github.com/openstack/rally-openstack/blob/master/rally_openstack/task/contexts/manila/manila_share_networks.py#L185
I didn't find setting "existing_users". So I could not call "self._setup_for_existing_users()" function.

deployment:
-----------
{
    "openstack": {
        "admin": {
            "password": "admin",
            "project_domain_name": "Default",
            "project_name": "admin",
            "user_domain_name": "Default",
            "username": "admin"
        },
        "api_info": {
            "keystone": {
                "service_type": "identityv3",
                "version": 3
            }
        },
        "auth_url": "http://10.11.22.100/identity",
        "endpoint_type": null,
        "https_cacert": "",
        "https_cert": "",
        "https_insecure": false,
        "https_key": "",
        "profiler_conn_str": null,
        "profiler_hmac_key": null,
        "region_name": "RegionOne",
        "users": [
            {
                "password": "rally",
                "tenant_name": "rally-project1",
                "username": "rally-user1"
            },
            {
                "password": "rally",
                "tenant_name": "rally-project1",
                "username": "rally-user2"
            }
        ]
    }
}
task:
-------
{
  ManilaShares.set_and_delete_metadata: [
    {
      "args": {
        "sets": 1,
        "set_size": 3,
        "delete_size": 3,
        "key_min_length": 1,
        "key_max_length": 256,
        "value_min_length": 1,
        "value_max_length": 1024
      },
      "runner": {
        "type": "constant",
        "times": 1,
        "concurrency": 1
      },
      "context": {
        "quotas": {
          "manila": {
            "shares": -1,
            "gigabytes": -1,
            "share_networks": -1
          }
        },
        "manila_share_networks": {
          "use_share_networks": true,
          "share_networks": {
            "rally-project1": [
              "share-network1"
            ]
          }
        },
        "manila_shares": {
          "shares_per_tenant": 1,
          "share_proto": "NFS",
          "size": 1,
          "share_type": "default"
        }
      },
      "sla": {
        "failure_rate": {
          "max": 0
        }
      },
      "hooks": []
    }
  ]
}

result:
-------
2023-10-25 12:10:01.820 893510 ERROR rally.task.engine [-] Unexpected exception during the workload execution: rally.exceptions.GetResourceErrorStatus: Resource <Share: 7932b99e-f211-4961-9892-1fcafd94a606> has ERROR status.
 Fault: n/a
2023-10-25 12:10:01.820 893510 ERROR rally.task.engine Traceback (most recent call last):
2023-10-25 12:10:01.820 893510 ERROR rally.task.engine File "/opt/stack/rally/rally/task/engine.py", line 532, in _run_workload
2023-10-25 12:10:01.820 893510 ERROR rally.task.engine with ctx_manager:
2023-10-25 12:10:01.820 893510 ERROR rally.task.engine File "/opt/stack/rally/rally/task/context.py", line 308, in __enter__
2023-10-25 12:10:01.820 893510 ERROR rally.task.engine self.setup()
2023-10-25 12:10:01.820 893510 ERROR rally.task.engine File "/opt/stack/rally/rally/task/context.py", line 253, in setup
2023-10-25 12:10:01.820 893510 ERROR rally.task.engine ctx.setup()
2023-10-25 12:10:01.820 893510 ERROR rally.task.engine File "/opt/stack/rally-openstack/rally_openstack/task/contexts/manila/manila_shares.py", line 86, in setup
2023-10-25 12:10:01.820 893510 ERROR rally.task.engine self._create_shares(
2023-10-25 12:10:01.820 893510 ERROR rally.task.engine File "/opt/stack/rally-openstack/rally_openstack/task/contexts/manila/manila_shares.py", line 76, in _create_shares
2023-10-25 12:10:01.820 893510 ERROR rally.task.engine share = manila_scenario._create_share(**kwargs)
2023-10-25 12:10:01.820 893510 ERROR rally.task.engine File "/opt/stack/rally/rally/task/atomic.py", line 91, in func_atomic_actions
2023-10-25 12:10:01.820 893510 ERROR rally.task.engine f = func(self, *args, **kwargs)
2023-10-25 12:10:01.820 893510 ERROR rally.task.engine File "/opt/stack/rally-openstack/rally_openstack/task/scenarios/manila/utils.py", line 64, in _create_share
2023-10-25 12:10:01.820 893510 ERROR rally.task.engine share = utils.wait_for_status(
2023-10-25 12:10:01.820 893510 ERROR rally.task.engine File "/opt/stack/rally/rally/task/utils.py", line 213, in wait_for_status
2023-10-25 12:10:01.820 893510 ERROR rally.task.engine resource = update_resource(resource)
2023-10-25 12:10:01.820 893510 ERROR rally.task.engine File "/opt/stack/rally/rally/task/utils.py", line 86, in _get_from_manager
2023-10-25 12:10:01.820 893510 ERROR rally.task.engine raise exceptions.GetResourceErrorStatus(
2023-10-25 12:10:01.820 893510 ERROR rally.task.engine rally.exceptions.GetResourceErrorStatus: Resource <Share: 7932b99e-f211-4961-9892-1fcafd94a606> has ERROR status.
2023-10-25 12:10:01.820 893510 ERROR rally.task.engine Fault: n/a

openstack cli:
-------
stack@ubuntu:~/devstack$ openstack share network list
+--------------------------------------+---------------------------+
| ID | Name |
+--------------------------------------+---------------------------+
| 1dba11b2-f5e2-43c5-a722-5571585c53e4 | share-network1 |
| 5499f882-5b44-4cc0-9ef9-7a443763742d | s_rally_548319ad_Vy0dhEr6 |
+--------------------------------------+---------------------------+
stack@ubuntu:~/devstack$ openstack share show b041cab5-b394-41a8-8866-b04702cd68a8
+---------------------------------------+--------------------------------------+
| Field | Value |
+---------------------------------------+--------------------------------------+
| access_rules_status | active |
| availability_zone | nova |
| create_share_from_snapshot_support | False |
| created_at | 2023-10-25T12:12:38.196051 |
| description | None |
| export_locations | |
| has_replicas | False |
| host | ubuntu@generic2#GENERIC2 |
| id | b041cab5-b394-41a8-8866-b04702cd68a8 |
| is_public | False |
| is_soft_deleted | False |
| mount_snapshot_support | False |
| name | s_rally_548319ad_JgFx03qS |
| progress | None |
| project_id | 9f28b74d540746b4ba496f17e0b7ec40 |
| properties | |
| replication_type | None |
| revert_to_snapshot_support | False |
| scheduled_to_be_deleted_at | None |
| share_group_id | None |
| share_network_id | 5499f882-5b44-4cc0-9ef9-7a443763742d |
| share_proto | NFS |
| share_server_id | 4999d68f-9c2c-47b5-994b-79657c9c4932 |
| share_type | ed8a4673-c886-4d1e-966c-e767ed64b958 |
| share_type_name | default |
| size | 1 |
| snapshot_id | None |
| snapshot_support | False |
| source_share_group_snapshot_member_id | None |
| status | error |
| task_state | None |
| user_id | 828d9b0d5fd54ee59e04a72dba56926d |
| volume_type | default |
+---------------------------------------+--------------------------------------+

I checked this kind of bug report https://bugs.launchpad.net/rally/+bug/1587168. But I couldn't solve this problem.

taeseop kim (taeseop)
description: updated
taeseop kim (taeseop)
description: updated
description: updated
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to rally-openstack (master)
Changed in rally:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to rally-openstack (master)

Reviewed: https://review.opendev.org/c/openstack/rally-openstack/+/899547
Committed: https://opendev.org/openstack/rally-openstack/commit/78e819098683d83306b578b53596d865a2406840
Submitter: "Zuul (22348)"
Branch: master

commit 78e819098683d83306b578b53596d865a2406840
Author: kimtaeseop <email address hidden>
Date: Mon Oct 30 11:41:53 2023 +0900

    Set "existing_users" context for manila rally test

    When the manila rally tests work, they can't use "share_networks" context.
    Nowhere "existing_users" is set, the function as follows can't be called.
    https://github.com/openstack/rally-openstack/blob/master/rally_openstack/task/contexts/manila/manila_share_networks.py#L185
    If rally use existing_users, set "existing_users" context as well.

    Closes-Bug: #2040486
    Change-Id: I9af9198d7202f7f674790d2b88ab3c8067d6cb35

Changed in rally:
status: In Progress → Fix Released
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.