Public bug reported:

1:use glance's image-create command create a new image
# glance --os-image-api-version 1 image-create --name centos7 --disk-format 
qcow2 --container-format bare --copy-from http://ip/images/centos.img --progress
+------------------+--------------------------------------+
| Property         | Value                                |
+------------------+--------------------------------------+
| checksum         | None                                 |
| container_format | bare                                 |
| created_at       | 2015-12-07T17:33:02.000000           |
| deleted          | False                                |
| deleted_at       | None                                 |
| disk_format      | qcow2                                |
| id               | 431ddb0a-bb27-4075-a239-853e317dbce6 |
| is_public        | False                                |
| min_disk         | 0                                    |
| min_ram          | 0                                    |
| name             | centos7                              |
| owner            | 6f517af2441c4986ba94b2e98f82b8f5     |
| protected        | False                                |
| size             | 4310695936                           |
| status           | queued                               |
| updated_at       | 2015-12-07T17:33:02.000000           |
| virtual_size     | None                                 |
+------------------+--------------------------------------+

2:image is uploading 
# ll /var/lib/glance/images/
total 211328
-rw-r----- 1 glance glance 216399872 Dec  8 01:33 
431ddb0a-bb27-4075-a239-853e317dbce6

3:use glance's image-delete command delete this image
# glance --os-image-api-version 1 image-delete 
431ddb0a-bb27-4075-a239-853e317dbce6

4:the image is disappear from database but is still uploading
# glance image-list
+----+------+
| ID | Name |
+----+------+
+----+------+
# ll /var/lib/glance/images/
total 673220
-rw-r----- 1 glance glance 689373184 Dec  8 01:34 
431ddb0a-bb27-4075-a239-853e317dbce6
# ll /var/lib/glance/images/
total 686532
-rw-r----- 1 glance glance 703004672 Dec  8 01:34 
431ddb0a-bb27-4075-a239-853e317dbce6 

5: the image file is deleted until upload completely
# ll /var/lib/glance/images/
total 4209668
-rw-r----- 1 glance glance 4310695936 Dec  8 01:39 
431ddb0a-bb27-4075-a239-853e317dbce6
# ll /var/lib/glance/images/
total 0

should we kill the upload process when we delete the image by API?

** Affects: glance
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to Glance.
https://bugs.launchpad.net/bugs/1523404

Title:
  delete an image using api but the image is still uploading

Status in Glance:
  New

Bug description:
  1:use glance's image-create command create a new image
  # glance --os-image-api-version 1 image-create --name centos7 --disk-format 
qcow2 --container-format bare --copy-from http://ip/images/centos.img --progress
  +------------------+--------------------------------------+
  | Property         | Value                                |
  +------------------+--------------------------------------+
  | checksum         | None                                 |
  | container_format | bare                                 |
  | created_at       | 2015-12-07T17:33:02.000000           |
  | deleted          | False                                |
  | deleted_at       | None                                 |
  | disk_format      | qcow2                                |
  | id               | 431ddb0a-bb27-4075-a239-853e317dbce6 |
  | is_public        | False                                |
  | min_disk         | 0                                    |
  | min_ram          | 0                                    |
  | name             | centos7                              |
  | owner            | 6f517af2441c4986ba94b2e98f82b8f5     |
  | protected        | False                                |
  | size             | 4310695936                           |
  | status           | queued                               |
  | updated_at       | 2015-12-07T17:33:02.000000           |
  | virtual_size     | None                                 |
  +------------------+--------------------------------------+

  2:image is uploading 
  # ll /var/lib/glance/images/
  total 211328
  -rw-r----- 1 glance glance 216399872 Dec  8 01:33 
431ddb0a-bb27-4075-a239-853e317dbce6

  3:use glance's image-delete command delete this image
  # glance --os-image-api-version 1 image-delete 
431ddb0a-bb27-4075-a239-853e317dbce6

  4:the image is disappear from database but is still uploading
  # glance image-list
  +----+------+
  | ID | Name |
  +----+------+
  +----+------+
  # ll /var/lib/glance/images/
  total 673220
  -rw-r----- 1 glance glance 689373184 Dec  8 01:34 
431ddb0a-bb27-4075-a239-853e317dbce6
  # ll /var/lib/glance/images/
  total 686532
  -rw-r----- 1 glance glance 703004672 Dec  8 01:34 
431ddb0a-bb27-4075-a239-853e317dbce6 

  5: the image file is deleted until upload completely
  # ll /var/lib/glance/images/
  total 4209668
  -rw-r----- 1 glance glance 4310695936 Dec  8 01:39 
431ddb0a-bb27-4075-a239-853e317dbce6
  # ll /var/lib/glance/images/
  total 0

  should we kill the upload process when we delete the image by API?

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

-- 
Mailing list: https://launchpad.net/~yahoo-eng-team
Post to     : yahoo-eng-team@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yahoo-eng-team
More help   : https://help.launchpad.net/ListHelp

Reply via email to