[Bug 1952763] Re: [SRU] manilaclient.common.apiclient.exceptions.Forbidden: Access was denied to this resource. (HTTP 403)

Corey Bryant 1952763 at bugs.launchpad.net
Wed Mar 16 13:01:53 UTC 2022


** Description changed:

  [Description]
  
  2021-11-29 19:26:53.581540 | focal-medium |   File "/home/ubuntu/src/review.opendev.org/openstack/charm-manila-ganesha/build/builds/manila-ganesha/.tox/func-target/lib/python3.8/site-packages/zaza/openstack/charm_tests/manila_ganesha/setup.py", line 40, in setup_ganesha_share_type
  2021-11-29 19:26:53.581579 | focal-medium |     manila_client.share_types.create
  
  results in:
  manilaclient.common.apiclient.exceptions.Forbidden: Access was denied to this resource. (HTTP 403)
  
  This occurs on wallaby and above as seen here:
  https://review.opendev.org/c/openstack/charm-manila-ganesha/+/816032
  
  2021-11-29 19:26:53.195961 | focal-medium | 2021-11-29 19:26:53 [ERROR] {'default_alias': 'zaza-6aadc5ce9f9b'}
  2021-11-29 19:26:53.196094 | focal-medium | 2021-11-29 19:26:53 [ERROR] Model default_alias (zaza-6aadc5ce9f9b)
  2021-11-29 19:26:53.581038 | focal-medium | Traceback (most recent call last):
  2021-11-29 19:26:53.581121 | focal-medium |   File "/home/ubuntu/src/review.opendev.org/openstack/charm-manila-ganesha/build/builds/manila-ganesha/.tox/func-target/bin/functest-run-suite", line 8, in <module>
  2021-11-29 19:26:53.581157 | focal-medium |     sys.exit(main())
  2021-11-29 19:26:53.581206 | focal-medium |   File "/home/ubuntu/src/review.opendev.org/openstack/charm-manila-ganesha/build/builds/manila-ganesha/.tox/func-target/lib/python3.8/site-packages/zaza/charm_lifecycle/func_test_runner.py", line 374, in main
  2021-11-29 19:26:53.581248 | focal-medium |     func_test_runner(
  2021-11-29 19:26:53.581276 | focal-medium |   File "/home/ubuntu/src/review.opendev.org/openstack/charm-manila-ganesha/build/builds/manila-ganesha/.tox/func-target/lib/python3.8/site-packages/zaza/charm_lifecycle/func_test_runner.py", line 287, in func_test_runner
  2021-11-29 19:26:53.581312 | focal-medium |     run_env_deployment(env_deployment, keep_model=preserve_model,
  2021-11-29 19:26:53.581332 | focal-medium |   File "/home/ubuntu/src/review.opendev.org/openstack/charm-manila-ganesha/build/builds/manila-ganesha/.tox/func-target/lib/python3.8/site-packages/zaza/charm_lifecycle/func_test_runner.py", line 155, in run_env_deployment
  2021-11-29 19:26:53.581347 | focal-medium |     configure.configure(
  2021-11-29 19:26:53.581385 | focal-medium |   File "/home/ubuntu/src/review.opendev.org/openstack/charm-manila-ganesha/build/builds/manila-ganesha/.tox/func-target/lib/python3.8/site-packages/zaza/charm_lifecycle/configure.py", line 58, in configure
  2021-11-29 19:26:53.581426 | focal-medium |     run_configure_list(functions)
  2021-11-29 19:26:53.581446 | focal-medium |   File "/usr/lib/python3.8/contextlib.py", line 75, in inner
  2021-11-29 19:26:53.581460 | focal-medium |     return func(*args, **kwds)
  2021-11-29 19:26:53.581486 | focal-medium |   File "/home/ubuntu/src/review.opendev.org/openstack/charm-manila-ganesha/build/builds/manila-ganesha/.tox/func-target/lib/python3.8/site-packages/zaza/charm_lifecycle/configure.py", line 44, in run_configure_list
  2021-11-29 19:26:53.581521 | focal-medium |     utils.get_class(func)()
  2021-11-29 19:26:53.581540 | focal-medium |   File "/home/ubuntu/src/review.opendev.org/openstack/charm-manila-ganesha/build/builds/manila-ganesha/.tox/func-target/lib/python3.8/site-packages/zaza/openstack/charm_tests/manila_ganesha/setup.py", line 40, in setup_ganesha_share_type
  2021-11-29 19:26:53.581579 | focal-medium |     manila_client.share_types.create(
  2021-11-29 19:26:53.581597 | focal-medium |   File "/home/ubuntu/src/review.opendev.org/openstack/charm-manila-ganesha/build/builds/manila-ganesha/.tox/func-target/lib/python3.8/site-packages/manilaclient/api_versions.py", line 399, in substitution
  2021-11-29 19:26:53.581623 | focal-medium |     return method.func(obj, *args, **kwargs)
  2021-11-29 19:26:53.581639 | focal-medium |   File "/home/ubuntu/src/review.opendev.org/openstack/charm-manila-ganesha/build/builds/manila-ganesha/.tox/func-target/lib/python3.8/site-packages/manilaclient/v2/share_types.py", line 207, in create
  2021-11-29 19:26:53.581653 | focal-medium |     return self._do_create(
  2021-11-29 19:26:53.581667 | focal-medium |   File "/home/ubuntu/src/review.opendev.org/openstack/charm-manila-ganesha/build/builds/manila-ganesha/.tox/func-target/lib/python3.8/site-packages/manilaclient/v2/share_types.py", line 169, in _do_create
  2021-11-29 19:26:53.581681 | focal-medium |     return self._create("/types", body, "share_type")
  2021-11-29 19:26:53.581695 | focal-medium |   File "/home/ubuntu/src/review.opendev.org/openstack/charm-manila-ganesha/build/builds/manila-ganesha/.tox/func-target/lib/python3.8/site-packages/manilaclient/base.py", line 161, in _create
  2021-11-29 19:26:53.581709 | focal-medium |     resp, body = self.api.client.post(url, body=body)
  2021-11-29 19:26:53.581722 | focal-medium |   File "/home/ubuntu/src/review.opendev.org/openstack/charm-manila-ganesha/build/builds/manila-ganesha/.tox/func-target/lib/python3.8/site-packages/manilaclient/common/httpclient.py", line 177, in post
  2021-11-29 19:26:53.581736 | focal-medium |     return self._cs_request(url, 'POST', **kwargs)
  2021-11-29 19:26:53.581772 | focal-medium |   File "/home/ubuntu/src/review.opendev.org/openstack/charm-manila-ganesha/build/builds/manila-ganesha/.tox/func-target/lib/python3.8/site-packages/manilaclient/common/httpclient.py", line 133, in _cs_request
  2021-11-29 19:26:53.581795 | focal-medium |     return self._cs_request_with_retries(
  2021-11-29 19:26:53.581833 | focal-medium |   File "/home/ubuntu/src/review.opendev.org/openstack/charm-manila-ganesha/build/builds/manila-ganesha/.tox/func-target/lib/python3.8/site-packages/manilaclient/common/httpclient.py", line 150, in _cs_request_with_retries
  2021-11-29 19:26:53.581865 | focal-medium |     resp, body = self.request(url, method, **kwargs)
  2021-11-29 19:26:53.581890 | focal-medium |   File "/home/ubuntu/src/review.opendev.org/openstack/charm-manila-ganesha/build/builds/manila-ganesha/.tox/func-target/lib/python3.8/site-packages/manilaclient/common/httpclient.py", line 128, in request
  2021-11-29 19:26:53.581922 | focal-medium |     raise exceptions.from_response(resp, method, url)
  2021-11-29 19:26:53.581942 | focal-medium | manilaclient.common.apiclient.exceptions.Forbidden: Access was denied to this resource. (HTTP 403) (Request-ID: req-a4afca0f-3696-488f-be07-4fcb5f1742c6)
  
  For the manila package, we are still installing an old policy.json file.
- Manila moved away from using a policy.json file for RBAC in favor of using a policy.yaml file in the wallaby release. In fact, this policy.yaml file
+ Manila moved away from using a policy.json file for RBAC in favor of using a policy.yaml file in the wallaby release [1]. In fact, this policy.yaml file
  is only used to override the default policy, which is in the manila code base itself. Therefore the package doesn't need to install any policy files.
+ [1] https://opendev.org/openstack/manila/src/branch/master/releasenotes/notes/deprecate-json-formatted-policy-file-fd0345f215e6ccd5.yaml
  
  [Test Case]
  The manila-ganesha charm tests will be run as they are currently hitting this failure. The charm tests create a manila share, create 2 openstack instances, mount the share to those instances and tests writing/reading the share.
  
  https://opendev.org/openstack/charm-manila-ganesha/src/branch/master/src/tests/tests.yaml
  https://github.com/openstack-charmers/zaza-openstack-tests/blob/master/zaza/openstack/charm_tests/manila_ganesha/tests.py
  https://github.com/openstack-charmers/zaza-openstack-tests/blob/master/zaza/openstack/charm_tests/manila/tests.py
  
  [Regression Potential]
  The default package install is broken with the policy.json that we are installing. Worth noting, the policy.json file was deprecated in the wallaby release and the changes in this SRU are limited to the wallaby+1 release and up (ie. xena+).
  
  The regression potential here is that an upgrade to this new package
  version will move the deprecated /etc/manila/policy.json
  /etc/manila/disabled.policy.json.old in it's postinst script. Therefore
  the deprecated policy.json file will no longer be in force, but will
  still be available. The policy that will be in force is the default
  policy that is coded into the manila code base.
  
  [Discussion]
  The manila-ganesha charm also requires a change to add ceph mgr capabilities for the manila cephfs driver to allow it to run rados commands.

-- 
You received this bug notification because you are a member of Ubuntu
OpenStack, which is subscribed to Ubuntu Cloud Archive.
https://bugs.launchpad.net/bugs/1952763

Title:
  [SRU] manilaclient.common.apiclient.exceptions.Forbidden: Access was
  denied to this resource. (HTTP 403)

Status in OpenStack Manila Charm:
  In Progress
Status in OpenStack Manila-Ganesha Charm:
  In Progress
Status in OpenStack Manila NetApp Charm:
  New
Status in Ubuntu Cloud Archive:
  Fix Released
Status in Ubuntu Cloud Archive xena series:
  Triaged
Status in Ubuntu Cloud Archive yoga series:
  Fix Released
Status in manila package in Ubuntu:
  Fix Released
Status in manila source package in Impish:
  Triaged

Bug description:
  [Description]

  2021-11-29 19:26:53.581540 | focal-medium |   File "/home/ubuntu/src/review.opendev.org/openstack/charm-manila-ganesha/build/builds/manila-ganesha/.tox/func-target/lib/python3.8/site-packages/zaza/openstack/charm_tests/manila_ganesha/setup.py", line 40, in setup_ganesha_share_type
  2021-11-29 19:26:53.581579 | focal-medium |     manila_client.share_types.create

  results in:
  manilaclient.common.apiclient.exceptions.Forbidden: Access was denied to this resource. (HTTP 403)

  This occurs on wallaby and above as seen here:
  https://review.opendev.org/c/openstack/charm-manila-ganesha/+/816032

  2021-11-29 19:26:53.195961 | focal-medium | 2021-11-29 19:26:53 [ERROR] {'default_alias': 'zaza-6aadc5ce9f9b'}
  2021-11-29 19:26:53.196094 | focal-medium | 2021-11-29 19:26:53 [ERROR] Model default_alias (zaza-6aadc5ce9f9b)
  2021-11-29 19:26:53.581038 | focal-medium | Traceback (most recent call last):
  2021-11-29 19:26:53.581121 | focal-medium |   File "/home/ubuntu/src/review.opendev.org/openstack/charm-manila-ganesha/build/builds/manila-ganesha/.tox/func-target/bin/functest-run-suite", line 8, in <module>
  2021-11-29 19:26:53.581157 | focal-medium |     sys.exit(main())
  2021-11-29 19:26:53.581206 | focal-medium |   File "/home/ubuntu/src/review.opendev.org/openstack/charm-manila-ganesha/build/builds/manila-ganesha/.tox/func-target/lib/python3.8/site-packages/zaza/charm_lifecycle/func_test_runner.py", line 374, in main
  2021-11-29 19:26:53.581248 | focal-medium |     func_test_runner(
  2021-11-29 19:26:53.581276 | focal-medium |   File "/home/ubuntu/src/review.opendev.org/openstack/charm-manila-ganesha/build/builds/manila-ganesha/.tox/func-target/lib/python3.8/site-packages/zaza/charm_lifecycle/func_test_runner.py", line 287, in func_test_runner
  2021-11-29 19:26:53.581312 | focal-medium |     run_env_deployment(env_deployment, keep_model=preserve_model,
  2021-11-29 19:26:53.581332 | focal-medium |   File "/home/ubuntu/src/review.opendev.org/openstack/charm-manila-ganesha/build/builds/manila-ganesha/.tox/func-target/lib/python3.8/site-packages/zaza/charm_lifecycle/func_test_runner.py", line 155, in run_env_deployment
  2021-11-29 19:26:53.581347 | focal-medium |     configure.configure(
  2021-11-29 19:26:53.581385 | focal-medium |   File "/home/ubuntu/src/review.opendev.org/openstack/charm-manila-ganesha/build/builds/manila-ganesha/.tox/func-target/lib/python3.8/site-packages/zaza/charm_lifecycle/configure.py", line 58, in configure
  2021-11-29 19:26:53.581426 | focal-medium |     run_configure_list(functions)
  2021-11-29 19:26:53.581446 | focal-medium |   File "/usr/lib/python3.8/contextlib.py", line 75, in inner
  2021-11-29 19:26:53.581460 | focal-medium |     return func(*args, **kwds)
  2021-11-29 19:26:53.581486 | focal-medium |   File "/home/ubuntu/src/review.opendev.org/openstack/charm-manila-ganesha/build/builds/manila-ganesha/.tox/func-target/lib/python3.8/site-packages/zaza/charm_lifecycle/configure.py", line 44, in run_configure_list
  2021-11-29 19:26:53.581521 | focal-medium |     utils.get_class(func)()
  2021-11-29 19:26:53.581540 | focal-medium |   File "/home/ubuntu/src/review.opendev.org/openstack/charm-manila-ganesha/build/builds/manila-ganesha/.tox/func-target/lib/python3.8/site-packages/zaza/openstack/charm_tests/manila_ganesha/setup.py", line 40, in setup_ganesha_share_type
  2021-11-29 19:26:53.581579 | focal-medium |     manila_client.share_types.create(
  2021-11-29 19:26:53.581597 | focal-medium |   File "/home/ubuntu/src/review.opendev.org/openstack/charm-manila-ganesha/build/builds/manila-ganesha/.tox/func-target/lib/python3.8/site-packages/manilaclient/api_versions.py", line 399, in substitution
  2021-11-29 19:26:53.581623 | focal-medium |     return method.func(obj, *args, **kwargs)
  2021-11-29 19:26:53.581639 | focal-medium |   File "/home/ubuntu/src/review.opendev.org/openstack/charm-manila-ganesha/build/builds/manila-ganesha/.tox/func-target/lib/python3.8/site-packages/manilaclient/v2/share_types.py", line 207, in create
  2021-11-29 19:26:53.581653 | focal-medium |     return self._do_create(
  2021-11-29 19:26:53.581667 | focal-medium |   File "/home/ubuntu/src/review.opendev.org/openstack/charm-manila-ganesha/build/builds/manila-ganesha/.tox/func-target/lib/python3.8/site-packages/manilaclient/v2/share_types.py", line 169, in _do_create
  2021-11-29 19:26:53.581681 | focal-medium |     return self._create("/types", body, "share_type")
  2021-11-29 19:26:53.581695 | focal-medium |   File "/home/ubuntu/src/review.opendev.org/openstack/charm-manila-ganesha/build/builds/manila-ganesha/.tox/func-target/lib/python3.8/site-packages/manilaclient/base.py", line 161, in _create
  2021-11-29 19:26:53.581709 | focal-medium |     resp, body = self.api.client.post(url, body=body)
  2021-11-29 19:26:53.581722 | focal-medium |   File "/home/ubuntu/src/review.opendev.org/openstack/charm-manila-ganesha/build/builds/manila-ganesha/.tox/func-target/lib/python3.8/site-packages/manilaclient/common/httpclient.py", line 177, in post
  2021-11-29 19:26:53.581736 | focal-medium |     return self._cs_request(url, 'POST', **kwargs)
  2021-11-29 19:26:53.581772 | focal-medium |   File "/home/ubuntu/src/review.opendev.org/openstack/charm-manila-ganesha/build/builds/manila-ganesha/.tox/func-target/lib/python3.8/site-packages/manilaclient/common/httpclient.py", line 133, in _cs_request
  2021-11-29 19:26:53.581795 | focal-medium |     return self._cs_request_with_retries(
  2021-11-29 19:26:53.581833 | focal-medium |   File "/home/ubuntu/src/review.opendev.org/openstack/charm-manila-ganesha/build/builds/manila-ganesha/.tox/func-target/lib/python3.8/site-packages/manilaclient/common/httpclient.py", line 150, in _cs_request_with_retries
  2021-11-29 19:26:53.581865 | focal-medium |     resp, body = self.request(url, method, **kwargs)
  2021-11-29 19:26:53.581890 | focal-medium |   File "/home/ubuntu/src/review.opendev.org/openstack/charm-manila-ganesha/build/builds/manila-ganesha/.tox/func-target/lib/python3.8/site-packages/manilaclient/common/httpclient.py", line 128, in request
  2021-11-29 19:26:53.581922 | focal-medium |     raise exceptions.from_response(resp, method, url)
  2021-11-29 19:26:53.581942 | focal-medium | manilaclient.common.apiclient.exceptions.Forbidden: Access was denied to this resource. (HTTP 403) (Request-ID: req-a4afca0f-3696-488f-be07-4fcb5f1742c6)

  For the manila package, we are still installing an old policy.json file.
  Manila moved away from using a policy.json file for RBAC in favor of using a policy.yaml file in the wallaby release [1]. In fact, this policy.yaml file
  is only used to override the default policy, which is in the manila code base itself. Therefore the package doesn't need to install any policy files.
  [1] https://opendev.org/openstack/manila/src/branch/master/releasenotes/notes/deprecate-json-formatted-policy-file-fd0345f215e6ccd5.yaml

  [Test Case]
  The manila-ganesha charm tests will be run as they are currently hitting this failure. The charm tests create a manila share, create 2 openstack instances, mount the share to those instances and tests writing/reading the share.

  https://opendev.org/openstack/charm-manila-ganesha/src/branch/master/src/tests/tests.yaml
  https://github.com/openstack-charmers/zaza-openstack-tests/blob/master/zaza/openstack/charm_tests/manila_ganesha/tests.py
  https://github.com/openstack-charmers/zaza-openstack-tests/blob/master/zaza/openstack/charm_tests/manila/tests.py

  [Regression Potential]
  The default package install is broken with the policy.json that we are installing. Worth noting, the policy.json file was deprecated in the wallaby release and the changes in this SRU are limited to the wallaby+1 release and up (ie. xena+).

  The regression potential here is that an upgrade to this new package
  version will move the deprecated /etc/manila/policy.json
  /etc/manila/disabled.policy.json.old in it's postinst script.
  Therefore the deprecated policy.json file will no longer be in force,
  but will still be available. The policy that will be in force is the
  default policy that is coded into the manila code base.

  [Discussion]
  The manila-ganesha charm also requires a change to add ceph mgr capabilities for the manila cephfs driver to allow it to run rados commands.

To manage notifications about this bug go to:
https://bugs.launchpad.net/charm-manila/+bug/1952763/+subscriptions




More information about the Ubuntu-openstack-bugs mailing list