Bug 916506 - Can not retrieve domain info after migration if domain has applications with aliases
Summary: Can not retrieve domain info after migration if domain has applications with ...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: OKD
Classification: Red Hat
Component: Pod
Version: 2.x
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: ---
: ---
Assignee: Lili Nader
QA Contact: libra bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-02-28 07:54 UTC by Jianwei Hou
Modified: 2015-05-15 02:15 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-03-15 14:00:46 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
development.log (12.71 KB, text/x-log)
2013-02-28 07:54 UTC, Jianwei Hou
no flags Details
REST API (20.58 KB, text/x-log)
2013-02-28 07:54 UTC, Jianwei Hou
no flags Details

Description Jianwei Hou 2013-02-28 07:54:07 UTC
Created attachment 703834 [details]
development.log

Description of problem:
After upgrade and migration, can not do 'rhc domain show' succeessfully(same with rest api - curl -k -H "Accept:application/xml" -u jhou:redhat  https://ec2-54-234-31-65.compute-1.amazonaws.com/broker/rest/domains/311t1/applications -X GET)
The development.log reports error against applications which has aliases, see attachment 

Version-Release number of selected component (if applicable):
Upgrade devenv-stage_311 to devenv_2872

How reproducible:
Always

Steps to Reproduce:
1. Launch devenv-stage_311, create applications, add alias to applications
2. Upgrade devenv-stage_311 to devenv_2872
3. Migrate
rhc-admin-migrate --version 2.0.24
4. Run rhc domain show from client
5. Try rest api:
curl -k -H "Accept:application/xml" -u jhou:redhat  https://ec2-54-234-31-65.compute-1.amazonaws.com/broker/rest/domains/311t1/applications -X GET
  
Actual results:
After step 4:
The server did not respond correctly. This may be an issue with the server configuration or with your connection to the
server (such as a Web proxy or firewall). Please verify that you can access the OpenShift server
https://ec2-54-234-31-65.compute-1.amazonaws.com/broker/rest/domains/311t1/applications
After step 5:
Raise rails exception, notice one line of the returned contents: 
<pre>undefined method `has_key?&#x27; for &quot;nodejsapp&quot;:String</pre>
the nodejsapp is an alias for my application. So my guess is there are something wrong with existing apps which has aliases added

I will attached both logs

Expected results:
Should not return error

Additional info:
After the apps which have aliases were removed, everything went back to normal

Comment 1 Jianwei Hou 2013-02-28 07:54:32 UTC
Created attachment 703835 [details]
REST API

Comment 2 Meng Bo 2013-02-28 10:49:49 UTC
Alias does not work for new created app too. On an upgrade and migration env.

# rhc app show ruby19
ruby19 @ http://ruby19-bmengdev1.dev.rhcloud.com/ (uuid: 512f230c14db5167c40000f8)
----------------------------------------------------------------------------------
  Created: 4:27 AM
  Gears:   1 (defaults to small)
  Git URL: ssh://512f230c14db5167c40000f8.rhcloud.com/~/git/ruby19.git/
  SSH:     512f230c14db5167c40000f8.rhcloud.com
  Aliases: foo.bar.com

  ruby-1.9 (Ruby 1.9)
  -------------------
    Gears: 1 small
# ping ruby19-bmengdev1.dev.rhcloud.com
PING ec2-54-235-231-197.compute-1.amazonaws.com (54.235.231.197) 56(84) bytes of data.
# curl -H "host: foo.bar.com" 54.235.231.197
curl: (7) couldn't connect to host

Comment 3 Lili Nader 2013-02-28 18:25:59 UTC
The code for US2448 was removed master last night.  So the older apps should work again after upgrade.  The new apps would have to be deleted and re-created.

Comment 4 Rony Gong 🔥 2013-03-01 07:48:06 UTC
Verified on migration env that from devenv_stage_331 to devenv_2878
1.Could show domain that has applications with aliases
[qgong@dhcp-10-92 non_scalable]$ rhc domain show
Applications in qgong1 domain
-----------------------------
 redmine @ http://redmine-qgong1.dev.rhcloud.com/ (uuid: 513051ace5a26827c60001ff)
  ---------------------------------------------------------------------------------
    Created: 2:58 PM
    Gears:   1 (defaults to small)
    Git URL: ssh://513051ace5a26827c60001ff.rhcloud.com/~/git/redmine.git/
    SSH:     513051ace5a26827c60001ff.rhcloud.com
    Aliases: bar.qgong.com

    ruby-1.8 (Ruby 1.8)
    -------------------
      Gears: Located with mysql-5.1

    mysql-5.1 (MySQL Database 5.1)
    ------------------------------
      Gears:          Located with ruby-1.8
      Connection URL: mysql://127.1.252.1:3306/
      Database Name:  redmine
      Password:       Gjf2euYiFNRy
      Username:       adminGZz8G1b

....

And alias could work
qgong@dhcp-10-92 non_scalable]$  curl http://bar.qgong.com
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>Redmine</title>
<meta name="description" content="Redmine" />
<meta name="keywords" content="issue,bug,tracker" />
<meta http-equiv="X-UA-Compatible" content="IE=9; IE=8; IE=7; IE=EDGE" />
<meta content="authenticity_token" name="csrf-param" />
<meta content="ipgD+VpzNZ/n3aDtG+rnvvYsm1NH/u5+E8ygawRH8Fs=" name="csrf-token" />
<link rel='shortcut icon' href='/favicon.ico?1362121266' />
<link href="/stylesheets/application.css?1362121266" media="all" rel="stylesheet" type="text/css" />

<script src="/javascripts/prototype.js?1362121266" type="text/javascript"></script>
<script src="/javascripts/effects.js?1362121266" type="text/javascript"></script>
<script src="/javascripts/dragdrop.js?1362121266" type="text/javascript"></script>
<script src="/javascripts/controls.js?1362121266" type="text/javascript"></script>
<script src="/javascripts/rails.js?1362121266" type="text/javascript"></script>
<script src="/javascripts/application.js?1362121266" type="text/javascript"></script>
<script type="text/javascript">
//<![CDATA[
Event.observe(window, 'load', function(){ new WarnLeavingUnsaved('The current page contains unsaved text that will be lost if you leave this page.'); });
//]]>
</script>

<!--[if IE 6]>
    <style type="text/css">
      * html body{ width: expression( document.documentElement.clientWidth < 900 ? '900px' : '100%' ); }
      body {behavior: url(/stylesheets/csshover.htc?1362121266);}
    </style>


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