Error "Could not find resource cirros" even image is created

Bug #1621391 reported by Ali Jabbar
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Glance
New
Undecided
Unassigned
OpenStack Compute (nova)
Invalid
Undecided
Unassigned

Bug Description

Following error is coming even while launching VM in the provider network configuration.

#openstack server create --flavor m1.tiny --image cirros --nic net-id=def81dc4-a0bf-4e1f-9a1f-fb020c89bf5e --security-group default --key-name mykey provider-instance

"" Could not find resource cirros ""

--------------
# openstack image list
+--------------------------------------+--------+--------+
| ID | Name | Status |
+--------------------------------------+--------+--------+
| bebbae11-5e44-4e13-8d83-dc373ef0cbd5 | cirros | active |
+--------------------------------------+--------+--------+

# openstack image show bebbae11-5e44-4e13-8d83-dc373ef0cbd5
+------------------+------------------------------------------------------+
| Field | Value |
+------------------+------------------------------------------------------+
| checksum | ee1eca47dc88f4879d8a229cc70a07c6 |
| container_format | bare |
| created_at | 2016-09-05T06:04:31Z |
| disk_format | qcow2 |
| file | /v2/images/bebbae11-5e44-4e13-8d83-dc373ef0cbd5/file |
| id | bebbae11-5e44-4e13-8d83-dc373ef0cbd5 |
| min_disk | 0 |
| min_ram | 0 |
| name | cirros |
| owner | 9b237e3ba19c49df8c703085b6629425 |
| protected | False |
| schema | /v2/schemas/image |
| size | 13287936 |
| status | active |
| tags | |
| updated_at | 2016-09-05T06:04:31Z |
| virtual_size | None |
| visibility | public |
+------------------+------------------------------------------------------+

Revision history for this message
Ali Jabbar (jabbar-ali) wrote :

Mitaka release error message as below :-
------------------------------------------------------------------------------------
REQ: curl -g -i -X GET http://controller:8774/v2.1/153200638c4844079f456ffd3642f2bc/images/detail -H "User-Agent: python-novaclient" -H "Accept: application/json" -H "X-Auth-Token: {SHA1}a699775c23e2d6f9d63a34b3737610591199b57d"
"GET /v2.1/153200638c4844079f456ffd3642f2bc/images/detail HTTP/1.1" 500 214
RESP: [500] Content-Length: 214 X-Compute-Request-Id: req-a692ebf2-15e1-42bc-9cf4-3cce4da60da2 Vary: X-OpenStack-Nova-API-Version Connection: keep-alive X-Openstack-Nova-Api-Version: 2.1 Date: Tue, 06 Sep 2016 03:28:10 GMT Content-Type: application/json; charset=UTF-8
RESP BODY: {"computeFault": {"message": "Unexpected API Error. Please report this at http://bugs.launchpad.net/nova/ and attach the Nova API log if possible.\n<class 'glanceclient.exc.HTTPInternalServerError'>", "code": 500}}

Could not find resource cirros
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/cliff/app.py", line 374, in run_subcommand
    result = cmd.run(parsed_args)
  File "/usr/lib/python2.7/dist-packages/openstackclient/common/command.py", line 38, in run
    return super(Command, self).run(parsed_args)
  File "/usr/lib/python2.7/dist-packages/cliff/display.py", line 92, in run
    column_names, data = self.take_action(parsed_args)
  File "/usr/lib/python2.7/dist-packages/openstackclient/compute/v2/server.py", line 378, in take_action
    parsed_args.image,
  File "/usr/lib/python2.7/dist-packages/openstackclient/common/utils.py", line 118, in find_resource
    raise exceptions.CommandError(msg)
CommandError: Could not find resource cirros
clean_up CreateServer: Could not find resource cirros
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/openstackclient/shell.py", line 118, in run
    ret_val = super(OpenStackShell, self).run(argv)
  File "/usr/lib/python2.7/dist-packages/cliff/app.py", line 255, in run
    result = self.run_subcommand(remainder)
  File "/usr/lib/python2.7/dist-packages/openstackclient/shell.py", line 153, in run_subcommand
    ret_value = super(OpenStackShell, self).run_subcommand(argv)
  File "/usr/lib/python2.7/dist-packages/cliff/app.py", line 374, in run_subcommand
    result = cmd.run(parsed_args)
  File "/usr/lib/python2.7/dist-packages/openstackclient/common/command.py", line 38, in run
    return super(Command, self).run(parsed_args)
  File "/usr/lib/python2.7/dist-packages/cliff/display.py", line 92, in run
    column_names, data = self.take_action(parsed_args)
  File "/usr/lib/python2.7/dist-packages/openstackclient/compute/v2/server.py", line 378, in take_action
    parsed_args.image,
  File "/usr/lib/python2.7/dist-packages/openstackclient/common/utils.py", line 118, in find_resource
    raise exceptions.CommandError(msg)
CommandError: Could not find resource cirros

Revision history for this message
Sylvain Bauza (sylvain-bauza) wrote :

That doesn't sound a Nova problem, rather an OSC issue.

Changed in nova:
status: New → Invalid
Revision history for this message
Sylvain Bauza (sylvain-bauza) wrote :

Oops, haven't seen the glanceclient issue...

Revision history for this message
Sylvain Bauza (sylvain-bauza) wrote :

I guess you should provide the glance-api logs.

no longer affects: python-openstackclient
Changed in glance:
status: New → Incomplete
Revision history for this message
Steve Martinelli (stevemar) wrote :

2 questions from an OSC perspective:

1) does `openstack image show cirros` work?

2) what version of openstackclient are you using? i.e. run: `openstack --version`

