Description of problem: oo-accept-node reports a disconnect between the httpd frontend entry and the gear, if the application or domain name include upper case letters Version-Release number of selected component (if applicable): rubygem-openshift-origin-node-1.22.14-1.el6oso.noarch How reproducible: Always on Prod Steps to Reproduce: 1. Create an application with upper case letters in the domain or app name 2. run oo-accept-node 3. Actual results: FAIL: httpd config references DNS name without associated gear: 'appName-DOMAIN.rhcloud.com' Expected results: If the gear exists, the error should not appear. Additional info: rhc-fix-missing-frontend does not repair the alert. This does not appear to prevent gears from being accessible.
verified with devenv-stage_802
Created attachment 885642 [details] fix script for gears that are failing in oo-accept-node because of mixed case in APP_DNS
Part I : Code fixed with : https://github.com/openshift/origin-server/pull/5219 Any new cases of OPENSHIFT_APP_DNS having mixed case will not result in extra entries in routes.json! The above part was verified as per Comment#1, but the second part involves fixing already broken gears. So marking it back to ON_QA. Part II of the fix is for existing gears that are already having the erroneous entry in the routes.json -> Run the attached script with the uuids as the argument. e.g. ======================================== [root@ip]# oo-ruby fix_mixed_case_frontends.rb 53487b0e53c26e5652000001 Rebuilding the frontend for: 53487b0e53c26e5652000001 Hit 'y' to continue, anything else to abort. y Fixing gear: 53487b0e53c26e5652000001 ... Disconnecting frontend mapping for 53487b0e53c26e5652000001/php: ["", "/health"] Disconnecting frontend mapping for 53487b0e53c26e5652000001/haproxy: ["", "/health", "/haproxy-status", "/health"] Done ========================================== Some details of the script : 1. Manually disconnect all the frontends with actual value of OPENSHIFT_APP_DNS env variable. This will remove both the downcased entry and the mixed case entry. 2. Call the installed gem's connect_frontend function to rebuild the frontend. With the above pull request, the mixed case of env variable will not matter and only one genuine entry will be created. How to test : 1. Take an older devenv (one without the above pull request merged in it). 2. Create a scalable app, and as root go and modify /var/lib/openshift/<gear_uuid>/.env/OPENSHIFT_APP_DNS -> put the dns as some mixed case variation of the original. 3. Run oo-frontend-plugin-modify --rebuild 4. Run oo-accept-node to see the error being reported. 5. Now put the fix as in the pull request : https://github.com/openshift/origin-server/pull/5219 6. Run the attached fix script : oo-ruby fix_mixed_case_frontends.rb <gear_uuid> 7. Run oo-accept-node. Check that it passes now. Its a long-ish test to verify, and I manually put the pull request's changes on the devenv to test it out :(. But it works.
Checked the migration part of the existing apps. Manual revert the PR/5219, create scalable app and modify the OPENSHIFT_APP_DNS to simulate the issue. Put the patch in and run the ruby script. Mixed dne entried in both nodes.txt and route.json are cleared and the original one is still there. Move bug to verified.