swift stat returns account not found

Bug #1559148 reported by Serguei Bezverkhi
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Object Storage (swift)
Invalid
Undecided
Unassigned

Bug Description

I am using keystonev3 for authentication, domain/project and user was created using os-api v3 option. When I execute the following command I get account not found, but account is definitely there:

swift --os-auth-url http://192.168.80.205:5000/v3 --os-username sbezverk --os-user-domain-name cisco.com --os-project-name swift --os-project-domain-name cisco.com --os-password XXXXXXX -V 3 --debug stat
DEBUG:keystoneclient.auth.identity.v3.base:Making authentication request to http://192.168.80.205:5000/v3/auth/tokens
INFO:requests.packages.urllib3.connectionpool:Starting new HTTP connection (1): 192.168.80.205
DEBUG:requests.packages.urllib3.connectionpool:"POST /v3/auth/tokens HTTP/1.1" 201 4777
INFO:requests.packages.urllib3.connectionpool:Starting new HTTP connection (1): 192.168.80.205
DEBUG:requests.packages.urllib3.connectionpool:"HEAD / HTTP/1.1" 404 0
INFO:swiftclient:REQ: curl -i http://192.168.80.205:8080 -I -H "X-Auth-Token: b036bb1aa2534ff79f2ec2ae332a4d7d"
INFO:swiftclient:RESP STATUS: 404 Not Found
INFO:swiftclient:RESP HEADERS: [('date', 'Fri, 18 Mar 2016 14:20:15 GMT'), ('content-length', '0'), ('content-type', 'text/html; charset=UTF-8'), ('x-trans-id', 'txaeeadd4dffe64bc195ade-0056ec0e9f')]
ERROR:swiftclient:Account HEAD failed: http://192.168.80.205:8080 404 Not Found
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/swiftclient/client.py", line 1261, in _retry
    rv = func(self.url, self.token, *args, **kwargs)
  File "/usr/lib/python2.7/site-packages/swiftclient/client.py", line 541, in head_account
    http_response_content=body)
ClientException: Account HEAD failed: http://192.168.80.205:8080 404 Not Found
Account not found

As you can see in the output below all domain/project and user in the right domain exist:

openstack domain list
+----------------------------------+-----------+---------+--------------------+
| ID | Name | Enabled | Description |
+----------------------------------+-----------+---------+--------------------+
| 445d6654a129477f953bc67196a62a79 | cisco.com | True | |
+----------------------------------+-----------+---------+--------------------+
openstack project list
+----------------------------------+---------+
| ID | Name |
+----------------------------------+---------+
| 4df11e169fcc4f8d9a50dafe5b3d8960 | swift |
+----------------------------------+---------+
openstack user list
+----------------------------------+----------+
| ID | Name |
+----------------------------------+----------+
| c2776292f69b4d04910eb7fb082a9d9f | sbezverk |
+----------------------------------+----------+
openstack user show sbezverk
+-----------+----------------------------------+
| Field | Value |
+-----------+----------------------------------+
| domain_id | 445d6654a129477f953bc67196a62a79 |
| enabled | True |
| id | c2776292f69b4d04910eb7fb082a9d9f |
| name | sbezverk |
+-----------+----------------------------------+

When I check keystone log I see that request for authentication has default credentials and not ones I have specified in the command line:

