Zun

Container create use local image exist image not found error

Bug #1769021 reported by chenyb4 on 2018-05-04
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Zun
Undecided
chenyb4

Bug Description

Use zun create appear image not found error.
Example:
[root@senlin ~(keystone_admin)]# zun image-list
+--------------------------------------+-------------------------------------------------------------------------+--------+--------+---------+
| uuid | image_id | repo | tag | size |
+--------------------------------------+-------------------------------------------------------------------------+--------+--------+---------+
| ec3acb2f-aebd-439f-977c-41069ac9126d | sha256:a5e21e1957b6efd3fe5d9a5bf044ef22a80b70f07b95f3e00f6d07ba8c6b90f5 | cirros | latest | 7731101 |
+--------------------------------------+-------------------------------------------------------------------------+--------+--------+---------+
[root@senlin ~(keystone_admin)]# zun --debug create --image-driver docker ec3acb2f-aebd-439f-977c-41069ac9126d

DEBUG (session:419) RESP: [400] Openstack-Api-Minimum-Version: container 1.1 Openstack-Api-Maximum-Version: container 1.14 Openstack-Api-Version: container 1.14 Vary: OpenStack-API-Version Content-Type: application/json Content-Length: 248 X-Openstack-Request-Id: req-872d2128-9683-4595-93cd-45be857b4cb8 Date: Fri, 04 May 2018 03:35:19 GMT Connection: keep-alive
RESP BODY: {"errors": [{"status": 400, "code": "container.image-not-found", "links": [], "title": "Image ec3acb2f-aebd-439f-977c-41069ac9126d could not be found.", "detail": "Image ec3acb2f-aebd-439f-977c-41069ac9126d could not be found.", "request_id": ""}]}

DEBUG (session:722) POST call to container for http://10.20.10.10:9517/v1/containers used request id req-872d2128-9683-4595-93cd-45be857b4cb8
DEBUG (shell:713) Image ec3acb2f-aebd-439f-977c-41069ac9126d could not be found. (HTTP 400) (Request-ID: req-872d2128-9683-4595-93cd-45be857b4cb8)
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/zunclient/shell.py", line 711, in main
    map(encodeutils.safe_decode, sys.argv[1:]))
  File "/usr/lib/python2.7/site-packages/zunclient/shell.py", line 648, in main
    args.func(self.cs, args)
  File "/usr/lib/python2.7/site-packages/zunclient/v1/containers_shell.py", line 181, in do_create
    _show_container(cs.containers.create(**opts))
  File "/usr/lib/python2.7/site-packages/zunclient/v1/containers.py", line 109, in create
    return self._create(self._path(), new)
  File "/usr/lib/python2.7/site-packages/zunclient/common/base.py", line 52, in _create
    resp, body = self.api.json_request('POST', url, body=body)
  File "/usr/lib/python2.7/site-packages/zunclient/common/httpclient.py", line 367, in json_request
    resp = self._http_request(url, method, **kwargs)
  File "/usr/lib/python2.7/site-packages/zunclient/common/httpclient.py", line 350, in _http_request
    error_json.get('debuginfo'), method, url)
BadRequest: Image ec3acb2f-aebd-439f-977c-41069ac9126d could not be found. (HTTP 400) (Request-ID: req-872d2128-9683-4595-93cd-45be857b4cb8)
ERROR: Image ec3acb2f-aebd-439f-977c-41069ac9126d could not be found. (HTTP 400) (Request-ID: req-872d2128-9683-4595-93cd-45be857b4cb8)

hongbin (hongbin034) wrote :

@chenyb4,

I believe the image API is not fully implemented and this is possibly why this workflow doesn't work. Are you trying to pull down the image from DockerHub? or trying to pull down the image from Glance? If it is DockerHub, I guess you can use the image name and tag instead?

chenyb4 (chenyb4) wrote :

@hongbin,

I was only use zun create a container, the image was pull, use zun image-show the image display right, but use zun create appear image not found.

I think here exist image error. https://github.com/openstack/zun/blob/master/zun/compute/manager.py#L996

chenyb4 (chenyb4) on 2018-05-04
Changed in zun:
assignee: nobody → chenyb4 (chenyb4)
summary: - Image not found
+ Container create use local image exist image not found error

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

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

Other bug subscribers