[SSL]Heat is using public endpoints of nova when try to validate heat template

Bug #1479325 reported by Tatyanka
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Fuel for OpenStack
Fix Released
High
Stanislaw Bogatkin

Bug Description

Steps:
1. Deploy cluster
os: Ubuntu
neutron vlan
1 controller
1 compute
1 cinder and enabled ssl for openstack
2. As soon as cluster is ready run ostf tests

Expected result:
all tests are passed. Heat is using internal endpoints of services when validated templates

Actual result:
all heat tests are failed when try to validate template. According to request to public endpoints:
fuel_health.common.test_mixins: INFO: STEP:2, verify action: 'stack creation' fuel_health.heatmanager: DEBUG: Creation of desired stack... heatclient.common.http: DEBUG: curl -i -X POST -H 'X-Auth-Token: {SHA1}3fc6ef3e4fe0691cfc9db6568393eac12aedce0f' -H 'Content-Type: application/json' -H 'Accept: application/json' -H 'User-Agent: python-heatclient' -d '{"stack_name": "ost1_test-heat-stack-285352408", "disable_rollback": true, "parameters": {"network": "ad530d81-4fcc-4d55-bc8e-074f2dc6339c", "InstanceType": "ost1_test-heat-flavor-1542795752", "ImageId": "TestVM"}, "template": "heat_template_version: '2013-05-23'\ndescription: |\n Template which creates single instance\nparameters:\n InstanceType:\n type: string\n ImageId:\n type: string\n network:\n type: string\nresources:\n Server:\n type: OS::Nova::Server\n properties:\n name: ost1-test_heat\n image: {get_param: ImageId}\n flavor: {get_param: InstanceType}\n flavor_update_policy: REPLACE\n networks:\n - network: {Ref: network}\noutputs:\n servers:\n value:\n get_resource: Server\n"}' http://10.109.2.3:8004/v1/560a0775baa54459b21dc2e8f5354026/stacks urllib3.connectionpool: INFO: Starting new HTTP connection (1): 10.109.0.3 urllib3.connectionpool: DEBUG: Setting read timeout to None urllib3.connectionpool: DEBUG: "POST http://10.109.2.3:8004/v1/560a0775baa54459b21dc2e8f5354026/stacks HTTP/1.1" 400 1145 heatclient.common.http: DEBUG: HTTP/1.1 400 Bad Request content-length: 1145 via: 1.1 apache_api_proxy:8004 server: Apache/2.4.7 (Ubuntu) connection: close date: Wed, 29 Jul 2015 11:33:12 GMT content-type: application/json; charset=UTF-8 x-openstack-request-id: req-9ab30fcc-961a-426c-ba71-8c5c40e548cd {"explanation": "The server could not comply with the request since it is either malformed or otherwise incorrect.", "code": 400, "error": {"message": "Property error : : resources.Server.properties.flavor: : hostname '10.109.1.3' doesn't match u'public.fuel.local'", "traceback": "Traceback (most recent call last):\n\n File \"/usr/lib/python2.7/dist-packages/heat/common/context.py\", line 300, in wrapped\n return func(self, ctx, *args, **kwargs)\n\n File \"/usr/lib/python2.7/dist-packages/heat/engine/service.py\", line 669, in create_stack\n parent_resource_name)\n\n File \"/usr/lib/python2.7/dist-packages/heat/engine/service.py\", line 577, in _parse_template_and_validate_stack\n stack.validate()\n\n File \"/usr/lib/python2.7/dist-packages/osprofiler/profiler.py\", line 105, in wrapper\n return f(*args, **kwargs)\n\n File \"/usr/lib/python2.7/dist-packages/heat/engine/stack.py\", line 619, in validate\n raise ex\n\nStackValidationFailed: Property error : resources.Server.properties.flavor: hostname '10.109.1.3' doesn't match u'public.fuel.local'\n", "type": "StackValidationFailed"}, "title": "Bad Request"} fuel_health.common.test_mixins: DEBUG: Traceback (most recent call last): File "/usr/lib/python2.6/site-packages/fuel_health/common/test_mixins.py", line 177, in verify result = func(*args, **kwargs) File "/usr/lib/python2.6/site-packages/fuel_health/heatmanager.py", line 75, in create_stack disable_rollback=disable_rollback File "/usr/lib/python2.6/site-packages/heatclient/v1/stacks.py", line 119, in create data=kwargs, headers=headers) File "/usr/lib/python2.6/site-packages/heatclient/common/http.py", line 254, in json_request resp = self._http_request(url, method, **kwargs) File "/usr/lib/python2.6/site-packages/heatclient/common/http.py", line 209, in _http_request raise exc.from_response(resp) HTTPBadRequest: ERROR: Property error : : resources.Server.properties.flavor: : hostname '10.109.1.3' doesn't match u'public.fuel.local'

[root@nailgun ~]# cat /etc/fuel/version.yaml
VERSION:
  feature_groups:
    - mirantis
  production: "docker"
  release: "7.0"
  openstack_version: "2015.1.0-7.0"
  api: "1.0"
  build_number: "103"
  build_id: "2015-07-28_12-51-16"
  nailgun_sha: "d7fe1047caeb4503970c7d39689e133b28b85b22"
  python-fuelclient_sha: "f04e6c46783ecd6000df31b61b6749da66d4d828"
  fuel-agent_sha: "2a65f11c10b0aeb5184247635a19740fc3edde21"
  fuel-nailgun-agent_sha: "1512b9af6b41cc95c4d891c593aeebe0faca5a63"
  astute_sha: "34e0493afa22999c4a07d3198ceb945116ab7932"
  fuel-library_sha: "8e64ae8e018d5b119c8e2ea49f6a83467b970a66"
  fuel-ostf_sha: "9e32b35e9a774eec41b86cd5a6c63b71a3efa4bd"
  fuelmain_sha: "0d6ff4c9ec156196cc4d9a36db314ba7346942f7"

Revision history for this message
Tatyanka (tatyana-leontovich) wrote :
Changed in fuel:
status: New → Confirmed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to fuel-library (master)

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

Changed in fuel:
status: Confirmed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to fuel-library (master)

Reviewed: https://review.openstack.org/208540
Committed: https://git.openstack.org/cgit/stackforge/fuel-library/commit/?id=cd6894490a5d249d4c19e7e3d567631c53c38bad
Submitter: Jenkins
Branch: master

commit cd6894490a5d249d4c19e7e3d567631c53c38bad
Author: Stanislaw Bogatkin <email address hidden>
Date: Mon Aug 3 18:54:59 2015 +0300

    Switch heat to use internal URLs instead of public ones

    Heat used public VIP for metadata, waitcondition and watch
    servers URL by default. This patch switch it to use
    management VIP for those URLs.

    Change-Id: Ieb3d65f859d2df349e997ed6ff76b680f51b87f3
    Closes-Bug: #1479325

Changed in fuel:
status: In Progress → Fix Committed
Revision history for this message
Alexander Kurenyshev (akurenyshev) wrote :

Verified on the #265 ISO.

Steps used to verify:

1) Install master node
2) Create cluster with 3 controllers, 2 computes and 1 cinder. Enables SSL for horizon
3) Deploy cluster
4) Run OSTF

Result:
All tests are passed.

Changed in fuel:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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