2016-03-18 14:26:34.358 40 DEBUG keystone.middleware.auth [req-b283be21-1f75-466c-be2c-b1b7b59fce95 - - - - -] There is either no auth token in the request or the certificate issuer is not trusted. No auth context will be set. _build_auth_context /var/lib/kolla/venv/lib/python2.7/site-packages/keystone/middleware/auth.py:71
2016-03-18 14:26:34.361 40 INFO keystone.common.wsgi [req-b283be21-1f75-466c-be2c-b1b7b59fce95 - - - - -] POST http://192.168.80.205:5000/v3/auth/tokens
2016-03-18 14:26:34.502 43 INFO keystone.common.wsgi [req-303486e4-4f50-455c-b96f-cb97a677fa0d - - - - -] GET http://192.168.80.205:35357/
2016-03-18 14:26:34.508 45 DEBUG keystone.middleware.auth [req-d855771b-b31c-47f4-ab9f-e7a7c299b400 - - - - -] There is either no auth token in the request or the certificate issuer is not trusted. No auth context will be set. _build_auth_context /var/lib/kolla/venv/lib/python2.7/site-packages/keystone/middleware/auth.py:71
2016-03-18 14:26:34.510 45 INFO keystone.common.wsgi [req-d855771b-b31c-47f4-ab9f-e7a7c299b400 - - - - -] POST http://192.168.80.205:35357/v3/auth/tokens
2016-03-18 14:26:34.640 47 DEBUG keystone.middleware.auth [req-11291a72-5551-427f-8c17-1676f5c7b92b - - - - -] There is either no auth token in the request or the certificate issuer is not trusted. No auth context will be set. _build_auth_context /var/lib/kolla/venv/lib/python2.7/site-packages/keystone/middleware/auth.py:71
2016-03-18 14:26:34.642 47 INFO keystone.common.wsgi [req-11291a72-5551-427f-8c17-1676f5c7b92b - - - - -] GET http://192.168.80.205:35357/v3/
2016-03-18 14:26:34.656 43 DEBUG keystone.middleware.auth [req-7271a58a-48cd-4f78-8d8e-b4cc97c930ba f10d91e799f243c3998a68a07b7c3595 d4dc7109e43a4320988a2a7d73d401e5 - default default] RBAC: auth_context: {'is_delegated_auth': False, 'access_token_id': None, 'user_id': u'f10d91e799f243c3998a68a07b7c3595', 'roles': [u'admin'], 'user_domain_id': u'default', 'trustee_id': None, 'trustor_id': None, 'consumer_id': None, 'token': <KeystoneToken (audit_id=25aFYT1uQTCz6eTWzZ9geA, audit_chain_id=25aFYT1uQTCz6eTWzZ9geA) at 0x7fb69300e210>, 'project_id': u'd4dc7109e43a4320988a2a7d73d401e5', 'trust_id': None, 'project_domain_id': u'default'} process_request /var/lib/kolla/venv/lib/python2.7/site-packages/keystone/middleware/auth.py:221
2016-03-18 14:26:34.658 43 INFO keystone.common.wsgi [req-7271a58a-48cd-4f78-8d8e-b4cc97c930ba f10d91e799f243c3998a68a07b7c3595 d4dc7109e43a4320988a2a7d73d401e5 - default default] GET http://192.168.80.205:35357/v3/auth/tokens
2016-03-18 14:26:34.658 43 DEBUG keystone.common.controller [req-7271a58a-48cd-4f78-8d8e-b4cc97c930ba f10d91e799f243c3998a68a07b7c3595 d4dc7109e43a4320988a2a7d73d401e5 - default default] RBAC: Authorizing identity:validate_token() _build_policy_check_credentials /var/lib/kolla/venv/lib/python2.7/site-packages/keystone/common/controller.py:80
2016-03-18 14:26:34.658 43 DEBUG keystone.common.controller [req-7271a58a-48cd-4f78-8d8e-b4cc97c930ba f10d91e799f243c3998a68a07b7c3595 d4dc7109e43a4320988a2a7d73d401e5 - default default] RBAC: using auth context from the request environment _build_policy_check_credentials /var/lib/kolla/venv/lib/python2.7/site-packages/keystone/common/controller.py:85
2016-03-18 14:26:34.665 43 DEBUG keystone.policy.backends.rules [req-7271a58a-48cd-4f78-8d8e-b4cc97c930ba f10d91e799f243c3998a68a07b7c3595 d4dc7109e43a4320988a2a7d73d401e5 - default default] enforce identity:validate_token: {'is_delegated_auth': False, 'access_token_id': None, 'user_id': u'f10d91e799f243c3998a68a07b7c3595', 'roles': [u'admin'], 'user_domain_id': u'default', 'trustee_id': None, 'trustor_id': None, 'consumer_id': None, 'token': <KeystoneToken (audit_id=25aFYT1uQTCz6eTWzZ9geA, audit_chain_id=25aFYT1uQTCz6eTWzZ9geA) at 0x7fb69300e210>, 'project_id': u'd4dc7109e43a4320988a2a7d73d401e5', 'trust_id': None, 'project_domain_id': u'default'} enforce /var/lib/kolla/venv/lib/python2.7/site-packages/keystone/policy/backends/rules.py:76
2016-03-18 14:26:34.666 43 DEBUG keystone.common.controller [req-7271a58a-48cd-4f78-8d8e-b4cc97c930ba f10d91e799f243c3998a68a07b7c3595 d4dc7109e43a4320988a2a7d73d401e5 - default default] RBAC: Authorization granted inner /var/lib/kolla/venv/lib/python2.7/site-packages/keystone/common/controller.py:180

Revision history for this message
Serguei Bezverkhi (sbezverk) wrote :

end up being a kolla's bug not swift bug, fixed under https://bugs.launchpad.net/kolla/+bug/1559207

Changed in swift:
status: New → Invalid
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.