can't list projects using ospurge

Bug #1850838 reported by Pavlos Kleanthous
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
ospurge
New
Undecided
Unassigned

Bug Description

➜ ~ ospurge --dry-run --purge-project fbcc2bf8248e4db58cc09352b8918dc5
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/openstack/cloud/_identity.py", line 67, in list_projects
    '/{endpoint}'.format(endpoint=key), params=pushdown)
  File "/usr/local/lib/python3.7/site-packages/keystoneauth1/adapter.py", line 386, in get
    return self.request(url, 'GET', **kwargs)
  File "/usr/local/lib/python3.7/site-packages/openstack/proxy.py", line 529, in request
    return _json_response(response, error_message=error_message)
  File "/usr/local/lib/python3.7/site-packages/openstack/proxy.py", line 507, in _json_response
    exceptions.raise_from_response(response, error_message=error_message)
  File "/usr/local/lib/python3.7/site-packages/openstack/exceptions.py", line 229, in raise_from_response
    http_status=http_status, request_id=request_id
openstack.exceptions.HttpException: HttpException: 403: Client Error for url: http://10.10.51.20:5000/v3/projects, You are not authorized to perform the requested action: identity:list_projects.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/ospurge/main.py", line 115, in __init__
    project = self.cloud.get_project(options.purge_project)
  File "/usr/local/lib/python3.7/site-packages/openstack/cloud/_identity.py", line 99, in get_project
    domain_id=domain_id)
  File "/usr/local/lib/python3.7/site-packages/openstack/cloud/_utils.py", line 205, in _get_entity
    entities = search(name_or_id, filters, **kwargs)
  File "/usr/local/lib/python3.7/site-packages/openstack/cloud/_identity.py", line 84, in search_projects
    domain_id=domain_id, name_or_id=name_or_id, filters=filters)
  File "/usr/local/lib/python3.7/site-packages/openstack/cloud/_identity.py", line 72, in list_projects
    raise exc.OpenStackCloudException(str(e))
openstack.exceptions.SDKException: HttpException: 403: Client Error for url: http://10.10.51.20:5000/v3/projects, You are not authorized to perform the requested action: identity:list_projects.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/bin/ospurge", line 10, in <module>
    sys.exit(main())
  File "/usr/local/lib/python3.7/site-packages/ospurge/main.py", line 237, in main
    creds_manager = CredentialsManager(options=options, config=cloud_config)
  File "/usr/local/lib/python3.7/site-packages/ospurge/main.py", line 120, in __init__
    "Unable to find project '{}'".format(options.purge_project)
ospurge.exceptions.OSProjectNotFound: Unable to find project 'fbcc2bf8248e4db58cc09352b8918dc5'
➜ ~ openstack project list
+----------------------------------+---------------+
| ID | Name |
+----------------------------------+---------------+
| 3fa0011f6e6c4c14a597b20bb8b057f2 | demo-nik |
| 531b481b75094210b1aa0e3d4f155a20 | ybcs-test |
| 556af0af373547c49c4365d65e5d4381 | demo-david |
| bc34bf8f138746ad8bfd047fc6e4b5d6 | demo-pavlos-2 |
| c3ba6570e6944685baa5c91c3c414605 | demo-david2 |
| fbcc2bf8248e4db58cc09352b8918dc5 | nik-purge |
+----------------------------------+---------------+

Using the version from commit 990287677b

Revision history for this message
David Hrbáč (davidhrbac) wrote :

Duplicates #1850837

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.