<div dir="ltr"><div dir="auto">Hi Brian, when I enable v1 and v2 api in glance-api.conf , using the same heat template I got http 500.<br></div><div>Now in my glance-api.conf I have the same configuration used on ubuntu 16 (whete heat works fine):<br>#enable_v1_api = false<br>#enable_v1_registry = true<br>#enable_v2_api = true<br>#enable_v2_registry = true<br><br></div><div>The above probably enables either ve or v1 glance apis, because whani I start glance api server it reports in its log:<br><br>WARNING glance.api.versions [-] The Images (Glance) v1 API is deprecated and will be removed on or after the Pike release, following the standard OpenStack deprecation policy. Currently, the solution is to set enable_v1_api=False and enable_v2_api=True in your glance-api.conf file. Once those options are removed from the code, Images (Glance) v2 API will be switched on by default and will be the only option to deploy and use<br></div><div><br></div><div dir="auto"><div dir="auto"><br></div><div>Now executing my simple heat stack :<br><br><br>description: simple test<br>resources:<br>  my_instance:<br>    type: OS::Nova::Server<br>    properties:<br>      key_name: opstkcsi<br>      image: cirros2<br>      flavor: m1.small<br>      networks:<br>      - network: "0bfd37f8-779f-4b51-bb79-b03745409c15"<br><br><br><br><br></div><div>I run:<br>heat --debug stack-create -f simple.yaml simple<br><br></div><div>And the error now is changed from http 300 to 500:<br><br><br>DEBUG (session) REQ: curl -g -i -X GET <a href="http://10.102.184.83:35357/v3">http://10.102.184.83:35357/v3</a> -H "Accept: application/json" -H "User-Agent: heat keystoneauth1/2.12.2 python-requests/2.11.1 CPython/2.7.5"<br>INFO (connectionpool) Starting new HTTP connection (1): 10.102.184.83<br>DEBUG (connectionpool) "GET /v3 HTTP/1.1" 200 253<br>DEBUG (session) RESP: [200] Date: Sat, 01 Apr 2017 12:23:03 GMT Server: Apache/2.4.6 (CentOS) mod_wsgi/3.4 Python/2.7.5 Vary: X-Auth-Token x-openstack-request-id: req-ee104844-7197-4e9e-971a-2346a2fcc716 Content-Length: 253 Keep-Alive: timeout=5, max=100 Connection: Keep-Alive Content-Type: application/json <br>RESP BODY: {"version": {"status": "stable", "updated": "2016-10-06T00:00:00Z", "media-types": [{"base": "application/json", "type": "application/vnd.openstack.identity-v3+json"}], "id": "v3.7", "links": [{"href": "<a href="http://10.102.184.83:35357/v3/">http://10.102.184.83:35357/v3/</a>", "rel": "self"}]}}<br><br>DEBUG (base) Making authentication request to <a href="http://10.102.184.83:35357/v3/auth/tokens">http://10.102.184.83:35357/v3/auth/tokens</a><br>DEBUG (connectionpool) "POST /v3/auth/tokens HTTP/1.1" 201 6518<br>DEBUG (base) {"token": {"is_domain": false, "methods": ["password"], "roles": [{"id": "1f4991f9876142e482818c9a4d32a822", "name": "admin"}], "expires_at": "2017-04-01T13:23:03.000000Z", "project": {"domain": {"id": "default", "name": "Default"}, "id": "3919bd9727354f6a82d0a4feaf85dc8c", "name": "admin"}, "catalog": [{"endpoints": [{"url": "<a href="http://10.102.184.83:8000/v1">http://10.102.184.83:8000/v1</a>", "interface": "public", "region": "RegionOne", "region_id": "RegionOne", "id": "0bbf9fdfee4a4d8fbdc7f8f5daf5fae5"}, {"url": "<a href="http://10.102.184.83:8000/v1">http://10.102.184.83:8000/v1</a>", "interface": "admin", "region": "RegionOne", "region_id": "RegionOne", "id": "aa306926c7574b1aaf7683d995c80fda"}, {"url": "<a href="http://10.102.184.83:8000/v1">http://10.102.184.83:8000/v1</a>", "interface": "internal", "region": "RegionOne", "region_id": "RegionOne", "id": "cea39689301646c09f8fc625639e48bb"}], "type": "cloudformation", "id": "062a6f275773460aaf16dc87c3e8248f", "name": "heat-cfn"}, {"endpoints": [{"url": "<a href="http://10.102.184.83:9696">http://10.102.184.83:9696</a>", "interface": "public", "region": "RegionOne", "region_id": "RegionOne", "id": "6ce0146b75a44bc1b69730e4ce856f68"}, {"url": "<a href="http://10.102.184.83:9696">http://10.102.184.83:9696</a>", "interface": "admin", "region": "RegionOne", "region_id": "RegionOne", "id": "7ad03cb9c1eb4420999f979db195df4f"}, {"url": "<a href="http://10.102.184.83:9696">http://10.102.184.83:9696</a>", "interface": "internal", "region": "RegionOne", "region_id": "RegionOne", "id": "9bcf232652034580adbdaf732b30a797"}], "type": "network", "id": "2c5081ee3ff9480780cd9e23a74221f5", "name": "neutron"}, {"endpoints": [{"url": "<a href="http://10.102.184.83:8774/v2.1/3919bd9727354f6a82d0a4feaf85dc8c">http://10.102.184.83:8774/v2.1/3919bd9727354f6a82d0a4feaf85dc8c</a>", "interface": "admin", "region": "RegionOne", "region_id": "RegionOne", "id": "6981c10c692a4202bbe6c4f08aa70826"}, {"url": "<a href="http://10.102.184.83:8774/v2.1/3919bd9727354f6a82d0a4feaf85dc8c">http://10.102.184.83:8774/v2.1/3919bd9727354f6a82d0a4feaf85dc8c</a>", "interface": "public", "region": "RegionOne", "region_id": "RegionOne", "id": "b932eace25fc436098dbb0a6d653beb9"}, {"url": "<a href="http://10.102.184.83:8774/v2.1/3919bd9727354f6a82d0a4feaf85dc8c">http://10.102.184.83:8774/v2.1/3919bd9727354f6a82d0a4feaf85dc8c</a>", "interface": "internal", "region": "RegionOne", "region_id": "RegionOne", "id": "bc9a7fac693a409fa72a23a56b30355f"}], "type": "compute", "id": "76b1aa4c18b9473f96beb009b9c20fa6", "name": "nova"}, {"endpoints": [{"url": "<a href="http://10.102.184.83:8776/v2/3919bd9727354f6a82d0a4feaf85dc8c">http://10.102.184.83:8776/v2/3919bd9727354f6a82d0a4feaf85dc8c</a>", "interface": "public", "region": "RegionOne", "region_id": "RegionOne", "id": "0dcac5539e7c4d3f9d2802544f439697"}, {"url": "<a href="http://10.102.184.83:8776/v2/3919bd9727354f6a82d0a4feaf85dc8c">http://10.102.184.83:8776/v2/3919bd9727354f6a82d0a4feaf85dc8c</a>", "interface": "internal", "region": "RegionOne", "region_id": "RegionOne", "id": "585c829416254b0d9f3d214f4d4510c9"}, {"url": "<a href="http://10.102.184.83:8776/v2/3919bd9727354f6a82d0a4feaf85dc8c">http://10.102.184.83:8776/v2/3919bd9727354f6a82d0a4feaf85dc8c</a>", "interface": "admin", "region": "RegionOne", "region_id": "RegionOne", "id": "609ea825a1714e59b68e7314ee1801d4"}], "type": "volumev2", "id": "c485085f798044189d7bd1f98ae99440", "name": "cinderv2"}, {"endpoints": [{"url": "<a href="http://10.102.184.83:8777">http://10.102.184.83:8777</a>", "interface": "admin", "region": "RegionOne", "region_id": "RegionOne", "id": "0d854fa2e12f46f4b73b46c61ca44fde"}, {"url": "<a href="http://10.102.184.83:8777">http://10.102.184.83:8777</a>", "interface": "public", "region": "RegionOne", "region_id": "RegionOne", "id": "9f296b3a0f744a4090cba6210d038951"}, {"url": "<a href="http://10.102.184.83:8777">http://10.102.184.83:8777</a>", "interface": "internal", "region": "RegionOne", "region_id": "RegionOne", "id": "f9296dc9e9234c2cb9efbdf647917cd3"}], "type": "metering", "id": "cb23ccfe815346a997c6e01bf69f7154", "name": "ceilometer"}, {"endpoints": [{"url": "<a href="http://10.102.184.83:35357/v3/">http://10.102.184.83:35357/v3/</a>", "interface": "internal", "region": "RegionOne", "region_id": "RegionOne", "id": "1983eb0b878844dbbb720e8de7f3742a"}, {"url": "<a href="http://10.102.184.83:5000/v3/">http://10.102.184.83:5000/v3/</a>", "interface": "public", "region": "RegionOne", "region_id": "RegionOne", "id": "53343747f77c4fb2b0ebdf48e0c1ca7f"}, {"url": "<a href="http://10.102.184.83:35357/v3/">http://10.102.184.83:35357/v3/</a>", "interface": "admin", "region": "RegionOne", "region_id": "RegionOne", "id": "b738c671c4af4f3681138671a6838d82"}], "type": "identity", "id": "ce9ee1fe31944b28a50ed59c42d6b700", "name": "keystone"}, {"endpoints": [{"url": "<a href="http://10.102.184.83:8776/v1/3919bd9727354f6a82d0a4feaf85dc8c">http://10.102.184.83:8776/v1/3919bd9727354f6a82d0a4feaf85dc8c</a>", "interface": "public", "region": "RegionOne", "region_id": "RegionOne", "id": "05dbccddc78f4dd7b4cf9b5a6e4e7a51"}, {"url": "<a href="http://10.102.184.83:8776/v1/3919bd9727354f6a82d0a4feaf85dc8c">http://10.102.184.83:8776/v1/3919bd9727354f6a82d0a4feaf85dc8c</a>", "interface": "admin", "region": "RegionOne", "region_id": "RegionOne", "id": "7705ae601d7443d8a14808e0900eb50d"}, {"url": "<a href="http://10.102.184.83:8776/v1/3919bd9727354f6a82d0a4feaf85dc8c">http://10.102.184.83:8776/v1/3919bd9727354f6a82d0a4feaf85dc8c</a>", "interface": "internal", "region": "RegionOne", "region_id": "RegionOne", "id": "812904fec377469b876050539b880411"}], "type": "volume", "id": "eaa8023241c343d2a98d29600af8f512", "name": "cinder"}, {"endpoints": [{"url": "<a href="http://10.102.184.83:9292">http://10.102.184.83:9292</a>", "interface": "internal", "region": "RegionOne", "region_id": "RegionOne", "id": "1b636b1d6b5041f798e32df235e3ff7c"}, {"url": "<a href="http://10.102.184.83:9292">http://10.102.184.83:9292</a>", "interface": "admin", "region": "RegionOne", "region_id": "RegionOne", "id": "516251539fbc4a5b8c3080f165505ccf"}, {"url": "<a href="http://10.102.184.83:9292">http://10.102.184.83:9292</a>", "interface": "public", "region": "RegionOne", "region_id": "RegionOne", "id": "8d6c3f59e5b548fca17c6f84c806b800"}], "type": "image", "id": "f4d88c661e18480481371376db554b73", "name": "glance"}, {"endpoints": [{"url": "<a href="http://10.102.184.83:8042">http://10.102.184.83:8042</a>", "interface": "internal", "region": "RegionOne", "region_id": "RegionOne", "id": "681a97644cca407da777e14c7845c8f3"}, {"url": "<a href="http://10.102.184.83:8042">http://10.102.184.83:8042</a>", "interface": "public", "region": "RegionOne", "region_id": "RegionOne", "id": "b7d3b99fcc9547839f19dcd2642eb053"}, {"url": "<a href="http://10.102.184.83:8042">http://10.102.184.83:8042</a>", "interface": "admin", "region": "RegionOne", "region_id": "RegionOne", "id": "e783089c310646558d46e225e0c239fd"}], "type": "alarming", "id": "f746a1996ea14e7faff734137a32f879", "name": "aodh"}, {"endpoints": [{"url": "<a href="http://10.102.184.83:8004/v1/3919bd9727354f6a82d0a4feaf85dc8c">http://10.102.184.83:8004/v1/3919bd9727354f6a82d0a4feaf85dc8c</a>", "interface": "admin", "region": "RegionOne", "region_id": "RegionOne", "id": "7e7cfce48e9b4aa883ca806bdf3a2311"}, {"url": "<a href="http://10.102.184.83:8004/v1/3919bd9727354f6a82d0a4feaf85dc8c">http://10.102.184.83:8004/v1/3919bd9727354f6a82d0a4feaf85dc8c</a>", "interface": "internal", "region": "RegionOne", "region_id": "RegionOne", "id": "a6c8f27bebec4d07a8107ec092bbc439"}, {"url": "<a href="http://10.102.184.83:8004/v1/3919bd9727354f6a82d0a4feaf85dc8c">http://10.102.184.83:8004/v1/3919bd9727354f6a82d0a4feaf85dc8c</a>", "interface": "public", "region": "RegionOne", "region_id": "RegionOne", "id": "c8fa2acf08954a29b2e6bf1e6b566347"}], "type": "orchestration", "id": "f75fb3fb3b454708ba08e8bb4c57d043", "name": "heat"}], "user": {"domain": {"id": "default", "name": "Default"}, "id": "18efc2d756ba40a996a29784cc00e492", "name": "admin"}, "audit_ids": ["MCfWe0BdRuS2YcyM8YXp2g"], "issued_at": "2017-04-01T12:23:03.000000Z"}}<br>WARNING (shell) "heat stack-create" is deprecated, please use "openstack stack create" instead<br>DEBUG (session) REQ: curl -g -i -X POST <a href="http://10.102.184.83:8004/v1/3919bd9727354f6a82d0a4feaf85dc8c/stacks">http://10.102.184.83:8004/v1/3919bd9727354f6a82d0a4feaf85dc8c/stacks</a> -H "User-Agent: python-heatclient" -H "Accept: application/json" -H "X-Auth-Token: {SHA1}9982bbbc2867cbb00e59a35151e7cdfeaf39cbdd" -d '{"files": {}, "disable_rollback": true, "parameters": {}, "stack_name": "simple", "environment": {}, "template": {"heat_template_version": "2015-10-15", "description": "simple test", "resources": {"my_instance": {"type": "OS::Nova::Server", "properties": {"key_name": "opstkcsi", "image": "cirros2", "flavor": "m1.small", "networks": [{"network": "0bfd37f8-779f-4b51-bb79-b03745409c15"}]}}}}}'<br>INFO (connectionpool) Starting new HTTP connection (1): 10.102.184.83<br>DEBUG (connectionpool) "POST /v1/3919bd9727354f6a82d0a4feaf85dc8c/stacks HTTP/1.1" 400 325<br>DEBUG (session) RESP: [400] Content-Type: application/json; charset=UTF-8 Content-Length: 325 X-Openstack-Request-Id: req-30ebd832-d819-430f-acf6-ad6f2f2358d2 Date: Sat, 01 Apr 2017 12:23:04 GMT <br>RESP BODY: {"explanation": "The server could not comply with the request since it is either malformed or otherwise incorrect.", "code": 400, "error": {"message": "Property error: : resources.my_instance.properties.image: : HTTPInternalServerError (HTTP 500)", "traceback": null, "type": "StackValidationFailed"}, "title": "Bad Request"}<br><br>Traceback (most recent call last):<br>  File "/usr/bin/heat", line 10, in <module><br>    sys.exit(main())<br>  File "/usr/lib/python2.7/site-packages/heatclient/shell.py", line 612, in main<br>    HeatShell().main(args)<br>  File "/usr/lib/python2.7/site-packages/heatclient/shell.py", line 562, in main<br>    args.func(client, args)<br>  File "/usr/lib/python2.7/site-packages/heatclient/v1/shell.py", line 139, in do_stack_create<br>    hc.stacks.create(**fields)<br>  File "/usr/lib/python2.7/site-packages/heatclient/v1/stacks.py", line 172, in create<br>    data=kwargs, headers=headers)<br>  File "/usr/lib/python2.7/site-packages/keystoneauth1/adapter.py", line 193, in post<br>    return self.request(url, 'POST', **kwargs)<br>  File "/usr/lib/python2.7/site-packages/heatclient/common/http.py", line 318, in request<br>    raise exc.from_response(resp)<br>heatclient.exc.HTTPBadRequest: ERROR: Property error: : resources.my_instance.properties.image: : HTTPInternalServerError (HTTP 500)<br><br><br></div><div><br></div><div><br><br></div><div dir="auto"><div dir="auto">Probably in centos 7 newton glance api v1 does not work?  </div><div dir="auto">The sale configuration world come in newton in Ubuntu 16.</div></div></div><div class="gmail_extra"><br><div class="gmail_quote">Il 01/Apr/2017 13:51, "Brian Rosmaita" <<a href="mailto:rosmaita.fossdev@gmail.com" target="_blank">rosmaita.fossdev@gmail.com</a>> ha scritto:<br type="attribution"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hello Ignazio.  A few things:<br>
<br>
(1) You can run both glance v1 and v2 simultaneously.  They share the<br>
same database and storage backend.  The difference is that you, as a<br>
client, interact with the APIs in different ways (v1 does a lot of<br>
info-passing in http headers, v2 does everything in JSON; v2 has more<br>
features because we've stopped development on v1 except for critical<br>
bugfixes).<br>
<br>
(2) (see below)<br>
<br>
(3) (see below)<br>
<br>
Hope this helps!<br>
brian<br>
<br>
<br>
On 3/31/17 3:55 PM, Ignazio Cassano wrote:<br>
> I've just tried to disableglance v2 api and load a new image cirros2, but<br>
> If I show it:<br>
><br>
>  Field            | Value                                                |<br>
> +------------------+----------<wbr>------------------------------<wbr>--------------+<br>
> | checksum         | ee1eca47dc88f4879d8a229cc70a07<wbr>c6                     |<br>
> | container_format | bare                                                 |<br>
> | created_at       | 2017-03-31T19:47:52Z                                 |<br>
> | disk_format      | qcow2                                                |<br>
> | file             | /v2/images/e9794e0b-73e5-4a91-<wbr>9159-5701e521b289/file |<br>
<br>
(2) This isn't actually the image's location.  This is just the URL<br>
you'd use to get the image data via the v2 API.  The /v2 part tells the<br>
glance router that the v2 API needs to handle the request, and the v2<br>
API knows how to read this "file" URL to locate the data you're<br>
requesting in whatever storage backend Glance is configured to use.<br>
<br>
> | id               | e9794e0b-73e5-4a91-9159-5701e5<wbr>21b289                 |<br>
> | min_disk         | 0                                                    |<br>
> | min_ram          | 0                                                    |<br>
> | name             | cirros2                                              |<br>
> | owner            | 3919bd9727354f6a82d0a4feaf85dc<wbr>8c                     |<br>
> | protected        | False                                                |<br>
> | schema           | /v2/schemas/image                                    |<br>
> | size             | 13287936                                             |<br>
> | status           | active                                               |<br>
> | tags             |                                                      |<br>
> | updated_at       | 2017-03-31T19:47:52Z                                 |<br>
> | virtual_size     | None                                                 |<br>
> | visibility       | public                                               |<br>
> +------------------+----------<wbr>------------------------------<wbr>--------------+<br>
><br>
> It seems to  under /v2 :-(<br>
> So an heat stack with cirros2 does not work anycase<br>
><br>
><br>
><br>
><br>
> 2017-03-31 21:07 GMT+02:00 Brian Rosmaita <<a href="mailto:rosmaita.fossdev@gmail.com" target="_blank">rosmaita.fossdev@gmail.com</a>>:<br>
><br>
>> On 3/31/17 10:52 AM, Ignazio Cassano wrote:<br>
>>> Hi all,<br>
>>> I just installed openstack newton on centos 7 and enabled glance with v2<br>
>>> api.<br>
<br>
(3) Make sure you keep the Images v2 API enabled as well as enabling v1.<br>
 Newton is the release where Nova began using the Image v2 API to<br>
communicate with Glance.<br>
<br>
>>> When I execute a simple heat stack, it returns the following error:<br>
>>><br>
>>> ERROR: Property error: : resources.my_instance.properti<wbr>es.image: :<br>
>>> HTTPMultipleChoices (HTTP 300) Requested version of OpenStack Images API<br>
>> is<br>
>>> not available.<br>
>><br>
>> Hi Ignazio.  I'm pretty sure Newton Heat still requires the Images v1<br>
>> API, so you'll need to make sure it's enabled in your installation.<br>
>><br>
>> cheers,<br>
>> brian<br>
>><br>
>>><br>
>>> the following is my very simple stack:<br>
>>><br>
>>> heat_template_version: 2015-10-15<br>
>>> description: simple test<br>
>>> resources:<br>
>>>   my_instance:<br>
>>>     type: OS::Nova::Server<br>
>>>     properties:<br>
>>>       key_name: opstkcsi<br>
>>>       image: cirros<br>
>>>       flavor: m1.small<br>
>>>       networks:<br>
>>>       - network: "0bfd37f8-779f-4b51-bb79-b0374<wbr>5409c15"<br>
>>><br>
>>><br>
>>> I am able to create instances from image using the dashboard and creating<br>
>>> volume from images but it does not work.<br>
>>> Please, help me !!!<br>
>>> Thanks<br>
>>> Ignazio<br>
>>><br>
>>><br>
>>><br>
>>> ______________________________<wbr>_________________<br>
>>> OpenStack-operators mailing list<br>
>>> <a href="mailto:OpenStack-operators@lists.openstack.org" target="_blank">OpenStack-operators@lists.open<wbr>stack.org</a><br>
>>> <a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-operators" rel="noreferrer" target="_blank">http://lists.openstack.org/cgi<wbr>-bin/mailman/listinfo/openstac<wbr>k-operators</a><br>
>>><br>
>><br>
>><br>
><br>
<br>
</blockquote></div></div>
</div>