Revision history for this message
Ali Jabbar (jabbar-ali) wrote :

# openstack image list
+--------------------------------------+--------+--------+
| ID | Name | Status |
+--------------------------------------+--------+--------+
| bebbae11-5e44-4e13-8d83-dc373ef0cbd5 | cirros | active |
+--------------------------------------+--------+--------+

# openstack image show bebbae11-5e44-4e13-8d83-dc373ef0cbd5
+------------------+------------------------------------------------------+
| Field | Value |
+------------------+------------------------------------------------------+
| checksum | ee1eca47dc88f4879d8a229cc70a07c6 |
| container_format | bare |
| created_at | 2016-09-05T06:04:31Z |
| disk_format | qcow2 |
| file | /v2/images/bebbae11-5e44-4e13-8d83-dc373ef0cbd5/file |
| id | bebbae11-5e44-4e13-8d83-dc373ef0cbd5 |
| min_disk | 0 |
| min_ram | 0 |
| name | cirros |
| owner | 9b237e3ba19c49df8c703085b6629425 |
| protected | False |
| schema | /v2/schemas/image |
| size | 13287936 |
| status | active |
| tags | |
| updated_at | 2016-09-05T06:04:31Z |
| virtual_size | None |
| visibility | public |
+------------------+------------------------------------------------------+

root@cnt-V:/home/cnt# openstack --version
openstack 2.3.0
root@cnt-V:/home/cnt#

Revision history for this message
Ali Jabbar (jabbar-ali) wrote :

REQ: curl -g -i -X GET http://controller:8774/v2.1/153200638c4844079f456ffd3642f2bc/images/detail -H "User-Agent: python-novaclient" -H "Accept: application/json" -H "X-Auth-Token: {SHA1}626790f346e00f06f44693936b8b99360a23ca75"
"GET /v2.1/153200638c4844079f456ffd3642f2bc/images/detail HTTP/1.1" 500 214
RESP: [500] Content-Length: 214 X-Compute-Request-Id: req-8d4e0492-2cad-4897-a975-c02692d7c3e9 Vary: X-OpenStack-Nova-API-Version Connection: keep-alive X-Openstack-Nova-Api-Version: 2.1 Date: Wed, 07 Sep 2016 00:32:45 GMT Content-Type: application/json; charset=UTF-8
RESP BODY: {"computeFault": {"message": "Unexpected API Error. Please report this at http://bugs.launchpad.net/nova/ and attach the Nova API log if possible.\n<class 'glanceclient.exc.HTTPInternalServerError'>", "code": 500}}

Revision history for this message
Ali Jabbar (jabbar-ali) wrote :

REQ: curl -g -i -X GET http://controller:8774/v2.1/153200638c4844079f456ffd3642f2bc/images/detail -H "User-Agent: python-novaclient" -H "Accept: application/json" -H "X-Auth-Token: {SHA1}626790f346e00f06f44693936b8b99360a23ca75"
"GET /v2.1/153200638c4844079f456ffd3642f2bc/images/detail HTTP/1.1" 500 214
RESP: [500] Content-Length: 214 X-Compute-Request-Id: req-8d4e0492-2cad-4897-a975-c02692d7c3e9 Vary: X-OpenStack-Nova-API-Version Connection: keep-alive X-Openstack-Nova-Api-Version: 2.1 Date: Wed, 07 Sep 2016 00:32:45 GMT Content-Type: application/json; charset=UTF-8
RESP BODY: {"computeFault": {"message": "Unexpected API Error. Please report this at http://bugs.launchpad.net/nova/ and attach the Nova API log if possible.\n<class 'glanceclient.exc.HTTPInternalServerError'>", "code": 500}}

Revision history for this message
wangxiyuan (wangxiyuan) wrote :

glance v1 raised 500 error. So could you please provide the glance-registry logs?

and use glanceclient like this:
$ glance --os-image-api-version 1 image-list

$ glance --os-image-api-version 1 image-show {image-id}

to see what happend?

Revision history for this message
Ali Jabbar (jabbar-ali) wrote :

root@vm-V:/home/vm# glance --os-image-api-version 1 image-list
+--------------------------------------+--------+-------------+------------------+----------+--------+
| ID | Name | Disk Format | Container Format | Size | Status |
+--------------------------------------+--------+-------------+------------------+----------+--------+
| 2d88ed5d-bc2a-412b-a3ba-120a353833b6 | cirros | qcow2 | bare | 13287936 | active |
+--------------------------------------+--------+-------------+------------------+----------+--------+
root@vm-V:/home/vm#
root@vm-V:/home/vm# glance --os-image-api-version 1 image-show 2d88ed5d-bc2a-412b-a3ba-120a353833b6
+------------------+--------------------------------------+
| Property | Value |
+------------------+--------------------------------------+
| checksum | ee1eca47dc88f4879d8a229cc70a07c6 |
| container_format | bare |
| created_at | 2016-09-11T17:20:33.000000 |
| deleted | False |
| disk_format | qcow2 |
| id | 2d88ed5d-bc2a-412b-a3ba-120a353833b6 |
| is_public | True |
| min_disk | 0 |
| min_ram | 0 |
| name | cirros |
| owner | 10a68c5e40d1420c8c65ec4b05d887a0 |
| protected | False |
| size | 13287936 |
| status | active |
| updated_at | 2016-09-11T17:20:33.000000 |
+------------------+--------------------------------------+
root@vm-V:/home/vm#

Ali Jabbar (jabbar-ali)
Changed in glance:
status: Incomplete → Opinion
status: Opinion → New
Revision history for this message
wanghongxu (wang19930902) wrote :

I guess you should provide the glance-registry logs.

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.