← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1458308] [NEW] Deleting a volume booted server which is still in build state leaves behind volume in 'in-use' state

 

Public bug reported:

Deleting a server created using bootable volume which is still in build
state leaves behind volume in 'in-use' state and this volume can not be
deleted using delete api. Below is the shell script to reproduce it.

curl -g -i -X POST https://10.0.0.5:4523/v2/ee61323896a34bea9c9a5623fbb6f239/os-volumes_boot?format=xml -H "User-Agent: python-novaclient" -H "Content-Type: application/json" -H "Accept: application/json" -H "X-Auth-Token: <omitted>" -d '{"server": {"name": "testVolIssue", "imageRef": "", "block_device_mapping_v2": [{"boot_index": "0", "uuid": "5d246189-a666-470c-8cee-36ee489cbd9e", "volume_size": "6", "source_type": "image", "destination_type": "volume", "delete_on_termination": "1"}], "flavorRef": "da9ba7b5-be67-4a62-bb35-a362e05ba2f2", "max_count": 1, "min_count": 1, "networks": [{"uuid": "b5220eb2-e105-4ae0-8fc7-75a7cd468a40"}]}}' > /dev/null ; var=`nova list | grep testVolIssue | awk '{print $2}'`;echo Server Id: $var;nova delete $var; nova show $var
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   839  100   436  100   403    589    544 --:--:-- --:--:-- --:--:--   589
Server Id: 8f04539c-a0a6-4276-af1f-17c447cc8c53
Request to delete server 8f04539c-a0a6-4276-af1f-17c447cc8c53 has been accepted.
+--------------------------------------+----------------------------------------------------------+
| Property                             | Value                                                    |
+--------------------------------------+----------------------------------------------------------+
| OS-DCF:diskConfig                    | MANUAL                                                   |
| OS-EXT-AZ:availability_zone          | nova                                                     |
| OS-EXT-STS:power_state               | 0                                                        |
| OS-EXT-STS:task_state                | deleting                                                 |
| OS-EXT-STS:vm_state                  | building                                                 |
| OS-SRV-USG:launched_at               | -                                                        |
| OS-SRV-USG:terminated_at             | -                                                        |
| accessIPv4                           |                                                          |
| accessIPv6                           |                                                          |
| config_drive                         |                                                          |
| created                              | 2015-05-24T09:24:30Z                                     |
| flavor                               | small (da9ba7b5-be67-4a62-bb35-a362e05ba2f2)             |
| hostId                               | f96a91b0f7f407d7880f3ee32208c4003f8245431115666dad4bb2e5 |
| id                                   | 8f04539c-a0a6-4276-af1f-17c447cc8c53                     |
| image                                | Attempt to boot from volume - no image supplied          |
| key_name                             | -                                                        |
| metadata                             | {}                                                       |
| name                                 | testVolIssue                                             |
| os-extended-volumes:volumes_attached | [{"id": "97017c0c-b752-4cba-9c42-dcc5600a5f95"}]         |
| progress                             | 0                                                        |
| security_groups                      | default                                                  |
| status                               | BUILD                                                    |
| tenant_id                            | ee61323896a34bea9c9a5623fbb6f239                         |
| updated                              | 2015-05-24T09:24:32Z                                     |
| user_id                              | 6cb8b12bed5046ff810d71ed73bdcb2e                         |
+--------------------------------------+----------------------------------------------------------+
nova show 8f04539c-a0a6-4276-af1f-17c447cc8c53
ERROR (CommandError): No server with a name or ID of '8f04539c-a0a6-4276-af1f-17c447cc8c53' exists.

cinder list | grep 8f04539c-a0a6-4276-af1f-17c447cc8c53
| 97017c0c-b752-4cba-9c42-dcc5600a5f95 |   in-use  |                         |  6   |     None    |   true   | 8f04539c-a0a6-4276-af1f-17c447cc8c53 |
cinder delete 97017c0c-b752-4cba-9c42-dcc5600a5f95
Delete for volume 97017c0c-b752-4cba-9c42-dcc5600a5f95 failed: Bad Request (HTTP 400) (Request-ID: req-30d7843f-6c12-42ad-89e3-4103db630c1c)
ERROR: Unable to delete any of the specified volumes.

** Affects: nova
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Compute (nova).
https://bugs.launchpad.net/bugs/1458308

Title:
  Deleting a volume booted server which is still in build state leaves
  behind volume in 'in-use' state

