yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #81421
[Bug 1733498] Re: image.v1.test_image_members failed for “The success code is different than the expected one“
image.v1 is deprecated so I think this bug is not valid anymore.
** Changed in: tempest
Status: New => Invalid
** Changed in: tempest
Assignee: Ghanshyam Mann (ghanshyammann) => (unassigned)
--
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to Glance.
https://bugs.launchpad.net/bugs/1733498
Title:
image.v1.test_image_members failed for “The success code is different
than the expected one“
Status in Glance:
New
Status in tempest:
Invalid
Bug description:
Openstck version: Pike
tempest version: 17.1.0
When I run tempest.api.image.v1.test_image_members.ImageMembersTest,
the test cases failed.
_StringException: pythonlogging:'': {{{
2017-11-21 08:42:38,999 5434 INFO [tempest.lib.common.rest_client] Request (ImageMembersTest:test_add_image_member): 201 POST https://10.127.2.30:9292/v1/images 0.659s
2017-11-21 08:42:38,999 5434 DEBUG [tempest.lib.common.rest_client] Request - Headers: {'x-image-meta-container_format': 'bare', 'X-Auth-Token': '<omitted>', 'x-image-meta-is_public': 'False', 'Content-Type': 'application/octet-stream', 'x-image-meta-disk_format': 'raw', 'x-image-meta-name': 'tempest-ImageMembersTest-image-608197243'}
Body: <callable-iterator object at 0x7fbdbf65c910>
Response - Headers: {'status': '201', u'content-length': '521', 'content-location': 'https://10.127.2.30:9292/v1/images', u'connection': 'close', u'etag': 'fd3e0d53babf78fdc2cdaca026be16b2', u'location': 'https://10.127.2.30:9292/v1/images/59f6c720-37a1-4441-a39f-fdec7a1237e7', u'date': 'Tue, 21 Nov 2017 00:52:28 GMT', u'content-type': 'application/json', u'x-openstack-request-id': 'req-661452b2-db33-46a3-8673-5b9c06f9ef04'}
Body: {"image": {"status": "active", "deleted": false, "container_format": "bare", "min_ram": 0, "updated_at": "2017-11-21T00:52:28.000000", "owner": "db4bbe131a8f458ab3af53e400e5d927", "min_disk": 0, "is_public": false, "deleted_at": null, "id": "59f6c720-37a1-4441-a39f-fdec7a1237e7", "size": 1024, "virtual_size": null, "name": "tempest-ImageMembersTest-image-608197243", "checksum": "fd3e0d53babf78fdc2cdaca026be16b2", "created_at": "2017-11-21T00:52:27.000000", "disk_format": "raw", "properties": {}, "protected": false}}
2017-11-21 08:42:39,197 5434 INFO [tempest.lib.common.rest_client] Request (ImageMembersTest:test_add_image_member): 200 PUT https://10.127.2.30:9292/v1/images/59f6c720-37a1-4441-a39f-fdec7a1237e7/members/6436a595aed34d679cb521da235aa744 0.197s
2017-11-21 08:42:39,197 5434 DEBUG [tempest.lib.common.rest_client] Request - Headers: {'Content-Type': 'application/json', 'Accept': 'application/json', 'X-Auth-Token': '<omitted>'}
Body: {"member": {}}
Response - Headers: {'status': '200', u'content-length': '45', 'content-location': 'https://10.127.2.30:9292/v1/images/59f6c720-37a1-4441-a39f-fdec7a1237e7/members/6436a595aed34d679cb521da235aa744', u'date': 'Tue, 21 Nov 2017 00:52:28 GMT', u'content-type': 'application/json', u'connection': 'close', u'x-openstack-request-id': 'req-c7e2e557-a40b-4471-8f0f-87d9aa239dec'}
Body: "<HTTPNoContent at 0x4417fa0 204 No Content>"
}}}
Traceback (most recent call last):
File "/home/jenkins/workspace/deploy-manually-test-cd-pm/fitos_test/tests/api_test/tempest/api/image/v1/test_image_members.py", line 26, in test_add_image_member
self.image_member_client.create_image_member(image, self.alt_tenant_id)
File "/home/jenkins/workspace/deploy-manually-test-cd-pm/fitos_test/tests/api_test/tempest/lib/services/image/v1/image_members_client.py", line 53, in create_image_member
self.expected_success(204, resp.status)
File "/home/jenkins/workspace/deploy-manually-test-cd-pm/fitos_test/tests/api_test/tempest/lib/common/rest_client.py", line 261, in expected_success
raise exceptions.InvalidHttpSuccessCode(details)
tempest.lib.exceptions.InvalidHttpSuccessCode: The success code is different than the expected one
Details: Unexpected http success status code 200, The expected status code is 204
So I execute the cmd directly by 'curl'.The result as follow:
[root@cdpm02 ~]# curl -g -i --cacert "/etc/keystone/ssl/ca.crt" -X PUT https://10.127.2.30:9292/v1/images/1a87cfcb-71c9-4d86-a2ea-0f0bb98fcf1f/members/218030757f8348848e6bdab3eca7cb27 -H "User-Agent: python-glanceclient" -H "Content-Type: application/json" -H "X-Auth-Token: $token" -d '{"member": {"can_share": false}}'
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 45
X-Openstack-Request-Id: req-0deecacc-1e2f-4dd9-8a02-a7e261839d6a
Date: Tue, 21 Nov 2017 04:14:00 GMT
To manage notifications about this bug go to:
https://bugs.launchpad.net/glance/+bug/1733498/+subscriptions
References