Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 1123944 - oo-app-info does not find gears / users based on app fqdn
oo-app-info does not find gears / users based on app fqdn
Status: CLOSED ERRATA
Product: OpenShift Container Platform
Classification: Red Hat
Component: Pod (Show other bugs)
2.1.0
Unspecified Unspecified
high Severity low
: ---
: ---
Assigned To: Luke Meyer
libra bugs
: EasyFix
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2014-07-28 13:20 EDT by Eric Rich
Modified: 2014-08-26 09:53 EDT (History)
6 users (show)

See Also:
Fixed In Version: openshift-origin-broker-util-1.23.8.10-1.el6op
Doc Type: Bug Fix
Doc Text:
When the oo-app-info command was used to search for an application by its fully-qualified domain name (FQDN), the domain for the FQDN was assumed to be "rhcloud.com". As a result, the search did not work outside of the OpenShift Online environment. This bug fix updates the search to be generalized for any cloud domain, and searching for an application by its FQDN now works as expected.
Story Points: ---
Clone Of:
Environment:
Last Closed: 2014-08-26 09:53:06 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Knowledge Base (Solution) 1145123 None None None Never
Red Hat Product Errata RHBA-2014:1095 normal SHIPPED_LIVE Red Hat OpenShift Enterprise 2.1.5 bug fix and enhancement update 2014-08-26 13:51:34 EDT

  None (edit)
Description Eric Rich 2014-07-28 13:20:12 EDT
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    
================================================================================
Comment 2 Brenton Leanhardt 2014-07-29 10:44:28 EDT
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
Comment 3 Luke Meyer 2014-08-04 13:56:07 EDT
This sort of thing drives me bonkers.
Comment 5 openshift-github-bot 2014-08-05 15:13:39 EDT
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.
Comment 6 Luke Meyer 2014-08-05 15:26:17 EDT
Can't exactly test this upstream, due to bug 1126888 - but it works under OSE.
Comment 10 errata-xmlrpc 2014-08-26 09:53:06 EDT
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

Note You need to log in before you can comment on or make changes to this bug.