UI doesn't work without manual update on HTTP undercloud

Bug #1663199 reported by Julie Pichon
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
tripleo
Fix Released
High
Dan Trainor

Bug Description

Even when setting up the undercloud without SSL, puppet generates a configuration file that assumes we're using a version of the new HAProxy URLs (cf. https://blueprints.launchpad.net/tripleo/+spec/proxy-undercloud-api-services ):

window.tripleOUiConfig = {
  "keystone": "http://192.168.24.1:5000/keystone/v2.0",
  "heat": "http://192.168.24.1:8004/heat/v1/%(tenant_id)s",
  "ironic": "http://192.168.24.1:6385/ironic",
  "mistral": "http://192.168.24.1:8989/mistral/v2",
  "swift": "http://192.168.24.1:8080/swift/v1/AUTH_%(tenant_id)s",
  "zaqar-websocket": "ws://192.168.24.1:9000/zaqar",

  // Default websocket queue name
  "zaqar_default_queue": "tripleo"
};

This doesn't work when running a HTTP undercloud. The UI is displayed correctly on port 3000 but the user can't log in as http://192.168.24.1:5000/keystone/v2.0/tokens returns a 404.

The workaround is to manually modify /var/www/openstack-tripleo-ui/dist/tripleo_ui_config.js to use the regular URLs:

window.tripleOUiConfig = {
  "keystone": "http://192.168.24.1:5000/v2.0",
  "heat": "http://192.168.24.1:8004/v1/%(tenant_id)s",
  "ironic": "http://192.168.24.1:6385",
  "mistral": "http://192.168.24.1:8989/v2",
  "swift": "http://192.168.24.1:8080/v1/AUTH_%(tenant_id)s",
  "zaqar-websocket": "ws://192.168.24.1:9000",

  // Default websocket queue name
  "zaqar_default_queue": "tripleo"
};

Revision history for this message
Dan Trainor (dtrainor) wrote :

What needs to happen is that the public_host specification needs to be changed to 3000, instead of the service's default port. Note that this change would only affect the *-ui-config endpoints generated by undercloud.py, such as:

https://github.com/openstack/instack-undercloud/blob/master/instack_undercloud/undercloud.py#L722

These endpoints are only used in the configuration of tripleo_ui_config.js based on a template from the puppet-tripleo package so this change will not affect any other components.

Revision history for this message
Dan Trainor (dtrainor) wrote :

With these proposed changes, the contents of tripleo_ui_config.js would end up looking like:

window.tripleOUiConfig = {
  "keystone": "http://192.168.24.1:3000/keystone/v2.0",
  "heat": "http://192.168.24.1:3000/heat/v1/%(tenant_id)s",
  "ironic": "http://192.168.24.1:3000/ironic",
  "mistral": "http://192.168.24.1:3000/mistral/v2",
  "swift": "http://192.168.24.1:3000/swift/v1/AUTH_%(tenant_id)s",
  "zaqar-websocket": "ws://192.168.24.1:3000/zaqar",

  // Default websocket queue name
  "zaqar_default_queue": "tripleo"
};

Revision history for this message
Dan Trainor (dtrainor) wrote :

Correction:

* What needs to happen is that the public_host _port_ specification needs to be changed to 3000, instead of the service's default port.

Dan Trainor (dtrainor)
Changed in tripleo:
assignee: nobody → Dan Trainor (dtrainor)
Revision history for this message
Dan Trainor (dtrainor) wrote :

Since this only applies to endpoints created by *-ui-config, this change applies to both public_host and internal_host.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to instack-undercloud (master)

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

Changed in tripleo:
status: Triaged → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to instack-undercloud (master)

Reviewed: https://review.openstack.org/443727
Committed: https://git.openstack.org/cgit/openstack/instack-undercloud/commit/?id=f75a19b6ab060c1ff0007562ba28c847b94aaa3b
Submitter: Jenkins
Branch: master

commit f75a19b6ab060c1ff0007562ba28c847b94aaa3b
Author: Dan Trainor <email address hidden>
Date: Thu Mar 9 09:35:50 2017 -0500

    Provide correct non-SSL port config in ui config

    Previously, non-SSL Undercloud deployments configured the UI to use the
    default service endpoint configuration ports. Since UI no longer
    connects to the service port directly in favor of Apache proxy
    configurations, the port is configured to use the default non-SSL UI
    port of 3000.

    Change-Id: I647d1bd619071a9b4e00dba250cc263cef05fe51
    Closes-Bug: #1663199

Changed in tripleo:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to instack-undercloud (stable/ocata)

Fix proposed to branch: stable/ocata
Review: https://review.openstack.org/444435

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to instack-undercloud (stable/ocata)

Reviewed: https://review.openstack.org/444435
Committed: https://git.openstack.org/cgit/openstack/instack-undercloud/commit/?id=9a1bafa5cd89b8a88f686ec7f1356058b039c86f
Submitter: Jenkins
Branch: stable/ocata

commit 9a1bafa5cd89b8a88f686ec7f1356058b039c86f
Author: Dan Trainor <email address hidden>
Date: Thu Mar 9 09:35:50 2017 -0500

    Provide correct non-SSL port config in ui config

    Previously, non-SSL Undercloud deployments configured the UI to use the
    default service endpoint configuration ports. Since UI no longer
    connects to the service port directly in favor of Apache proxy
    configurations, the port is configured to use the default non-SSL UI
    port of 3000.

    Change-Id: I647d1bd619071a9b4e00dba250cc263cef05fe51
    Closes-Bug: #1663199
    (cherry picked from commit f75a19b6ab060c1ff0007562ba28c847b94aaa3b)

tags: added: in-stable-ocata
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/instack-undercloud 7.0.0.0b1

This issue was fixed in the openstack/instack-undercloud 7.0.0.0b1 development milestone.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/instack-undercloud 6.1.0

This issue was fixed in the openstack/instack-undercloud 6.1.0 release.

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.