← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1500037] [NEW] [CLI] Incorrent error message when trying download null-size image

 

Public bug reported:

CLI (shell) glance client return a non-informative responce if we trying
download a image with null size.

Affected v1 and v2 API.

Steps to reproduce:

1. Create a new zero size image:

agalkin@rinner:~$ glance image-create
+------------------+--------------------------------------+
| Property         | Value                                |
+------------------+--------------------------------------+
| checksum         | None                                 |
| container_format | None                                 |
| created_at       | 2015-09-26T14:29:50Z                 |
| disk_format      | None                                 |
| id               | ad655133-2165-48d7-9134-d24dfe0773ba |
| min_disk         | 0                                    |
| min_ram          | 0                                    |
| name             | None                                 |
| owner            | d127c7f11f68427092ef009f0782bac2     |
| protected        | False                                |
| size             | None                                 |
| status           | queued                               |
| tags             | []                                   |
| updated_at       | 2015-09-26T14:29:50Z                 |
| virtual_size     | None                                 |
| visibility       | private                              |
+------------------+--------------------------------------+

2. Trying to download this image.

---------------
by API v1:
---------------

agalkin@rinner:~$ glance --os-image-api-version 1 image-download ad655133-2165-48d7-9134-d24dfe0773ba  >> image.tmp
404 Not Found: The resource could not be found.: Image ad655133-2165-48d7-9134-d24dfe0773ba is not active (HTTP 404)


--------------
by API v2:
--------------

agalkin@rinner:~$ glance --os-image-api-version 2 image-download ad655133-2165-48d7-9134-d24dfe0773ba >> image.tmp
'NoneType' object has no attribute 'close'

or:

agalkin@rinner:~$ glance --os-image-api-version 2 image-download ad655133-2165-48d7-9134-d24dfe0773ba --progress  >> image.tmp
NoneType object is not an iterator

** Affects: glance
     Importance: Undecided
         Status: New


** Tags: cli

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

Title:
  [CLI] Incorrent error message when trying download null-size image

Status in Glance:
  New

Bug description:
  CLI (shell) glance client return a non-informative responce if we
  trying download a image with null size.

  Affected v1 and v2 API.

  Steps to reproduce:

  1. Create a new zero size image:

  agalkin@rinner:~$ glance image-create
  +------------------+--------------------------------------+
  | Property         | Value                                |
  +------------------+--------------------------------------+
  | checksum         | None                                 |
  | container_format | None                                 |
  | created_at       | 2015-09-26T14:29:50Z                 |
  | disk_format      | None                                 |
  | id               | ad655133-2165-48d7-9134-d24dfe0773ba |
  | min_disk         | 0                                    |
  | min_ram          | 0                                    |
  | name             | None                                 |
  | owner            | d127c7f11f68427092ef009f0782bac2     |
  | protected        | False                                |
  | size             | None                                 |
  | status           | queued                               |
  | tags             | []                                   |
  | updated_at       | 2015-09-26T14:29:50Z                 |
  | virtual_size     | None                                 |
  | visibility       | private                              |
  +------------------+--------------------------------------+

  2. Trying to download this image.

  ---------------
  by API v1:
  ---------------

  agalkin@rinner:~$ glance --os-image-api-version 1 image-download ad655133-2165-48d7-9134-d24dfe0773ba  >> image.tmp
  404 Not Found: The resource could not be found.: Image ad655133-2165-48d7-9134-d24dfe0773ba is not active (HTTP 404)

  
  --------------
  by API v2:
  --------------

  agalkin@rinner:~$ glance --os-image-api-version 2 image-download ad655133-2165-48d7-9134-d24dfe0773ba >> image.tmp
  'NoneType' object has no attribute 'close'

  or:

  agalkin@rinner:~$ glance --os-image-api-version 2 image-download ad655133-2165-48d7-9134-d24dfe0773ba --progress  >> image.tmp
  NoneType object is not an iterator

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


Follow ups