Bug 1166600 - routing-daemon will add duplicated route in nginx server conf file when creating more than one scalable app.
Summary: routing-daemon will add duplicated route in nginx server conf file when creat...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Node
Version: 2.2.0
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: ---
: ---
Assignee: chris alfonso
QA Contact: libra bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-11-21 10:28 UTC by Johnny Liu
Modified: 2016-02-01 02:36 UTC (History)
6 users (show)

Fixed In Version: rubygem-openshift-origin-routing-daemon-0.20.2.3-1.el6op
Doc Type: Bug Fix
Doc Text:
In OpenShift Enterprise environments using the routing daemon, duplicate entries were created in the nginx routing configuration when creating more than one scalable application. 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 ensure these duplicate entries are no longer created, and the nginx service no longer reports these errors when restarting.
Clone Of:
Environment:
Last Closed: 2014-12-10 13:25:19 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2014:1979 0 normal SHIPPED_LIVE Red Hat OpenShift Enterprise 2.2.2 bug fix and enhancement update 2014-12-10 18:23:46 UTC

Description Johnny Liu 2014-11-21 10:28:54 UTC
Description of problem:


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

How reproducible:
Always

Steps to Reproduce:
1.Create a scalable app, then check server.conf which is correct.
# 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;
  
  # route_name=route_ose_scaruby18app_jialiu
  location /scaruby18app {
    proxy_pass http://pool_ose_scaruby18app_jialiu_80;
    
  }

}


server {
  listen 443 ssl;
  
  # route_name=route_ose_scaruby18app_jialiu
  location /scaruby18app {
    proxy_pass http://pool_ose_scaruby18app_jialiu_80;
    
  }

}

2.Create another scalable app, check server.conf again
# 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;
  
  # route_name=route_ose_scaruby19app_jialiu
  location /scaruby19app {
    proxy_pass http://pool_ose_scaruby19app_jialiu_80;
    
  }

  # route_name=route_ose_scaruby18app_jialiu
  location /scaruby18app {
    proxy_pass http://pool_ose_scaruby18app_jialiu_80;
    
  }

  # route_name=route_ose_scaruby18app_jialiu
  location /scaruby18app {
    proxy_pass http://pool_ose_scaruby18app_jialiu_80;
    
  }

}


server {
  listen 443 ssl;
  
  # route_name=route_ose_scaruby19app_jialiu
  location /scaruby19app {
    proxy_pass http://pool_ose_scaruby19app_jialiu_80;
    
  }

  # route_name=route_ose_scaruby18app_jialiu
  location /scaruby18app {
    proxy_pass http://pool_ose_scaruby18app_jialiu_80;
    
  }

  # route_name=route_ose_scaruby18app_jialiu
  location /scaruby18app {
    proxy_pass http://pool_ose_scaruby18app_jialiu_80;
    
  }

}

3. Create the 3rd one, and check server.conf again.
# 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;
  
  # route_name=route_ose_scaruby20app_jialiu
  location /scaruby20app {
    proxy_pass http://pool_ose_scaruby20app_jialiu_80;
    
  }

  # route_name=route_ose_scaruby19app_jialiu
  location /scaruby19app {
    proxy_pass http://pool_ose_scaruby19app_jialiu_80;
    
  }

  # route_name=route_ose_scaruby18app_jialiu
  location /scaruby18app {
    proxy_pass http://pool_ose_scaruby18app_jialiu_80;
    
  }

  # route_name=route_ose_scaruby18app_jialiu
  location /scaruby18app {
    proxy_pass http://pool_ose_scaruby18app_jialiu_80;
    
  }

  # route_name=route_ose_scaruby19app_jialiu
  location /scaruby19app {
    proxy_pass http://pool_ose_scaruby19app_jialiu_80;
    
  }

  # route_name=route_ose_scaruby18app_jialiu
  location /scaruby18app {
    proxy_pass http://pool_ose_scaruby18app_jialiu_80;
    
  }

  # route_name=route_ose_scaruby18app_jialiu
  location /scaruby18app {
    proxy_pass http://pool_ose_scaruby18app_jialiu_80;
    
  }

}


server {
  listen 443 ssl;
  
  # route_name=route_ose_scaruby20app_jialiu
  location /scaruby20app {
    proxy_pass http://pool_ose_scaruby20app_jialiu_80;
    
  }

  # route_name=route_ose_scaruby19app_jialiu
  location /scaruby19app {
    proxy_pass http://pool_ose_scaruby19app_jialiu_80;
    
  }

  # route_name=route_ose_scaruby18app_jialiu
  location /scaruby18app {
    proxy_pass http://pool_ose_scaruby18app_jialiu_80;
    
  }

  # route_name=route_ose_scaruby18app_jialiu
  location /scaruby18app {
    proxy_pass http://pool_ose_scaruby18app_jialiu_80;
    
  }

  # route_name=route_ose_scaruby19app_jialiu
  location /scaruby19app {
    proxy_pass http://pool_ose_scaruby19app_jialiu_80;
    
  }

  # route_name=route_ose_scaruby18app_jialiu
  location /scaruby18app {
    proxy_pass http://pool_ose_scaruby18app_jialiu_80;
    
  }

  # route_name=route_ose_scaruby18app_jialiu
  location /scaruby18app {
    proxy_pass http://pool_ose_scaruby18app_jialiu_80;
    
  }

}


Actual results:
routing-daemon always add duplicated route in nginx server conf file, that would make nginx16-nginx failed to restart.
# /etc/init.d/nginx16-nginx restart
nginx: [emerg] duplicate location "/scaruby18app" in /opt/rh/nginx16/root/etc/nginx/conf.d/server.conf:27
nginx: configuration file /opt/rh/nginx16/root/etc/nginx/nginx.conf test failed


Expected results:
No duplicated route is shown in nginx server.conf

Additional info:

Comment 1 chris alfonso 2014-11-24 17:59:52 UTC
PR open for origin-server. https://github.com/openshift/origin-server/pull/5972

Comment 4 Johnny Liu 2014-11-26 06:02:54 UTC
Verified this bug with rubygem-openshift-origin-routing-daemon-0.20.2.3-1.el6op.noarch, and PASS.

Comment 6 errata-xmlrpc 2014-12-10 13:25:19 UTC
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.