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.
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
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: