Bug 963057

Summary: Ruby 1.9 App Instantiation Errors / 503 Service Temporarily unavailable
Product: OKD Reporter: symon <symon>
Component: PodAssignee: Rajat Chopra <rchopra>
Status: CLOSED CURRENTRELEASE QA Contact: libra bugs <libra-bugs>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 2.xCC: ccoleman, jialiu, libra-onpremise-devel, yujzhang
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Mac OS   
URL: simon-habitus.rhcloud.com
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-06-11 03:57:53 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 symon 2013-05-15 04:39:44 UTC
Description of problem: 503 Service Temporarily unavailable / Technical Errors on ruby / sinatra App creation.


Version-Release number of selected component (if applicable):


How reproducible: App was not instantiated correctly, no specific error given

Steps to Reproduce:
1. go to simon-habitus.rhcloud.com
2. Notice that it ain't werkin? I get 503 error
3. App had errors on instantiation, wondering if it was something I did or didn't do, or something wrong on server side.
  
Actual results: 503 Service Temporarily unavailable


Expected results: No server errors


Additional info:  simon-habitus.rhcloud.com

Comment 2 Johnny Liu 2013-05-15 05:42:17 UTC
Looks like this is origin bug, so move it to origin product.

Comment 3 Yujie Zhang 2013-05-15 09:36:51 UTC
Created a ruby-1.9 application on PROD, it can work correctly, could you please provide the steps you create the application? Thanks!

Comment 4 Abhishek Gupta 2013-05-15 19:30:49 UTC
Can you try restarting the application?

Comment 5 symon 2013-05-15 19:56:35 UTC
I restarted the application, still the same error.  

Reference #b304feebe84352c0661dfa6094b67634

The steps I used to instantiate were as follows:

1) created ruby 1.9 application
2) Specified github source code repository
3) Used Defaults otherwise

My first test app eco-habitus.rhcloud.com, is a duplicate of simon-habitus.rhcloud.com, with the exception that it does not sync with a github repository.  The app runs locally fine.  

Was wondering if as something to do with the required thread-dumper.rb file, or possibly the way I am syncing / pushing the github repository to the rhc git repository.  But then again, the error occurred prior, during the app creation phase.

Not sure what it could be? Maybe I have missed something critical in figuring out the deployment process with Openshift Origin, particularly with integrating github, any suggestions?

Comment 6 Abhishek Gupta 2013-05-15 20:20:58 UTC
If you have a spare gear, can you try creating a new app (same as simon-habitus.rhcloud.com) and see if that works? If not, we'll need to look at the gear. For the latter, can you provide us the application UUID or the output of "rhc domain show"?

Comment 7 symon 2013-05-15 21:07:55 UTC
I deleted the instance of simon-habitus.rhcloud.com and tried to create a new one with same name, specifying a github repository, apart from that I used the default settings.  App did not successfully get instantiated, the error I got was:

"Unable to complete the requested operation due to: Node execution failure (invalid exit code from node). If the problem persists please contact Red Hat support.. Reference ID: 3557acacafbec17aed9b1506d997b1a0"

Also, prior to deleting simon-habitus.rhcloud the output of rhc domain show was:

Applications in habitus domain
------------------------------

  eco @ http://eco-habitus.rhcloud.com/
    (uuid: 515b8b5ce0b8cdf2a3000060)
  -------------------------------------
    Created: Apr 02  6:52 PM
    Gears:   1 (defaults to small)
    Git URL: ssh://515b8b5ce0b8cdf2a3000060.com/~/git/eco.git/
    SSH:     515b8b5ce0b8cdf2a3000060.com

    ruby-1.9 (Ruby 1.9)
    -------------------
      Gears: 1 small

  simon @ http://simon-habitus.rhcloud.com/
    (uuid: 5192bd804382eca1cf000198)
  -----------------------------------------
    Created:         May 14  3:41 PM
    Gears:           1 (defaults to small)
    Git URL:         ssh://5192bd804382eca1cf000198.com/~/git/simon.git/
    Initial Git URL: https://github.com/supamello/simon.git
    SSH:             5192bd804382eca1cf000198.com

    ruby-1.9 (Ruby 1.9)
    -------------------
      Gears: 1 small

Comment 8 symon 2013-05-15 21:38:18 UTC
Just tried deploying to Heroku, worked like a charm...just fyi.  It's definitely an Openshift bug.

Comment 9 Abhishek Gupta 2013-05-15 22:14:58 UTC
Assigning to Rajat as he has already started debugging it on the gear.

Comment 10 Rajat Chopra 2013-05-16 00:43:12 UTC
Here is what is going on in the background -->
Bundling RubyGems based on Gemfile/Gemfile.lock to repo/vendor/bundle with 'bundle install --deployment'
Fetching gem metadata from http://rubygems.org/.
Error Bundler::HTTPError during request to dependency API


Summary of error:
The request to rubygems.org times out when trying to get the gem metadata, and that ultimately propagates the error to the top (including app-create). 

Solution:
Our operations team will look into this 'slow' deal with rubygems.org !
But meanwhile, may I request you to create a regular ruby-1.9 app and then do a git push with your repo?
Steps -
 1. rhc app create simonsapp ruby-1.9
 2. cd simonsapp
 3. git remote add upstream -m master https://github.com/supamello/simon.git
 4. git pull -s recursive -X theirs upstream master
 5. git push
With the 5th step, you will see exactly what goes on with the bundler (and that it takes an unusually long time). But eventually this manual step succeeds (because no one is heeding to the timeout). 
 6. App is ready.


Further:
Please feed us back if the above worked. This bug will be updated with progress on the 'operations' work on rubygems.org.

Comment 11 Clayton Coleman 2013-05-16 14:35:18 UTC
Rubygems.org had some problems last night - see here for more http://t.co/2golDj9xhd

All issues should be resolved now.

Comment 12 Yujie Zhang 2013-05-17 03:50:57 UTC
Tested on PROD, create ruby-1.9 application with git url "https://github.com/supamello/simon.git", the app can be created and accessed successfully, so verify this bug, thanks.

(In reply to comment #8)
hi symon, you can try to create your app again, it should be ok now, thanks!

Comment 13 symon 2013-05-21 21:38:02 UTC
Sorry for the delay, had some other matters to attend to.  Unfortunately, I don't think the bug fix is verified...I tried to create the app again using same process and still got the same error.

Comment 14 Rajat Chopra 2013-05-21 22:00:47 UTC
Can you verify if the app can be brought up nicely with steps listed in Comment#10 ? 
Just to bisect the range of possible issues - because according to comment#12 it seems possible to create an app without error - wondering if its your client tool or your account or really the rubygems.org timeout!

Comment 15 symon 2013-05-22 03:39:32 UTC
Hey, hold up...I had the thought that, the error might have been with my Browser (firefox) and possibly a cache / session issue.  I tried creating the app with another browser (chrome) with same steps as Comment#10 and it worked without hiccup.  If there is any way to reproduce the error, I'd try if you can guess what it might have been?