Bug 816338

Summary: get ruby warning /usr/lib/ruby/gems/1.8/gems/rhc-0.91.8/lib/rhc-common.rb:411: warning: redefining constant Struct::FakeResponse
Product: OKD Reporter: Peter Ruan <pruan>
Component: PodAssignee: John (J5) Palmieri <johnp>
Status: CLOSED CURRENTRELEASE QA Contact: libra bugs <libra-bugs>
Severity: low Docs Contact:
Priority: medium    
Version: 2.xCC: jizhao, jkeck, mpatel, yquan
Target Milestone: ---Keywords: Triaged
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: rhc-0.93.12 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-06-08 17:58:28 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Peter Ruan 2012-04-25 20:14:34 UTC
Description of problem:
when trying the following command:

I get the following warning (pls cleanup).


get ruby warning /usr/lib/ruby/gems/1.8/gems/rhc-0.91.8/lib/rhc-common.rb:411: warning: redefining constant Struct::FakeResponse
Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1.rhc domain create -n <domain_name> -p<password>
2.rhc app create -a myapp -t jbossas-7 --enable-jenkins -d

3.
  
Actual results:
/usr/lib/ruby/gems/1.8/gems/rhc-0.90.1/lib/rhc-common.rb:387: warning: redefining constant Struct::FakeResponse


Expected results:
This warning msg shouldn't be there.

Additional info:

Comment 1 Peter Ruan 2012-04-27 17:29:22 UTC
*** Bug 817018 has been marked as a duplicate of this bug. ***

Comment 2 Clayton Coleman 2012-05-03 21:53:21 UTC
Probably redundant requires.

Comment 3 John (J5) Palmieri 2012-05-25 20:37:46 UTC
worked around for now.  real fix will go into the refactor.  Struct::FakeResponse is expected but isn't defined in a convinient location so when we have to fake an error we now check to see if it is defined and define it if we gwt a NameError (it hasn't been defined).

A real fix would be to either accept a hash with the same values or define FakeResponse in a shared module that only gets loaded once.

Comment 4 yquan 2012-05-30 06:29:01 UTC
It is fixed in rhc-0.93.15,devenv_1808.


Output:



[root@localhost home]# rhc app create -a myapp -t jbossas-7 --enable-jenkins -d
Password: ***

Submitting form:
debug: true
rhlogin: yquan
Contacting https://ec2-23-22-30-208.compute-1.amazonaws.com
Creating application: jenkins in domaintest0002
Contacting https://ec2-23-22-30-208.compute-1.amazonaws.com
Response from server:
DEBUG:


Exit Code: 0
api_c: placeholder
broker_c: namespacerhloginsshapp_uuiddebugaltercartridgecart_typeactionapp_nameapi
API version:    1.1.3
DEBUG: 'jenkins' creation returned success.
Now your new domain name is being propagated worldwide (this might take a minute)...
    retry # 4 - Waiting for DNS: jenkins-domaintest0002.dev.rhcloud.com

Note: There is a git repo for your Jenkins application 'jenkins'
but it isn't being downloaded as part of this process.  In most cases
it isn't needed but you can always clone it later.

Confirming application 'jenkins' is available
  Attempt # 1
Confirming application 'jenkins' is available:  Success!

jenkins published:  http://jenkins-domaintest0002.dev.rhcloud.com/
git url:  ssh://bf81a02cfaf74471ae0e8e1c519879de.rhcloud.com/~/git/jenkins.git/
To make changes to 'jenkins', you must first clone it with:
      git clone ssh://bf81a02cfaf74471ae0e8e1c519879de.rhcloud.com/~/git/jenkins.git/

Then run 'git push' to update your OpenShift space.

Jenkins created successfully.  Please make note of these credentials:

   User: admin
   Password: r4z4NNA-QCF6

Note:  You can change your password at: https://jenkins-domaintest0002.dev.rhcloud.com/me/configure

Creating application: myapp in domaintest0002
Contacting https://ec2-23-22-30-208.compute-1.amazonaws.com
Response from server:
DEBUG:


Exit Code: 0
api_c: placeholder
broker_c: namespacerhloginsshapp_uuiddebugaltercartridgecart_typeactionapp_nameapi
API version:    1.1.3
DEBUG: 'myapp' creation returned success.
Now your new domain name is being propagated worldwide (this might take a minute)...
    retry # 6 - Waiting for DNS: myapp-domaintest0002.dev.rhcloud.com
Pulling new repo down
git clone --quiet ssh://f126295653ee47f3b39666eeed04b709.rhcloud.com/~/git/myapp.git/ myapp
The authenticity of host 'myapp-domaintest0002.dev.rhcloud.com (23.22.30.208)' can't be established.
RSA key fingerprint is a5:16:8e:86:76:08:b5:06:9d:95:d9:48:83:fc:b1:61.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'myapp-domaintest0002.dev.rhcloud.com,23.22.30.208' (RSA) to the list of known hosts.
remote: Counting objects: 39, done.
remote: Compressing objects: 100% (29/29), done.
remote: Total 39 (delta 1), reused 0 (delta 0)
Receiving objects: 100% (39/39), 19.44 KiB, done.
Resolving deltas: 100% (1/1), done.
Now embedding the jenkins client into 'myapp'...
Contacting https://ec2-23-22-30-208.compute-1.amazonaws.com
Response from server:
DEBUG:
Embedded app details: Job URL: https://jenkins-domaintest0002.dev.rhcloud.com/job/myapp-build/

Exit Code: 0
api_c: placeholder
broker_c: namespacerhloginsshapp_uuiddebugaltercartridgecart_typeactionapp_nameapi
API version:    1.1.3

RESULT:

Job URL: https://jenkins-domaintest0002.dev.rhcloud.com/job/myapp-build/

Jenkins client 1.4 has been added to: myapp

Confirming application 'myapp' is available
  Attempt # 1
Confirming application 'myapp' is available:  Success!

myapp published:  http://myapp-domaintest0002.dev.rhcloud.com/
git url:  ssh://f126295653ee47f3b39666eeed04b709.rhcloud.com/~/git/myapp.git/
To make changes to 'myapp', commit to myapp/.
Successfully created application: myapp