Horizon health check fails when developer panels enabled

Bug #1778085 reported by Stuart Grace
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack-Ansible
Fix Released
Undecided
Stuart Grace

Bug Description

The ServerName in Apache's openstack_dashboard.conf is being set to the Horizon container name with no suffix. When developer panels and debug are enabled, the http health checks from haproxy fail and Horizon logs this error:

Invalid HTTP_HOST header: u'infra3_horizon_container-7eec7066:80'. The domain name provided is not valid according to RFC 1034/1035

Haproxy httpchk uses HTTP/1.0 with no Host: header, so the ServerName setting in Apache config gets used for the host name. This needs to be an FQDN or an IP address.

A similar problem was fixed in 2016 here: https://review.openstack.org/#/c/350955/

Workaround:

  horizon_server_name: "{{ ansible_fqdn }}"

This sets ServerName to {{container_name}}.openstack.local which is accepted as valid.

Making this the default for horizon_server_name could be a fix?

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

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

Changed in openstack-ansible:
assignee: nobody → Mohammed Naser (mnaser)
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on openstack-ansible-os_horizon (master)

Change abandoned by Mohammed Naser (<email address hidden>) on branch: master
Review: https://review.openstack.org/578151

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

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

Changed in openstack-ansible:
assignee: Mohammed Naser (mnaser) → Stuart Grace (stuartgrace)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to openstack-ansible-os_horizon (master)

Reviewed: https://review.openstack.org/578348
Committed: https://git.openstack.org/cgit/openstack/openstack-ansible-os_horizon/commit/?id=252ac6af5cca8083bea7220257bc436ea8c57ca4
Submitter: Zuul
Branch: master

commit 252ac6af5cca8083bea7220257bc436ea8c57ca4
Author: Stuart Grace <email address hidden>
Date: Wed Jun 27 11:11:20 2018 +0100

    Change default horizon_server_name to ansible_fqdn

    horizon_server_name setting in apache config file must be a FQDN
    otherwise when debug mode is enabled, HTTP requests without a
    host: header (such as haproxy health checks) fail with a message
    about invaid domain name.

    Change-Id: I8672593019e4cc5cf6144c40359ecb9d64bc9224
    Closes-Bug: #1778085

Changed in openstack-ansible:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/openstack-ansible-os_horizon rocky-eol

This issue was fixed in the openstack/openstack-ansible-os_horizon rocky-eol release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/openstack-ansible-os_horizon stein-eol

This issue was fixed in the openstack/openstack-ansible-os_horizon stein-eol release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/openstack-ansible-os_horizon train-eol

This issue was fixed in the openstack/openstack-ansible-os_horizon train-eol release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/openstack-ansible-os_horizon ussuri-eol

This issue was fixed in the openstack/openstack-ansible-os_horizon ussuri-eol release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/openstack-ansible-os_horizon yoga-eom

This issue was fixed in the openstack/openstack-ansible-os_horizon yoga-eom release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/openstack-ansible-os_horizon victoria-eom

This issue was fixed in the openstack/openstack-ansible-os_horizon victoria-eom release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/openstack-ansible-os_horizon wallaby-eom

This issue was fixed in the openstack/openstack-ansible-os_horizon wallaby-eom release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/openstack-ansible-os_horizon xena-eom

This issue was fixed in the openstack/openstack-ansible-os_horizon xena-eom 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.