test_list_get_volume_attachments failing with 400 error on teardown when detaching an already detached volume
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Compute (nova) |
Won't Fix
|
Undecided
|
Unassigned | ||
tempest |
Fix Released
|
Medium
|
Matt Riedemann |
Bug Description
Noticed this today:
2017-10-10 07:50:05.759627 | tempest.
2017-10-10 07:50:05.759770 | -------
2017-10-10 07:50:05.759801 |
2017-10-10 07:50:05.759859 | Captured traceback:
2017-10-10 07:50:05.759942 | ~~~~~~~~~~~~~~~~~~~
2017-10-10 07:50:05.759999 | b'Traceback (most recent call last):'
2017-10-10 07:50:05.760082 | b' File "/opt/stack/
2017-10-10 07:50:05.760144 | b' return func(*args, **kwargs)'
2017-10-10 07:50:05.760226 | b' File "/opt/stack/
2017-10-10 07:50:05.760266 | b' (server_id, volume_id))'
2017-10-10 07:50:05.760335 | b' File "/opt/stack/
2017-10-10 07:50:05.760411 | b" return self.request(
2017-10-10 07:50:05.760545 | b' File "/opt/stack/
2017-10-10 07:50:05.760602 | b' method, url, extra_headers, headers, body, chunked)'
2017-10-10 07:50:05.760670 | b' File "/opt/stack/
2017-10-10 07:50:05.760716 | b' self._error_
2017-10-10 07:50:05.760787 | b' File "/opt/stack/
2017-10-10 07:50:05.760852 | b' raise exceptions.
2017-10-10 07:50:05.760903 | b'tempest.
2017-10-10 07:50:05.761081 | b'Details: {\'message\': "Invalid volume: Invalid input received: Invalid volume: Unable to detach volume. Volume status must be \'in-use\' and attach_status must be \'attached\' to detach. (HTTP 400) (Request-ID: req-e4faf8b8-
2017-10-10 07:50:05.761119 | b''
This test does the following:
1. create a server
2. create a volume vol1
3. attach vol1 to the server and wait for the volume status to be in-use
4. repeat steps 3 and 4 for vol2
5. for each volume attachment, detach it and wait for it's status to be 'available'
That all works. The failure is during the cleanup routines on teardown, they try to detach the volume but the volumes are already detached, which results in a 400 response from the compute API (because the compute API gets a 400 response from the volumev3 API):
2017-10-10 07:50:05.808506 | b'2017-10-10 07:30:15,928 2243 INFO [tempest.
2017-10-10 07:50:05.808588 | b"2017-10-10 07:30:15,928 2243 DEBUG [tempest.
2017-10-10 07:50:05.808610 | b' Body: None'
2017-10-10 07:50:05.808826 | b" Response - Headers: {'content-
2017-10-10 07:50:05.808941 | b' Body: b\'{"badRequest": {"code": 400, "message": "Invalid volume: Invalid input received: Invalid volume: Unable to detach volume. Volume status must be \\\'in-use\\\' and attach_status must be \\\'attached\\\' to detach. (HTTP 400) (Request-ID: req-e4faf8b8-
The cleanup code is handling 404s but not 400s and so the cleanup routine fails.
Changed in tempest: | |
status: | New → Triaged |
importance: | Undecided → Medium |
Changed in tempest: | |
status: | Triaged → Invalid |
status: | Invalid → Confirmed |
Changed in nova: | |
status: | New → Triaged |
Changed in tempest: | |
assignee: | nobody → Matt Riedemann (mriedem) |
Changed in nova: | |
status: | Triaged → Won't Fix |
Changed in tempest: | |
assignee: | Matt Riedemann (mriedem) → Ghanshyam Mann (ghanshyammann) |
Changed in tempest: | |
assignee: | Ghanshyam Mann (ghanshyammann) → Matt Riedemann (mriedem) |
It should be noted that logstash is only showing this happening since pike, so there might have been a regression in the API behavior, e.g. maybe we were returning a 404 before. If there was a regression, this is likely the cause: https:/ /review. openstack. org/#/c/ 446671/