DeltaCloud
  1. DeltaCloud
  2. DTACLOUD-37

Exceptions being thrown on deltacloud git HEAD

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Component/s: Server
    • Labels:
      None
    • Environment:

      Description

      I'm testing out loadbalancer support with libdeltacloud. When I was on deltacloud server git commit dcfa28a345a1ec782b136e31a7f5a871fa1f66c9, I was able to properly run a sequence where I create a loadbalancer in EC2, look up the just created instance by ID, and then delete the loadbalancer. However, since I've updated to 8cad9b7c0ef143555db21edd2bc42676d0b1c594, I am no longer able to successfully delete the loadbalancer. I get an error like:

      New Aws::Elb using per_thread-connection mode
      Deleting Load Balancer - lb2
      Opening new HTTPS connection to elasticloadbalancing.us-east-1.amazonaws.com:443
      warning: peer certificate won't be verified in this SSL session
      ThreadError - return can't jump across threads:
      ././server.rb:346
      ././lib/sinatra/respond_to.rb:244:in `call'
      ././lib/sinatra/respond_to.rb:244:in `respond_to'
      ././server.rb:345
      ././lib/sinatra/rabbit.rb:114:in `instance_eval'
      ././lib/sinatra/rabbit.rb:114:in `DELETE /api/load_balancers/:id'
      /usr/lib/ruby/gems/1.8/gems/sinatra-1.0/lib/sinatra/base.rb:871:in `call'
      /usr/lib/ruby/gems/1.8/gems/sinatra-1.0/lib/sinatra/base.rb:871:in `route'
      /usr/lib/ruby/gems/1.8/gems/sinatra-1.0/lib/sinatra/base.rb:527:in `instance_eval'
      <snip>

      I'll attach the full stack trace.

      1. stacktrace
        4 kB
        Chris Lalancette
      2. lb.rb
        0.7 kB
        David Lutterkort

        Activity

        Hide
        Chris Lalancette added a comment -

        Full stack trace when trying to delete a loadbalancer on EC2

        Show
        Chris Lalancette added a comment - Full stack trace when trying to delete a loadbalancer on EC2
        Hide
        David Lutterkort added a comment -

        For future entertainment, a script that triggers this problem

        Show
        David Lutterkort added a comment - For future entertainment, a script that triggers this problem
        Hide
        Michal Fojtik added a comment -

        After first look I think 'return' statement in this code is responsible for it:

        respond_to do |format|
        format.xml

        { return 204 }

        format.json

        { return 204 }

        format.html

        { return redirect(load_balancers_url) }

        end

        Going to test it.

        Show
        Michal Fojtik added a comment - After first look I think 'return' statement in this code is responsible for it: respond_to do |format| format.xml { return 204 } format.json { return 204 } format.html { return redirect(load_balancers_url) } end Going to test it.
        Hide
        Michal Fojtik added a comment -

        OK Done. After removing 'return' I get just:

        127.0.0.1 - - [05/May/2011 14:05:07] "DELETE /api/load_balancers/test1 HTTP/1.1" 302 - 0.6985
        New Aws::Elb using per_thread-connection mode
        Describing Load Balancers
        Opening new HTTPS connection to elasticloadbalancing.us-east-1.amazonaws.com:443

        Show
        Michal Fojtik added a comment - OK Done. After removing 'return' I get just: 127.0.0.1 - - [05/May/2011 14:05:07] "DELETE /api/load_balancers/test1 HTTP/1.1" 302 - 0.6985 New Aws::Elb using per_thread-connection mode Describing Load Balancers Opening new HTTPS connection to elasticloadbalancing.us-east-1.amazonaws.com:443
        Hide
        Ramesh A added a comment -

        Verified and working fine. Now Deltacloud API throws 303 exception instead of 302 and successfully deletes the load balancer. Michal says 303 can be accepted instead of 302. Below is the console output when a load balancer is deleted

        Console o/p:
        ==========
        I, 2012-03-22T16:31:34.850800 #11412 INFO – : New Aws::Elb using per_thread-connection mode
        I, 2012-03-22T16:31:34.851155 #11412 INFO – : Deleting Load Balancer - ramesh-check-lb
        W, 2012-03-22T16:31:34.851822 #11412 WARN – : Rightscale::HttpConnection : request failure count: 1, exception: #<Errno::EPIPE: Broken pipe>
        I, 2012-03-22T16:31:34.851888 #11412 INFO – : Opening new HTTPS connection to elasticloadbalancing.us-east-1.amazonaws.com:443
        127.0.0.1 - - [22/Mar/2012 16:31:36] "DELETE /api/load_balancers/ramesh-check-lb HTTP/1.1" 303 - 1.3600
        I, 2012-03-22T16:31:36.214053 #11412 INFO – : New Aws::Elb using per_thread-connection mode
        I, 2012-03-22T16:31:36.215143 #11412 INFO – : Describing Load Balancers
        I, 2012-03-22T16:31:36.215754 #11412 INFO – : Opening new HTTPS connection to elasticloadbalancing.us-east-1.amazonaws.com:443

        Note:
        ====
        Created a new issue https://issues.apache.org/jira/browse/DTACLOUD-167 for the broken pipe error

        Show
        Ramesh A added a comment - Verified and working fine. Now Deltacloud API throws 303 exception instead of 302 and successfully deletes the load balancer. Michal says 303 can be accepted instead of 302. Below is the console output when a load balancer is deleted Console o/p: ========== I, 2012-03-22T16:31:34.850800 #11412 INFO – : New Aws::Elb using per_thread-connection mode I, 2012-03-22T16:31:34.851155 #11412 INFO – : Deleting Load Balancer - ramesh-check-lb W, 2012-03-22T16:31:34.851822 #11412 WARN – : Rightscale::HttpConnection : request failure count: 1, exception: #<Errno::EPIPE: Broken pipe> I, 2012-03-22T16:31:34.851888 #11412 INFO – : Opening new HTTPS connection to elasticloadbalancing.us-east-1.amazonaws.com:443 127.0.0.1 - - [22/Mar/2012 16:31:36] "DELETE /api/load_balancers/ramesh-check-lb HTTP/1.1" 303 - 1.3600 I, 2012-03-22T16:31:36.214053 #11412 INFO – : New Aws::Elb using per_thread-connection mode I, 2012-03-22T16:31:36.215143 #11412 INFO – : Describing Load Balancers I, 2012-03-22T16:31:36.215754 #11412 INFO – : Opening new HTTPS connection to elasticloadbalancing.us-east-1.amazonaws.com:443 Note: ==== Created a new issue https://issues.apache.org/jira/browse/DTACLOUD-167 for the broken pipe error
        Hide
        Ramesh A added a comment -

        Forgot to mention the commit number

        commit - 7e372dfca79c02a799046287e5936129216b781b

        Show
        Ramesh A added a comment - Forgot to mention the commit number commit - 7e372dfca79c02a799046287e5936129216b781b
        Hide
        Ramesh A added a comment -

        Closing this issue as per my previous comments

        Show
        Ramesh A added a comment - Closing this issue as per my previous comments

          People

          • Assignee:
            Michal Fojtik
            Reporter:
            Chris Lalancette
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development