Sahara uses publicURL by default

Bug #1478050 reported by Denis Egorenko
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mirantis OpenStack
Fix Released
High
Sergey Reshetnyak

Bug Description

Sahara uses publicURL for all actions and it's wrong - it should be internalURL instead.

The main problem is that when we use SSL it will occurs errors like:

2015-07-24 14:38:23.895 15216 ERROR sahara.utils.api [-] Request aborted with status code 500 and message 'Error occurred during validation'
2015-07-24 14:38:23.896 15216 ERROR sahara.utils.api [-] Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/sahara/service/validation.py", line 37, in handler
    validator(**kwargs)
  File "/usr/lib/python2.7/dist-packages/sahara/service/validations/node_group_templates.py", line 29, in check_node_group_template_create
    data['hadoop_version'], data)
  File "/usr/lib/python2.7/dist-packages/sahara/service/validations/base.py", line 135, in check_node_group_basic_fields
    check_flavor_exists(ng['flavor_id'])
  File "/usr/lib/python2.7/dist-packages/sahara/service/validations/base.py", line 165, in check_flavor_exists
    flavor_list = nova.client().flavors.list()
  File "/usr/lib/python2.7/dist-packages/novaclient/v2/flavors.py", line 114, in list
    return self._list("/flavors%s%s" % (detail, query_string), "flavors")
  File "/usr/lib/python2.7/dist-packages/novaclient/base.py", line 64, in _list
    _resp, body = self.api.client.get(url)
  File "/usr/lib/python2.7/dist-packages/novaclient/client.py", line 444, in get
    return self._cs_request(url, 'GET', **kwargs)
  File "/usr/lib/python2.7/dist-packages/novaclient/client.py", line 422, in _cs_request
    resp, body = self._time_request(url, method, **kwargs)
  File "/usr/lib/python2.7/dist-packages/novaclient/client.py", line 393, in _time_request
    resp, body = self.request(url, method, **kwargs)
  File "/usr/lib/python2.7/dist-packages/novaclient/client.py", line 364, in request
    **kwargs)
  File "/usr/lib/python2.7/dist-packages/requests/api.py", line 44, in request
    return session.request(method=method, url=url, **kwargs)
  File "/usr/lib/python2.7/dist-packages/requests/sessions.py", line 455, in request
    resp = self.send(prep, **send_kwargs)
  File "/usr/lib/python2.7/dist-packages/requests/sessions.py", line 558, in send
    r = adapter.send(request, **kwargs)
  File "/usr/lib/python2.7/dist-packages/requests/adapters.py", line 385, in send
    raise SSLError(e)
SSLError: hostname '172.16.0.7' doesn't match u'public.fuel.local'

2015-07-24 14:38:23.906 15216 INFO sahara.utils.wsgi [-] 192.168.0.5 - - [24/Jul/2015 14:38:23] "POST /v1.1/4e7c947e64e84b6e8207a7cd617f1392/node-group-templates HTTP/1.1" 500 258 0.158425

It will works if we specified insecure options in sahara.conf.

Tags: sahara
Changed in mos:
assignee: MOS Sahara (mos-sahara) → Sergey Reshetnyak (sreshetniak)
status: New → Triaged
Revision history for this message
Sergey Reshetnyak (sreshetniak) wrote :
Changed in mos:
status: Triaged → In Progress
Revision history for this message
Fuel Devops McRobotson (fuel-devops-robot) wrote : Fix proposed to openstack/sahara (openstack-ci/fuel-7.0/2015.1.0)

Fix proposed to branch: openstack-ci/fuel-7.0/2015.1.0
Change author: Sergey Reshetnyak <email address hidden>
Review: https://review.fuel-infra.org/9885

Revision history for this message
Fuel Devops McRobotson (fuel-devops-robot) wrote : Fix merged to openstack/sahara (openstack-ci/fuel-7.0/2015.1.0)

Reviewed: https://review.fuel-infra.org/9885
Submitter: mos-infra-ci <>
Branch: openstack-ci/fuel-7.0/2015.1.0

Commit: abc8196e24c97bad8a005ae42649b545d25257d7
Author: Sergey Reshetnyak <email address hidden>
Date: Mon Jul 27 14:16:16 2015

Use internalURL endpoint by default in Sahara

Changes:
* use internalURL endpoint for connect to OS clients
* getting neutron url in neutron module instead ssh_remote module

Closes-bug: #1478050

Change-Id: I560c9aebe67ba2e69ae521052483801fd12b17fc
(cherry picked from commit 176b16a073046db085ec28955b3d77b777eef908)

Changed in mos:
status: In Progress → Fix Committed
Revision history for this message
Evgeny Sikachev (esikachev) wrote :

verified on 265 iso

Changed in mos:
status: Fix Committed → Fix Released
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.