Description of problem:
Test "test_set_get_delete_access_metadata" is failed with timeout error
because the waiter method is waiting for the share resource to be deleted,
however, the share stuck in "error_deleting" status.
Version-Release number of selected component (if applicable):
openstack-manila-12.1.2-0.20220404161416.f5b2cdc.el9ost.noarch
How reproducible:
100%
Steps to Reproduce:
1. stestr run manila_tempest_tests.tests.api.test_access_rules_metadata.AccessRulesMetadataTest
Actual results:
Share stuck in "error deleting" status
Expected results:
Share should be deleted successfully
Additional info:
From manila-share.log
======================
2022-05-02 11:42:40.973 9 ERROR oslo_messaging.rpc.server [req-b2d6f069-58ab-4950-ba97-0655c5e19825 7db6eb0754d543fd96372845c5d4758b 5e8574ca66f44c16b521dac0185f1091 - - -] Exception during message handling: manila.exception.ShareBackendException: json_command failed - prefix=fs subvolume authorize, argdict={'vol_name': 'cephfs', 'sub_name': '859aa3a1-e5af-4eb4-8440-29e263689b55', 'auth_id': 'Joe', 'tenant_id': '5e8574ca66f44c16b521dac0185f1091', 'access_level': 'rw', 'format': 'json'} - exception message: [errno -1] auth ID: Joe is already in use.
2022-05-02 11:42:40.973 9 ERROR oslo_messaging.rpc.server Traceback (most recent call last):
2022-05-02 11:42:40.973 9 ERROR oslo_messaging.rpc.server File "/usr/lib/python3.9/site-packages/manila/share/drivers/cephfs/driver.py", line 193, in rados_command
2022-05-02 11:42:40.973 9 ERROR oslo_messaging.rpc.server raise rados.Error(outs, ret)
2022-05-02 11:42:40.973 9 ERROR oslo_messaging.rpc.server rados.Error: [errno -1] auth ID: Joe is already in use
2022-05-02 11:42:40.973 9 ERROR oslo_messaging.rpc.server
2022-05-02 11:42:40.973 9 ERROR oslo_messaging.rpc.server During handling of the above exception, another exception occurred:
2022-05-02 11:42:40.973 9 ERROR oslo_messaging.rpc.server
2022-05-02 11:42:40.973 9 ERROR oslo_messaging.rpc.server Traceback (most recent call last):
2022-05-02 11:42:40.973 9 ERROR oslo_messaging.rpc.server File "/usr/lib/python3.9/site-packages/oslo_messaging/rpc/server.py", line 165, in _process_incoming
2022-05-02 11:42:40.973 9 ERROR oslo_messaging.rpc.server res = self.dispatcher.dispatch(message)
2022-05-02 11:42:40.973 9 ERROR oslo_messaging.rpc.server File "/usr/lib/python3.9/site-packages/oslo_messaging/rpc/dispatcher.py", line 309, in dispatch
2022-05-02 11:42:40.973 9 ERROR oslo_messaging.rpc.server return self._do_dispatch(endpoint, method, ctxt, args)
2022-05-02 11:42:40.973 9 ERROR oslo_messaging.rpc.server File "/usr/lib/python3.9/site-packages/oslo_messaging/rpc/dispatcher.py", line 229, in _do_dispatch
2022-05-02 11:42:40.973 9 ERROR oslo_messaging.rpc.server result = func(ctxt, **new_args)
2022-05-02 11:42:40.973 9 ERROR oslo_messaging.rpc.server File "/usr/lib/python3.9/site-packages/manila/share/manager.py", line 219, in wrapped
2022-05-02 11:42:40.973 9 ERROR oslo_messaging.rpc.server return f(self, *args, **kwargs)
2022-05-02 11:42:40.973 9 ERROR oslo_messaging.rpc.server File "/usr/lib/python3.9/site-packages/manila/utils.py", line 578, in wrapper
2022-05-02 11:42:40.973 9 ERROR oslo_messaging.rpc.server return func(self, *args, **kwargs)
2022-05-02 11:42:40.973 9 ERROR oslo_messaging.rpc.server File "/usr/lib/python3.9/site-packages/manila/share/manager.py", line 3920, in update_access
2022-05-02 11:42:40.973 9 ERROR oslo_messaging.rpc.server self.update_access_for_instances(context, [share_instance_id],
2022-05-02 11:42:40.973 9 ERROR oslo_messaging.rpc.server File "/usr/lib/python3.9/site-packages/manila/share/manager.py", line 3934, in update_access_for_instances
2022-05-02 11:42:40.973 9 ERROR oslo_messaging.rpc.server self.access_helper.update_access_rules(
2022-05-02 11:42:40.973 9 ERROR oslo_messaging.rpc.server File "/usr/lib/python3.9/site-packages/manila/share/access.py", line 301, in update_access_rules
2022-05-02 11:42:40.973 9 ERROR oslo_messaging.rpc.server self._update_access_rules(context, share_instance_id,
2022-05-02 11:42:40.973 9 ERROR oslo_messaging.rpc.server File "/usr/lib/python3.9/site-packages/manila/share/access.py", line 338, in _update_access_rules
2022-05-02 11:42:40.973 9 ERROR oslo_messaging.rpc.server driver_rule_updates = self._update_rules_through_share_driver(
2022-05-02 11:42:40.973 9 ERROR oslo_messaging.rpc.server File "/usr/lib/python3.9/site-packages/manila/share/access.py", line 403, in _update_rules_through_share_driver
2022-05-02 11:42:40.973 9 ERROR oslo_messaging.rpc.server driver_rule_updates = self.driver.update_access(
2022-05-02 11:42:40.973 9 ERROR oslo_messaging.rpc.server File "/usr/lib/python3.9/site-packages/manila/share/drivers/cephfs/driver.py", line 511, in update_access
2022-05-02 11:42:40.973 9 ERROR oslo_messaging.rpc.server return self.protocol_helper.update_access(
2022-05-02 11:42:40.973 9 ERROR oslo_messaging.rpc.server File "/usr/lib/python3.9/site-packages/manila/share/drivers/cephfs/driver.py", line 896, in update_access
2022-05-02 11:42:40.973 9 ERROR oslo_messaging.rpc.server access_key = self._allow_access(context, share, rule)
2022-05-02 11:42:40.973 9 ERROR oslo_messaging.rpc.server File "/usr/lib/python3.9/site-packages/manila/share/drivers/cephfs/driver.py", line 822, in _allow_access
2022-05-02 11:42:40.973 9 ERROR oslo_messaging.rpc.server auth_result = rados_command(
2022-05-02 11:42:40.973 9 ERROR oslo_messaging.rpc.server File "/usr/lib/python3.9/site-packages/manila/share/drivers/cephfs/driver.py", line 205, in rados_command
2022-05-02 11:42:40.973 9 ERROR oslo_messaging.rpc.server raise exception.ShareBackendException(msg)
2022-05-02 11:42:40.973 9 ERROR oslo_messaging.rpc.server manila.exception.ShareBackendException: json_command failed - prefix=fs subvolume authorize, argdict={'vol_name': 'cephfs', 'sub_name': '859aa3a1-e5af-4eb4-8440-29e263689b55', 'auth_id': 'Joe', 'tenant_id': '5e8574ca66f44c16b521dac0185f1091', 'access_level': 'rw', 'format': 'json'} - exception message: [errno -1] auth ID: Joe is already in use.
2022-05-02 11:42:40.973 9 ERROR oslo_messaging.rpc.server
Fix proposed to branch: master /review. opendev. org/c/openstack /manila/ +/840430
Review: https:/