Description of problem: Add an alias app-domain.rhcloud.com to app-domain.dev.rhcloud.com, then remove alias with name app-domain.rhcloud.com.(note the extra .) will fail with error "Alias app-domain.rhcloud.com. can't be found in application ." Version-Release number of selected component (if applicable): devenv_3354 rhc-1.10.1 How reproducible: always Steps to Reproduce: 1.create an app.(rhc app create appjs jenkins-1.4) 2.create an alias for the app.(rhc alias add appjs appjs-domain.rhcloud.com) 3.remove the alias.(rhc alias remove appjs appjs-domain.rhcloud.com.) (Note the extra .) Actual results: Remove alias failed with error "Alias appjs-domain.rhcloud.com. can't be found in application .". Expected results: Remove alias should be successful. Additional info: When we access google.com. in explorer, it can be recognized as google.com The same with apple.com. & amazon.com. and much more...
This is a behavior of the REST API.
As per my discussion with Rob, assigning this bug to him to figure out how the frontend Apache deals with aliases with and without dots at the end. Based on the findings, we will decide on the fix and where we need to make it.
Apache is sensitive to the trailing dot. My recommendation is to strip it immediately after the downcase when the alias is first entered. This pull request does that for the FrontendHttpServer module: https://github.com/openshift/origin-server/pull/3217 Abhishek, do you want to go ahead with this fix? I'll need to write a migration and the broker should make a similar change and migration as well. Also, the migration for SSL certificates is a bit more complicated. We can change the file names but not the CN of the cert.
Per discussion, moving to the next sprint so we can work out broker and migration details.
Holding the node migration code until we know whether its even necessary. Pull request for blocking the trailing dot in node code: https://github.com/openshift/origin-server/pull/3409
Tested on devenv_3678, alias with extra dot in the end can not be added. # rhc alias add php Test.com. Invalid Server Alias 'test.com.' specified # rhc alias add php Test.com Alias 'Test.com' has been added. # rhc alias add php . Invalid Server Alias '.' specified # rhc alias add php .. Invalid Server Alias '..' specified # rhc alias add php .test Invalid Server Alias '.test' specified # rhc alias list php Alias Has Certificate? Certificate Added -------- ---------------- ----------------- test.com no - Move to verified.