Zun

Zun unable to download the glance image if it have : in name, i.,e image:v1

Bug #1709238 reported by cooldharma06
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Zun
In Progress
Medium
cooldharma06

Bug Description

Zun unable to download the glance image if image_name have : (colon) character.

# openstack image list
+--------------------------------------+--------------------------+--------+
| ID | Name | Status |
+--------------------------------------+--------------------------+--------+
| 22f25ab3-6386-4d2b-b686-2e34b86c4fd1 | cir-v2 | active |
| dbf85891-3e16-47c4-a396-40a19ec079a6 | cir-v4 | active |
| b95c79b8-1a34-464d-8b48-32ec8726f4e5 | cirros-0.3.5-x86_64-disk | active |
| 304def14-8b05-4685-bd31-cb89662131d8 | cirros:latest | active |
| fa0a001b-9c73-4bc3-b449-2883fb105129 | kubernetes/pause | active |
+--------------------------------------+--------------------------+--------+

# zun create --name "cir-2" --image-driver glance cirros:latest --debug
ERROR: Image cirros:latest could not be found. (HTTP 404) (Request-ID: req-a1389cb6-4c6f-4924-a4b2-bec6c5cae650)

Note: Without image-driver (i.e., with docker) it's working fine.

Need to be fix.

Changed in zun:
assignee: nobody → cooldharma06 (cooldharma06)
hongbin (hongbin034)
Changed in zun:
status: New → Triaged
importance: Undecided → Medium
Revision history for this message
cooldharma06 (cooldharma06) wrote :

Hi hongbin,

Suggestion needed for the above issue.

/opt/stack/zun/zun/image/driver.py : 118
 search_image(context, image_name, image_driver, exact_match):
  [..]
    repo, tag = parse_image_name(image_name)
  [..]

Using string.split(:), repo and tag got retrieved. It's making issue when glance_name having (:) character.

i am thinking like we will add one more optional parameter with glance image driver for zun create,
--glance-image-tag (tagname), so that we can resolve the above issue.

example:
$ docker save cirros | openstack image create --disk-format raw --container-format docker cirros --tag v1

$ zun create --name "cir1" --image-driver glance <imagename> --glance-image-tag <tag>

Also using this we can manage tags easily.

If you have any other suggestion means kindly let me know. Having timezone issue so i am unable to communicate over IRC.

thanks in advance.. :)

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to zun (master)

Fix proposed to branch: master
Review: https://review.openstack.org/495825

Changed in zun:
status: Triaged → In Progress
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.