Bug 816338 - get ruby warning /usr/lib/ruby/gems/1.8/gems/rhc-0.91.8/lib/rhc-common.rb:411: warning: redefining constant Struct::FakeResponse
get ruby warning /usr/lib/ruby/gems/1.8/gems/rhc-0.91.8/lib/rhc-common.rb:411...
Status: CLOSED CURRENTRELEASE
Product: OpenShift Origin
Classification: Red Hat
Component: Pod (Show other bugs)
2.x
Unspecified Unspecified
medium Severity low
: ---
: ---
Assigned To: John (J5) Palmieri
libra bugs
: Triaged
: 817018 (view as bug list)
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-04-25 16:14 EDT by Peter Ruan
Modified: 2015-05-14 21:52 EDT (History)
4 users (show)

See Also:
Fixed In Version: rhc-0.93.12
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-06-08 13:58:28 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)

  None (edit)
Description Peter Ruan 2012-04-25 16:14:34 EDT
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 13:29:22 EDT
*** Bug 817018 has been marked as a duplicate of this bug. ***
Comment 2 Clayton Coleman 2012-05-03 17:53:21 EDT
Probably redundant requires.
Comment 3 John (J5) Palmieri 2012-05-25 16:37:46 EDT
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 02:29:01 EDT
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@redhat.com
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@jenkins-domaintest0002.dev.rhcloud.com/~/git/jenkins.git/
To make changes to 'jenkins', you must first clone it with:
      git clone ssh://bf81a02cfaf74471ae0e8e1c519879de@jenkins-domaintest0002.dev.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@myapp-domaintest0002.dev.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@myapp-domaintest0002.dev.rhcloud.com/~/git/myapp.git/
To make changes to 'myapp', commit to myapp/.
Successfully created application: myapp

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