<div dir="ltr">Hi,<div><br></div><div>[filter:authtoken]</div><div>-delay_auth_decision = True<br>+delay_auth_decision = True<br></div><div><br></div><div>Above does the trick and now working :) </div><div><br></div><div>Thank you</div><div><br clear="all"><div><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div style="margin:0px;padding:0px 0px 20px;width:1503px;color:rgb(34,34,34);font-family:Roboto,RobotoDraft,Helvetica,Arial,sans-serif;font-size:medium"><div style="margin:8px 0px 0px;padding:0px"><div dir="ltr"><span><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr" style="font-family:Arial,Helvetica,sans-serif;font-size:small"><span style="color:rgb(136,136,136);vertical-align:top;line-height:18px;font-size:11pt;font-family:Arial,Helvetica,Geneva;font-weight:bold">Michal Arbet<br></span><span style="color:rgb(136,136,136);font-size:10pt;vertical-align:top;line-height:18px;font-family:Arial,Helvetica,Geneva">Openstack Engineer<br><img src="https://www.google.com/a/ultimum.io/images/logo.gif" width="200" height="81"><br>Ultimum Technologies a.s.<br>Na Poříčí 1047/26, 11000 Praha 1<br>Czech Republic<br><br><a value="+420608314961" style="color:rgb(17,85,204)">+420 604 228 897</a> <br><a href="mailto:michal.arbet@ultimum.io" style="color:rgb(17,85,204)" target="_blank">michal.arbet@ultimum.io</a><br></span><font color="#1155cc" face="Arial, Helvetica, Geneva" style="font-size:12.8px"><span style="font-size:13.3333px;line-height:18px"><u><a href="https://ultimum.io/" style="color:rgb(17,85,204)" target="_blank">https://ultimum.io</a></u></span></font><br></div><div dir="ltr" style="font-family:Arial,Helvetica,sans-serif;font-size:small"><font color="#1155cc" face="Arial, Helvetica, Geneva" style="font-size:12.8px"><span style="font-size:13.3333px;line-height:18px"><br></span></font></div><div style="font-family:Arial,Helvetica,sans-serif;font-size:small"><font color="#666666"><a href="https://www.linkedin.com/company/ultimum-technologies" style="color:rgb(17,85,204)" target="_blank">LinkedIn</a> | <a href="https://twitter.com/ultimumtech" style="color:rgb(17,85,204)" target="_blank">Twitter</a> | <a href="https://www.facebook.com/ultimumtechnologies/timeline" style="color:rgb(17,85,204)" target="_blank">Facebook</a></font></div></div></div></div></div></div></div></div></span></div></div><div><div></div><div><div></div></div></div><div></div></div></div></div></div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">út 14. 12. 2021 v 0:52 odesílatel Ghanshyam Mann <<a href="mailto:gmann@ghanshyammann.com">gmann@ghanshyammann.com</a>> napsal:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"> ---- On Mon, 13 Dec 2021 11:33:27 -0600 Michal Arbet <<a href="mailto:michal.arbet@ultimum.io" target="_blank">michal.arbet@ultimum.io</a>> wrote ----<br>
> Hello to eveyrone,<br>
> Please, could someone help me with swift capabilities not working when I'm tempesting openstack test stack ? <br>
> Tempest : <br>
> rm -rf /tmp/tempest-lock/; refstack-client test -v -c /opt/tempest/tempest.conf -- --regex tempest.api.object_storage.test_account_quotas_negative.AccountQuotasNegativeTest<br>
> <br>
> (.venv) root@ca6353106d83:/opt/refstack-client# rm -rf /tmp/tempest-lock/; refstack-client test -v -c /opt/tempest/tempest.conf -- --regex tempest.api.object_storage.test_account_quotas_negative.AccountQuotasNegativeTest<br>
> 2021-12-13 17:44:33.001 4358 INFO tempest [-] Using tempest config file /etc/tempest/tempest.conf<br>
> 2021-12-13 17:44:33,839 refstack_client:518 INFO Starting Tempest test...<br>
> 2021-12-13 17:44:33.839 4358 INFO refstack_client [-] Starting Tempest test...<br>
> {0} setUpClass (tempest.api.object_storage.test_account_quotas_negative.AccountQuotasNegativeTest) [0.000000s] ... FAILED<br>
> <br>
> Captured traceback:<br>
> ~~~~~~~~~~~~~~~~~~~<br>
> Traceback (most recent call last):<br>
> <br>
> File "/opt/refstack-client/.tempest/tempest/test.py", line 181, in setUpClass<br>
> raise value.with_traceback(trace)<br>
> <br>
> File "/opt/refstack-client/.tempest/tempest/test.py", line 174, in setUpClass<br>
> cls.resource_setup()<br>
> <br>
> File "/opt/refstack-client/.tempest/tempest/api/object_storage/test_account_quotas_negative.py", line 36, in resource_setup<br>
> super(AccountQuotasNegativeTest, cls).resource_setup()<br>
> <br>
> File "/opt/refstack-client/.tempest/tempest/api/object_storage/base.py", line 95, in resource_setup<br>
> body = cls.capabilities_client.list_capabilities()<br>
> <br>
> File "/opt/refstack-client/.tempest/tempest/lib/services/object_storage/capabilities_client.py", line 32, in list_capabilities<br>
> self._error_checker(resp, body)<br>
> <br>
> File "/opt/refstack-client/.tempest/tempest/lib/common/rest_client.py", line 799, in _error_checker<br>
> raise exceptions.Unauthorized(resp_body, resp=resp)<br>
> <br>
> tempest.lib.exceptions.Unauthorized: Unauthorized<br>
> Details: {'code': 401, 'title': 'Unauthorized', 'message': 'The request you have made requires authentication.'}<br>
> <br>
> <br>
> ==============================<br>
> Failed 1 tests - output below:<br>
> ==============================<br>
> <br>
> setUpClass (tempest.api.object_storage.test_account_quotas_negative.AccountQuotasNegativeTest)<br>
> ----------------------------------------------------------------------------------------------<br>
> <br>
> Captured traceback:<br>
> ~~~~~~~~~~~~~~~~~~~<br>
> Traceback (most recent call last):<br>
> <br>
> File "/opt/refstack-client/.tempest/tempest/test.py", line 181, in setUpClass<br>
> raise value.with_traceback(trace)<br>
> <br>
> File "/opt/refstack-client/.tempest/tempest/test.py", line 174, in setUpClass<br>
> cls.resource_setup()<br>
> <br>
> File "/opt/refstack-client/.tempest/tempest/api/object_storage/test_account_quotas_negative.py", line 36, in resource_setup<br>
> super(AccountQuotasNegativeTest, cls).resource_setup()<br>
> <br>
> File "/opt/refstack-client/.tempest/tempest/api/object_storage/base.py", line 95, in resource_setup<br>
> body = cls.capabilities_client.list_capabilities()<br>
> <br>
> File "/opt/refstack-client/.tempest/tempest/lib/services/object_storage/capabilities_client.py", line 32, in list_capabilities<br>
> self._error_checker(resp, body)<br>
> <br>
> File "/opt/refstack-client/.tempest/tempest/lib/common/rest_client.py", line 799, in _error_checker<br>
> raise exceptions.Unauthorized(resp_body, resp=resp)<br>
> <br>
> tempest.lib.exceptions.Unauthorized: Unauthorized<br>
> Details: {'code': 401, 'title': 'Unauthorized', 'message': 'The request you have made requires authentication.'}<br>
> <br>
> <br>
> <br>
> ======<br>
> Totals<br>
> ======<br>
> Ran: 1 tests in 0.0000 sec.<br>
> - Passed: 0<br>
> - Skipped: 0<br>
> - Expected Fail: 0<br>
> - Unexpected Success: 0<br>
> - Failed: 1<br>
> Sum of execute time for each test: 0.0000 sec.<br>
> <br>
> TEMPEST LOG : <br>
> Response - Headers: {'content-type': 'application/json', 'content-length': '114', 'www-authenticate': 'Keystone uri="<a href="http://192.168.205.254:5000" rel="noreferrer" target="_blank">http://192.168.205.254:5000</a>"', 'x-trans-id': 'tx815e181e33fb4854b2631-0061b7787a', 'x-openstack-request-id': 'tx815e181e33fb4854b2631-0061b7787a', 'date': 'Mon, 13 Dec 2021 16:44:42 GMT', 'connection': 'close', 'status': '401', 'content-location': '<a href="https://api.refstack.ultimum.cloud:8080/info" rel="noreferrer" target="_blank">https://api.refstack.ultimum.cloud:8080/info</a>'}<br>
> Body: b'{"error": {"code": 401, "title": "Unauthorized", "message": "The request you have made requires authentication."}}' _log_request_full /opt/refstack-client/.tempest/tempest/lib/common/rest_client.py:450<br>
> <br>
> <br>
> <br>
> Test from command line and from curl <br>
> . /etc/kolla/refstack.sh ; curl -H "X-Auth-Token: $(openstack token issue -f value -c id)" <a href="https://api.refstack.ultimum.cloud:8080/info" rel="noreferrer" target="_blank">https://api.refstack.ultimum.cloud:8080/info</a><br>
> {"swift": {"version": "2.27.1.dev9", "strict_cors_mode": true, "policies": [{"name": "Policy-0", "aliases": "Policy-0", "default": true}], "allow_account_management": true, "account_autocreate": true, "max_file_size": 5368709122, "max_meta_name_length": 128, "max_meta_value_length": 256, "max_meta_count": 90, "max_meta_overall_size": 4096, "max_header_size": 8192, "max_object_name_length": 1024, "container_listing_limit": 10000, "account_listing_limit": 10000, "max_account_name_length": 256, "max_container_name_length": 256, "extra_header_count": 0}, "container_sync": {"realms": {}}, "bulk_upload": {"max_containers_per_extraction": 10000, "max_failed_extractions": 1000}, "bulk_delete": {"max_deletes_per_request": 10000, "max_failed_deletes": 1000}, "tempurl": {"methods": ["GET", "HEAD", "PUT", "POST", "DELETE"], "incoming_remove_headers": ["x-timestamp"], "incoming_allow_headers": [], "outgoing_remove_headers": ["x-object-meta-*"], "outgoing_allow_headers": ["x-object-meta-public-*"], "allowed_digests": ["sha1", "sha256", "sha512"]}, "ratelimit": {"account_ratelimit": 0.0, "max_sleep_time_seconds": 60.0, "container_ratelimits": [], "container_listing_ratelimits": []}, "container_quotas": {}, "account_quotas": {}, "slo": {"max_manifest_segments": 1000, "max_manifest_size": 8388608, "yield_frequency": 10, "min_segment_size": 1, "allow_async_delete": false}}<br>
> <br>
> Python Swiftclient : <br>
> ubuntu@deploy:/opt/kolla-ansible$ . /etc/kolla/refstack.sh ; swift --os-auth-url <a href="http://192.168.205.254:5000/v3" rel="noreferrer" target="_blank">http://192.168.205.254:5000/v3</a> --auth-version 3 --os-project-name refstack --os-project-domain-name default --os-username refstack --os-user-domain-name default --os-password SECRET capabilities<br>
> Capabilities GET failed: <a href="http://192.168.205.254:8080/info" rel="noreferrer" target="_blank">http://192.168.205.254:8080/info</a> 401 Unauthorized [first 60 chars of response] b'{"error": {"code": 401, "title": "Unauthorized", "message": '<br>
> Failed Transaction ID: txc1d8607e26eb4cd587459-0061b7791b<br>
> <br>
> <br>
> <br>
> It looks like swift client is broken, isn't it ? Or ? Maybe kolla-ansible is creating bad roles and config ? (operator_roles, reselleradmin_roel ..etc ? ) Tempest is from master<br>
> Thank you very much,Kevko<br>
<br>
Are you running it with dynamic creds or pre-provisioned creds ?<br>
<br>
Error is from cls.capabilities_client which is initialized from CONF.object_storage.operator_role[1] which is 'member'<br>
role by default. what is your configuration for this? <br>
<br>
With default CONF.object_storage.operator_role as 'member' role, this test pass in upstream CI/CD so client is<br>
not broken but it is configuration issue: <a href="https://zuul.opendev.org/t/openstack/build/b29147647370418fb9fbb0182832749d/log/job-output.txt#27292" rel="noreferrer" target="_blank">https://zuul.opendev.org/t/openstack/build/b29147647370418fb9fbb0182832749d/log/job-output.txt#27292</a><br>
<br>
<br>
[1] <a href="https://github.com/openstack/tempest/blob/34432dc970d09a55572a68fa007575285e35b550/tempest/api/object_storage/base.py#L77" rel="noreferrer" target="_blank">https://github.com/openstack/tempest/blob/34432dc970d09a55572a68fa007575285e35b550/tempest/api/object_storage/base.py#L77</a><br>
<br>
-gmann<br>
<br>
> <br>
> <br>
> Michal Arbet<br>
> Openstack Engineer<br>
> <br>
> Ultimum Technologies a.s.<br>
> Na Poříčí 1047/26, 11000 Praha 1<br>
> Czech Republic<br>
> <br>
> +420 604 228 897 <br>
> <a href="mailto:michal.arbet@ultimum.io" target="_blank">michal.arbet@ultimum.io</a><br>
> <a href="https://ultimum.io" rel="noreferrer" target="_blank">https://ultimum.io</a><br>
> <br>
> LinkedIn | Twitter | Facebook<br>
</blockquote></div>