Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 1168034 - nginx configuration is broken when multiple applications with the same name are created under different domains
nginx configuration is broken when multiple applications with the same name a...
Status: CLOSED ERRATA
Product: OpenShift Container Platform
Classification: Red Hat
Component: Pod (Show other bugs)
2.2.0
x86_64 Linux
high Severity medium
: ---
: ---
Assigned To: chris alfonso
libra bugs
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2014-11-25 17:49 EST by Timothy Williams
Modified: 2016-01-31 21:36 EST (History)
8 users (show)

See Also:
Fixed In Version: rubygem-openshift-origin-routing-daemon-0.20.2.4-1.el6op
Doc Type: Bug Fix
Doc Text:
In OpenShift Enterprise environments using the routing daemon with an nginx router, when multiple applications with the same name were created under different domains, duplicate entries pointing to the same endpoint were created in the nginx routing configuration. This was due to a bug in the routing daemon, and as a result, "duplicate location" errors were reported when restarting the nginx service. This bug fix updates the routing daemon to no longer create /<app_name> endpoints in the nginx routing configuration. As a result, the nginx service no longer reports these errors when restarting.
Story Points: ---
Clone Of:
Environment:
Last Closed: 2014-12-10 08:25:31 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2014:1979 normal SHIPPED_LIVE Red Hat OpenShift Enterprise 2.2.2 bug fix and enhancement update 2014-12-10 13:23:46 EST

  None (edit)
Description Timothy Williams 2014-11-25 17:49:36 EST
Description of problem:
The openshift routing nginx configuration for HA applications is partially broken when two applications with the same name are created under different domains.

Specifically, the conf.d/server.conf will have two entries pointing to the same endpoint, throwing the below error when nginx is restarted:

  nginx: [emerg] duplicate location "/test10" in /opt/rh/nginx16/root/etc/nginx/conf.d/server.conf:78

Version-Release number of selected component (if applicable):
OSE 2.2.0
rubygem-openshift-origin-routing-daemon-0.17.1.4-1.el6op.noarch

How reproducible:
Always

Steps to Reproduce:
1. Set up and configure an HA load balancer for applications
2. Create two applications under seperate domains with the same name
3.

Actual results:
Two entries are created in conf.d/server.conf. For the below example, the app name is 'test10' and the two domains are 'tim' and 'admin':

  # route_name=route_ose_test10_admin
  location /test10 {
    proxy_pass http://pool_ose_test10_admin_80;

  }
  # route_name=route_ose_test10_tim
  location /test10 {
    proxy_pass http://pool_ose_test10_tim_80;

  }

Expected results:
Endpoint added without issue

Additional info:
Are these endpoints really necessary?
Comment 2 chris alfonso 2014-11-26 15:00:26 EST
Fixed upstream, opened PR https://github.com/openshift/origin-server/pull/5985

Will merge to enterprise-server
Comment 7 Johnny Liu 2014-11-27 01:20:13 EST
Verified this bug with rubygem-openshift-origin-routing-daemon-0.20.2.4-1.el6op.noarch, and PASS.


1. Acreate two scalable apps, no endpoint will be added into server.conf, the following conf file are built.

# cat server.conf 


ssl_certificate /etc/pki/tls/certs/node.example.com.crt;
ssl_certificate_key /etc/pki/tls/private/node.example.com.key;




server {
  listen 80 default_server;
  server_name _;
  location / {
    return 404;
  }
}

server {
  listen 443 ssl default_server;
  server_name _;
  location / {
    return 404;
  }
}
Comment 8 Johnny Liu 2014-11-27 01:23:00 EST
Typo in comment 7, should be:
Create two scalable apps with the same name under different domains, no dup endpoint is added into nginx server.conf.
Comment 10 errata-xmlrpc 2014-12-10 08:25:31 EST
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHBA-2014-1979.html

Note You need to log in before you can comment on or make changes to this bug.