Tested configuration in the cluster. Heat now works as expexted. Registry_host address must be the host address not the cluster vip. Regards Ignazio
Il 01/Apr/2017 16:40, "Ignazio Cassano" <ignaziocass...@gmail.com> ha scritto: > Hi again, I hope the configuration in previous message will work when I > 'll enable the cluster. > I am going to test it. > Many thanks for your help. > Ignazio > > Il 01/Apr/2017 15:22, "Ignazio Cassano" <ignaziocass...@gmail.com> ha > scritto: > >> Hi Brian, >> I found where is the problem >> In glance-api.conf I must setup the registry_host entry and it must be >> equal to the bind_host entry in the file glance-registry.conf. >> So, enable v1 api and the abive parameters, heat works. >> My problem is that I am using 3 controllers and the bind_host in the >> registry cannot be equal to glance-api.conf registry_host because I must >> use the VIP of the cluster :-( >> >> 2017-04-01 14:38 GMT+02:00 Ignazio Cassano <ignaziocass...@gmail.com>: >> >>> Hi Brian, when I enable v1 and v2 api in glance-api.conf , using the >>> same heat template I got http 500. >>> Now in my glance-api.conf I have the same configuration used on ubuntu >>> 16 (whete heat works fine): >>> #enable_v1_api = false >>> #enable_v1_registry = true >>> #enable_v2_api = true >>> #enable_v2_registry = true >>> >>> The above probably enables either ve or v1 glance apis, because whani I >>> start glance api server it reports in its log: >>> >>> 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 >>> >>> >>> Now executing my simple heat stack : >>> >>> >>> 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" >>> >>> >>> >>> >>> I run: >>> heat --debug stack-create -f simple.yaml simple >>> >>> And the error now is changed from http 300 to 500: >>> >>> >>> DEBUG (session) REQ: curl -g -i -X GET http://10.102.184.83:35357/v3 -H >>> "Accept: application/json" -H "User-Agent: heat keystoneauth1/2.12.2 >>> python-requests/2.11.1 CPython/2.7.5" >>> INFO (connectionpool) Starting new HTTP connection (1): 10.102.184.83 >>> DEBUG (connectionpool) "GET /v3 HTTP/1.1" 200 253 >>> 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 >>> 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": "http://10.102.184.83:35357/v3/", "rel": "self"}]}} >>> >>> DEBUG (base) Making authentication request to >>> http://10.102.184.83:35357/v3/auth/tokens >>> DEBUG (connectionpool) "POST /v3/auth/tokens HTTP/1.1" 201 6518 >>> 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": " >>> http://10.102.184.83:8000/v1", "interface": "public", "region": >>> "RegionOne", "region_id": "RegionOne", "id": >>> "0bbf9fdfee4a4d8fbdc7f8f5daf5fae5"}, >>> {"url": "http://10.102.184.83:8000/v1", "interface": "admin", "region": >>> "RegionOne", "region_id": "RegionOne", "id": >>> "aa306926c7574b1aaf7683d995c80fda"}, >>> {"url": "http://10.102.184.83:8000/v1", "interface": "internal", >>> "region": "RegionOne", "region_id": "RegionOne", "id": >>> "cea39689301646c09f8fc625639e48bb"}], "type": "cloudformation", "id": >>> "062a6f275773460aaf16dc87c3e8248f", "name": "heat-cfn"}, {"endpoints": >>> [{"url": "http://10.102.184.83:9696", "interface": "public", "region": >>> "RegionOne", "region_id": "RegionOne", "id": >>> "6ce0146b75a44bc1b69730e4ce856f68"}, >>> {"url": "http://10.102.184.83:9696", "interface": "admin", "region": >>> "RegionOne", "region_id": "RegionOne", "id": >>> "7ad03cb9c1eb4420999f979db195df4f"}, >>> {"url": "http://10.102.184.83:9696", "interface": "internal", "region": >>> "RegionOne", "region_id": "RegionOne", "id": >>> "9bcf232652034580adbdaf732b30a797"}], >>> "type": "network", "id": "2c5081ee3ff9480780cd9e23a74221f5", "name": >>> "neutron"}, {"endpoints": [{"url": "http://10.102.184.83:8774/v2. >>> 1/3919bd9727354f6a82d0a4feaf85dc8c", "interface": "admin", "region": >>> "RegionOne", "region_id": "RegionOne", "id": >>> "6981c10c692a4202bbe6c4f08aa70826"}, >>> {"url": "http://10.102.184.83:8774/v2.1/3919bd9727354f6a82d0a4feaf85dc8c", >>> "interface": "public", "region": "RegionOne", "region_id": "RegionOne", >>> "id": "b932eace25fc436098dbb0a6d653beb9"}, {"url": " >>> http://10.102.184.83:8774/v2.1/3919bd9727354f6a82d0a4feaf85dc8c", >>> "interface": "internal", "region": "RegionOne", "region_id": "RegionOne", >>> "id": "bc9a7fac693a409fa72a23a56b30355f"}], "type": "compute", "id": >>> "76b1aa4c18b9473f96beb009b9c20fa6", "name": "nova"}, {"endpoints": >>> [{"url": "http://10.102.184.83:8776/v2/3919bd9727354f6a82d0a4feaf85dc8c", >>> "interface": "public", "region": "RegionOne", "region_id": "RegionOne", >>> "id": "0dcac5539e7c4d3f9d2802544f439697"}, {"url": " >>> http://10.102.184.83:8776/v2/3919bd9727354f6a82d0a4feaf85dc8c", >>> "interface": "internal", "region": "RegionOne", "region_id": "RegionOne", >>> "id": "585c829416254b0d9f3d214f4d4510c9"}, {"url": " >>> http://10.102.184.83:8776/v2/3919bd9727354f6a82d0a4feaf85dc8c", >>> "interface": "admin", "region": "RegionOne", "region_id": "RegionOne", >>> "id": "609ea825a1714e59b68e7314ee1801d4"}], "type": "volumev2", "id": >>> "c485085f798044189d7bd1f98ae99440", "name": "cinderv2"}, {"endpoints": >>> [{"url": "http://10.102.184.83:8777", "interface": "admin", "region": >>> "RegionOne", "region_id": "RegionOne", "id": >>> "0d854fa2e12f46f4b73b46c61ca44fde"}, >>> {"url": "http://10.102.184.83:8777", "interface": "public", "region": >>> "RegionOne", "region_id": "RegionOne", "id": >>> "9f296b3a0f744a4090cba6210d038951"}, >>> {"url": "http://10.102.184.83:8777", "interface": "internal", "region": >>> "RegionOne", "region_id": "RegionOne", "id": >>> "f9296dc9e9234c2cb9efbdf647917cd3"}], >>> "type": "metering", "id": "cb23ccfe815346a997c6e01bf69f7154", "name": >>> "ceilometer"}, {"endpoints": [{"url": "http://10.102.184.83:35357/v3/", >>> "interface": "internal", "region": "RegionOne", "region_id": "RegionOne", >>> "id": "1983eb0b878844dbbb720e8de7f3742a"}, {"url": " >>> http://10.102.184.83:5000/v3/", "interface": "public", "region": >>> "RegionOne", "region_id": "RegionOne", "id": >>> "53343747f77c4fb2b0ebdf48e0c1ca7f"}, >>> {"url": "http://10.102.184.83:35357/v3/", "interface": "admin", >>> "region": "RegionOne", "region_id": "RegionOne", "id": >>> "b738c671c4af4f3681138671a6838d82"}], "type": "identity", "id": >>> "ce9ee1fe31944b28a50ed59c42d6b700", "name": "keystone"}, {"endpoints": >>> [{"url": "http://10.102.184.83:8776/v1/3919bd9727354f6a82d0a4feaf85dc8c", >>> "interface": "public", "region": "RegionOne", "region_id": "RegionOne", >>> "id": "05dbccddc78f4dd7b4cf9b5a6e4e7a51"}, {"url": " >>> http://10.102.184.83:8776/v1/3919bd9727354f6a82d0a4feaf85dc8c", >>> "interface": "admin", "region": "RegionOne", "region_id": "RegionOne", >>> "id": "7705ae601d7443d8a14808e0900eb50d"}, {"url": " >>> http://10.102.184.83:8776/v1/3919bd9727354f6a82d0a4feaf85dc8c", >>> "interface": "internal", "region": "RegionOne", "region_id": "RegionOne", >>> "id": "812904fec377469b876050539b880411"}], "type": "volume", "id": >>> "eaa8023241c343d2a98d29600af8f512", "name": "cinder"}, {"endpoints": >>> [{"url": "http://10.102.184.83:9292", "interface": "internal", >>> "region": "RegionOne", "region_id": "RegionOne", "id": >>> "1b636b1d6b5041f798e32df235e3ff7c"}, {"url": "http://10.102.184.83:9292", >>> "interface": "admin", "region": "RegionOne", "region_id": "RegionOne", >>> "id": "516251539fbc4a5b8c3080f165505ccf"}, {"url": " >>> http://10.102.184.83:9292", "interface": "public", "region": >>> "RegionOne", "region_id": "RegionOne", "id": >>> "8d6c3f59e5b548fca17c6f84c806b800"}], >>> "type": "image", "id": "f4d88c661e18480481371376db554b73", "name": >>> "glance"}, {"endpoints": [{"url": "http://10.102.184.83:8042", >>> "interface": "internal", "region": "RegionOne", "region_id": "RegionOne", >>> "id": "681a97644cca407da777e14c7845c8f3"}, {"url": " >>> http://10.102.184.83:8042", "interface": "public", "region": >>> "RegionOne", "region_id": "RegionOne", "id": >>> "b7d3b99fcc9547839f19dcd2642eb053"}, >>> {"url": "http://10.102.184.83:8042", "interface": "admin", "region": >>> "RegionOne", "region_id": "RegionOne", "id": >>> "e783089c310646558d46e225e0c239fd"}], >>> "type": "alarming", "id": "f746a1996ea14e7faff734137a32f879", "name": >>> "aodh"}, {"endpoints": [{"url": "http://10.102.184.83:8004/v1/ >>> 3919bd9727354f6a82d0a4feaf85dc8c", "interface": "admin", "region": >>> "RegionOne", "region_id": "RegionOne", "id": >>> "7e7cfce48e9b4aa883ca806bdf3a2311"}, >>> {"url": "http://10.102.184.83:8004/v1/3919bd9727354f6a82d0a4feaf85dc8c", >>> "interface": "internal", "region": "RegionOne", "region_id": "RegionOne", >>> "id": "a6c8f27bebec4d07a8107ec092bbc439"}, {"url": " >>> http://10.102.184.83:8004/v1/3919bd9727354f6a82d0a4feaf85dc8c", >>> "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"}} >>> WARNING (shell) "heat stack-create" is deprecated, please use "openstack >>> stack create" instead >>> DEBUG (session) REQ: curl -g -i -X POST http://10.102.184.83:8004/v1/3 >>> 919bd9727354f6a82d0a4feaf85dc8c/stacks -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"}]}}}}}' >>> INFO (connectionpool) Starting new HTTP connection (1): 10.102.184.83 >>> DEBUG (connectionpool) "POST /v1/3919bd9727354f6a82d0a4feaf85dc8c/stacks >>> HTTP/1.1" 400 325 >>> 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 >>> 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"} >>> >>> Traceback (most recent call last): >>> File "/usr/bin/heat", line 10, in <module> >>> sys.exit(main()) >>> File "/usr/lib/python2.7/site-packages/heatclient/shell.py", line >>> 612, in main >>> HeatShell().main(args) >>> File "/usr/lib/python2.7/site-packages/heatclient/shell.py", line >>> 562, in main >>> args.func(client, args) >>> File "/usr/lib/python2.7/site-packages/heatclient/v1/shell.py", line >>> 139, in do_stack_create >>> hc.stacks.create(**fields) >>> File "/usr/lib/python2.7/site-packages/heatclient/v1/stacks.py", line >>> 172, in create >>> data=kwargs, headers=headers) >>> File "/usr/lib/python2.7/site-packages/keystoneauth1/adapter.py", >>> line 193, in post >>> return self.request(url, 'POST', **kwargs) >>> File "/usr/lib/python2.7/site-packages/heatclient/common/http.py", >>> line 318, in request >>> raise exc.from_response(resp) >>> heatclient.exc.HTTPBadRequest: ERROR: Property error: : >>> resources.my_instance.properties.image: : HTTPInternalServerError (HTTP >>> 500) >>> >>> >>> >>> >>> >>> Probably in centos 7 newton glance api v1 does not work? >>> The sale configuration world come in newton in Ubuntu 16. >>> >>> Il 01/Apr/2017 13:51, "Brian Rosmaita" <rosmaita.foss...@gmail.com> ha >>> scritto: >>> >>>> Hello Ignazio. A few things: >>>> >>>> (1) You can run both glance v1 and v2 simultaneously. They share the >>>> same database and storage backend. The difference is that you, as a >>>> client, interact with the APIs in different ways (v1 does a lot of >>>> info-passing in http headers, v2 does everything in JSON; v2 has more >>>> features because we've stopped development on v1 except for critical >>>> bugfixes). >>>> >>>> (2) (see below) >>>> >>>> (3) (see below) >>>> >>>> Hope this helps! >>>> brian >>>> >>>> >>>> On 3/31/17 3:55 PM, Ignazio Cassano wrote: >>>> > I've just tried to disableglance v2 api and load a new image cirros2, >>>> but >>>> > If I show it: >>>> > >>>> > Field | Value >>>> | >>>> > +------------------+---------------------------------------- >>>> --------------+ >>>> > | checksum | ee1eca47dc88f4879d8a229cc70a07c6 >>>> | >>>> > | container_format | bare >>>> | >>>> > | created_at | 2017-03-31T19:47:52Z >>>> | >>>> > | disk_format | qcow2 >>>> | >>>> > | file | /v2/images/e9794e0b-73e5-4a91-9159-5701e521b289/file >>>> | >>>> >>>> (2) This isn't actually the image's location. This is just the URL >>>> you'd use to get the image data via the v2 API. The /v2 part tells the >>>> glance router that the v2 API needs to handle the request, and the v2 >>>> API knows how to read this "file" URL to locate the data you're >>>> requesting in whatever storage backend Glance is configured to use. >>>> >>>> > | id | e9794e0b-73e5-4a91-9159-5701e521b289 >>>> | >>>> > | min_disk | 0 >>>> | >>>> > | min_ram | 0 >>>> | >>>> > | name | cirros2 >>>> | >>>> > | owner | 3919bd9727354f6a82d0a4feaf85dc8c >>>> | >>>> > | protected | False >>>> | >>>> > | schema | /v2/schemas/image >>>> | >>>> > | size | 13287936 >>>> | >>>> > | status | active >>>> | >>>> > | tags | >>>> | >>>> > | updated_at | 2017-03-31T19:47:52Z >>>> | >>>> > | virtual_size | None >>>> | >>>> > | visibility | public >>>> | >>>> > +------------------+---------------------------------------- >>>> --------------+ >>>> > >>>> > It seems to under /v2 :-( >>>> > So an heat stack with cirros2 does not work anycase >>>> > >>>> > >>>> > >>>> > >>>> > 2017-03-31 21:07 GMT+02:00 Brian Rosmaita <rosmaita.foss...@gmail.com >>>> >: >>>> > >>>> >> On 3/31/17 10:52 AM, Ignazio Cassano wrote: >>>> >>> Hi all, >>>> >>> I just installed openstack newton on centos 7 and enabled glance >>>> with v2 >>>> >>> api. >>>> >>>> (3) Make sure you keep the Images v2 API enabled as well as enabling v1. >>>> Newton is the release where Nova began using the Image v2 API to >>>> communicate with Glance. >>>> >>>> >>> When I execute a simple heat stack, it returns the following error: >>>> >>> >>>> >>> ERROR: Property error: : resources.my_instance.properties.image: : >>>> >>> HTTPMultipleChoices (HTTP 300) Requested version of OpenStack >>>> Images API >>>> >> is >>>> >>> not available. >>>> >> >>>> >> Hi Ignazio. I'm pretty sure Newton Heat still requires the Images v1 >>>> >> API, so you'll need to make sure it's enabled in your installation. >>>> >> >>>> >> cheers, >>>> >> brian >>>> >> >>>> >>> >>>> >>> the following is my very simple stack: >>>> >>> >>>> >>> heat_template_version: 2015-10-15 >>>> >>> description: simple test >>>> >>> resources: >>>> >>> my_instance: >>>> >>> type: OS::Nova::Server >>>> >>> properties: >>>> >>> key_name: opstkcsi >>>> >>> image: cirros >>>> >>> flavor: m1.small >>>> >>> networks: >>>> >>> - network: "0bfd37f8-779f-4b51-bb79-b03745409c15" >>>> >>> >>>> >>> >>>> >>> I am able to create instances from image using the dashboard and >>>> creating >>>> >>> volume from images but it does not work. >>>> >>> Please, help me !!! >>>> >>> Thanks >>>> >>> Ignazio >>>> >>> >>>> >>> >>>> >>> >>>> >>> _______________________________________________ >>>> >>> OpenStack-operators mailing list >>>> >>> OpenStack-operators@lists.openstack.org >>>> >>> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstac >>>> k-operators >>>> >>> >>>> >> >>>> >> >>>> > >>>> >>>> >>
_______________________________________________ OpenStack-operators mailing list OpenStack-operators@lists.openstack.org http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-operators