Description of problem: Create HA app on a multinode env. Add the node ip of the 2nd haproxy gear to /etc/hosts with the app dns. When trying to visit the app dns, it will return 404 page. The app dns was not registered to the node frontend. Version-Release number of selected component (if applicable): devenv_5281 How reproducible: always Steps to Reproduce: 1. Setup multinode env 2. Create Scalable app on it and make it HA 3. Add the node ip of the 2nd haproxy gear and app dns to /etc/hosts 4. Visit the app dns. Actual results: It will return 404 page. Expected results: Should show the app home page when visiting the app dns which point to the 2nd haproxy gear's node. Additional info: Visit the app alias will not hit this problem. # cat /etc/hosts 127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4 ::1 localhost localhost.localdomain localhost6 localhost6.localdomain6 54.81.35.75 php541s-bmengdevnew.dev.rhcloud.com foo.bmeng.com # curl -Ik https://php541s-bmengdevnew.dev.rhcloud.com/ HTTP/1.1 404 Not Found Date: Thu, 06 Nov 2014 15:39:55 GMT Server: Apache/2.2.15 (Red Hat) Vary: Accept-Encoding Content-Type: text/html; charset=iso-8859-1 # curl -Ik https://foo.bmeng.com/ HTTP/1.1 200 OK Date: Thu, 06 Nov 2014 15:40:21 GMT Server: Apache/2.2.15 (Red Hat) Content-Type: text/html; charset=UTF-8 Cache-control: private Set-Cookie: GEAR=local-545b8bc7e4364b0094000004; path=/ Vary: Accept-Encoding Accept-Ranges: none ProxyTime: D=1307
I don't believe this is a bug. You would need a load balancer handling requests for the HA app URL (e.g. ha-myapp.yourdomain.rhcloud.com), and the load balancer would forward the requests to the app's haproxy gears.
Ignore my previous comment. I wasn't aware we had implemented this. This is probably something that broke with the switch from mod-rewrite to vhost. I'll keep investigating.
https://github.com/openshift/origin-server/pull/5954
Commit pushed to master at https://github.com/openshift/origin-server https://github.com/openshift/origin-server/commit/f778d2b60f5708c9a4a44420b6d4ae1d4793d6a5 Register app dns vhost for secondary haproxy gears Modify the vhost frontend plugin to create a 2nd base vhost conf file for the app dns so secondary haproxy gears can handle requests for $OPENSHIFT_APP_DNS Bug 1161072
Checked on devenv-stage_1106, both the app dns and the aliases can be visited with the host ip of all the nodes. move bug to verified.