Status in OpenStack Compute (Nova):
  New

Bug description:
  Deleting a server created using bootable volume which is still in
  build state leaves behind volume in 'in-use' state and this volume can
  not be deleted using delete api. Below is the shell script to
  reproduce it.

  curl -g -i -X POST https://10.0.0.5:4523/v2/ee61323896a34bea9c9a5623fbb6f239/os-volumes_boot?format=xml -H "User-Agent: python-novaclient" -H "Content-Type: application/json" -H "Accept: application/json" -H "X-Auth-Token: <omitted>" -d '{"server": {"name": "testVolIssue", "imageRef": "", "block_device_mapping_v2": [{"boot_index": "0", "uuid": "5d246189-a666-470c-8cee-36ee489cbd9e", "volume_size": "6", "source_type": "image", "destination_type": "volume", "delete_on_termination": "1"}], "flavorRef": "da9ba7b5-be67-4a62-bb35-a362e05ba2f2", "max_count": 1, "min_count": 1, "networks": [{"uuid": "b5220eb2-e105-4ae0-8fc7-75a7cd468a40"}]}}' > /dev/null ; var=`nova list | grep testVolIssue | awk '{print $2}'`;echo Server Id: $var;nova delete $var; nova show $var
    % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                   Dload  Upload   Total   Spent    Left  Speed
  100   839  100   436  100   403    589    544 --:--:-- --:--:-- --:--:--   589
  Server Id: 8f04539c-a0a6-4276-af1f-17c447cc8c53
  Request to delete server 8f04539c-a0a6-4276-af1f-17c447cc8c53 has been accepted.
  +--------------------------------------+----------------------------------------------------------+
  | Property                             | Value                                                    |
  +--------------------------------------+----------------------------------------------------------+
  | OS-DCF:diskConfig                    | MANUAL                                                   |
  | OS-EXT-AZ:availability_zone          | nova                                                     |
  | OS-EXT-STS:power_state               | 0                                                        |
  | OS-EXT-STS:task_state                | deleting                                                 |
  | OS-EXT-STS:vm_state                  | building                                                 |
  | OS-SRV-USG:launched_at               | -                                                        |
  | OS-SRV-USG:terminated_at             | -                                                        |
  | accessIPv4                           |                                                          |
  | accessIPv6                           |                                                          |
  | config_drive                         |                                                          |
  | created                              | 2015-05-24T09:24:30Z                                     |
  | flavor                               | small (da9ba7b5-be67-4a62-bb35-a362e05ba2f2)             |
  | hostId                               | f96a91b0f7f407d7880f3ee32208c4003f8245431115666dad4bb2e5 |
  | id                                   | 8f04539c-a0a6-4276-af1f-17c447cc8c53                     |
  | image                                | Attempt to boot from volume - no image supplied          |
  | key_name                             | -                                                        |
  | metadata                             | {}                                                       |
  | name                                 | testVolIssue                                             |
  | os-extended-volumes:volumes_attached | [{"id": "97017c0c-b752-4cba-9c42-dcc5600a5f95"}]         |
  | progress                             | 0                                                        |
  | security_groups                      | default                                                  |
  | status                               | BUILD                                                    |
  | tenant_id                            | ee61323896a34bea9c9a5623fbb6f239                         |
  | updated                              | 2015-05-24T09:24:32Z                                     |
  | user_id                              | 6cb8b12bed5046ff810d71ed73bdcb2e                         |
  +--------------------------------------+----------------------------------------------------------+
  nova show 8f04539c-a0a6-4276-af1f-17c447cc8c53
  ERROR (CommandError): No server with a name or ID of '8f04539c-a0a6-4276-af1f-17c447cc8c53' exists.

  cinder list | grep 8f04539c-a0a6-4276-af1f-17c447cc8c53
  | 97017c0c-b752-4cba-9c42-dcc5600a5f95 |   in-use  |                         |  6   |     None    |   true   | 8f04539c-a0a6-4276-af1f-17c447cc8c53 |
  cinder delete 97017c0c-b752-4cba-9c42-dcc5600a5f95
  Delete for volume 97017c0c-b752-4cba-9c42-dcc5600a5f95 failed: Bad Request (HTTP 400) (Request-ID: req-30d7843f-6c12-42ad-89e3-4103db630c1c)
  ERROR: Unable to delete any of the specified volumes.

To manage notifications about this bug go to:
https://bugs.launchpad.net/nova/+bug/1458308/+subscriptions


Follow ups

References