Description of problem: oo-app-info never seems to do a search / return any results when searching for an fqdn. Version-Release number of selected component (if applicable): OpenShift Enterprise 2.1.3 How reproducible: Very Steps to Reproduce: 1. # oo-app-info -f app-namespace.domain.com Actual results: Loading broker environment... Error: No apps found for fqdn: 'app-namespace.domain.com' Expected results: Loading broker environment... Done. ================================================================================ Login: demo Plan: () App Name: app App UUID: 53d674a6e3c9c3e8a2000005 Creation Time: 2014-07-28 04:04:54 PM URL: http://app-namespace.domain.com Group Instance[0]: Components: Cartridge Name: php-5.4 Component Name: php-5.4 Cartridge Name: acme-mock-plugin-0.2 Component Name: acme-mock-plugin-0.2 Gear[0] Server Identity: node.domain.com Gear UUID: 53d674a6e3c9c3e8a2000005 Gear UID: 5568 Current DNS ----------- app-namespace.domain.com is an alias for app.domain.com. app.domain.com has address 10.10.10.1 ================================================================================
This patch should do it: diff --git a/broker-util/lib/app_info.rb b/broker-util/lib/app_info.rb index 4b20d7f..6ab4830 100755 --- a/broker-util/lib/app_info.rb +++ b/broker-util/lib/app_info.rb @@ -87,7 +87,7 @@ class AppInfo end class AppQuery - FQDN_REGEX = /(http:\/\/)?(\w+)-(\w+)(\.\w+)?\.rhcloud.com\Z/ + FQDN_REGEX = /(http:\/\/)?(\w+)-(\w+)(\.\w+)?\.#{Regexp.escape(Rails.application.config.openshift[:domain_suffix])}\Z/ # # Entrypoint for openshift application query methods
This sort of thing drives me bonkers.
https://github.com/openshift/origin-server/pull/5688 https://github.com/openshift/enterprise-server/pull/347
Commit pushed to master at https://github.com/openshift/origin-server https://github.com/openshift/origin-server/commit/b7b1da5ee4e7e141d1d1bc2ce3769f9c71860998 oo-app-info: don't assume rhcloud.com app domain Bug 1123944 - oo-app-info does not find gears / users based on app fqdn https://bugzilla.redhat.com/show_bug.cgi?id=1123944 The search for an app fqdn was poorly implemented, as it assumed the domain on the fqdn is rhcloud.com. This change generalizes the search to use the configured cloud domain in the fqdn.
Can't exactly test this upstream, due to bug 1126888 - but it works under OSE.
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. http://rhn.redhat.com/errata/RHBA-2014-1095.html