You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@deltacloud.apache.org by "Ramesh A (JIRA)" <ji...@apache.org> on 2012/06/12 13:03:42 UTC

[jira] [Comment Edited] (DTACLOUD-169) Deltacloud API does not validate for the existence of an load balancer while deleting it in EC2 setup

    [ https://issues.apache.org/jira/browse/DTACLOUD-169?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13293508#comment-13293508 ] 

Ramesh A edited comment on DTACLOUD-169 at 6/12/12 11:03 AM:
-------------------------------------------------------------

Verified and working fine.

I am sorry about my typo mistake error in my previous comment regarding the curl command.  The correct command is supposed to be "curl -X DELETE" and not "curl -X Delete".  Thanks Michal for pointing out this to me.

Here is the test result w.r.t the above comments
1. Deleting from Web-ui:
==================
This was an error which has been fixed in https://issues.apache.org/jira/browse/DTACLOUD-231

2. Deleting from cURL:
================
a) Deleting an existing loadbalancer results in 204 response code
log output
=======
I, [2012-06-12T06:21:24.288446 #3306]  INFO -- : New Aws::Elb using per_thread-connection mode
I, [2012-06-12T06:21:24.289473 #3306]  INFO -- : New Aws::Elb using per_thread-connection mode
I, [2012-06-12T06:21:24.291163 #3306]  INFO -- : Describing Load Balancers
I, [2012-06-12T06:21:24.340342 #3306]  INFO -- : New Aws::Ec2 using per_thread-connection mode
I, [2012-06-12T06:21:24.410757 #3306]  INFO -- : Deleting Load Balancer - ramesh-test-aws-lb
10.11.10.162 - - [12/Jun/2012 06:21:24] "DELETE /api/load_balancers/ramesh-test-aws-lb?format=xml HTTP/1.1" 204 - 0.1917

b) Deleting an non existing loadbalancer results in 404 response code
log output:
=======
I, [2012-06-12T06:11:51.844047 #3268]  INFO -- : New Aws::Elb using per_thread-connection mode
I, [2012-06-12T06:11:51.846874 #3268]  INFO -- : New Aws::Elb using per_thread-connection mode
I, [2012-06-12T06:11:51.847014 #3268]  INFO -- : Describing Load Balancers
I, [2012-06-12T06:11:51.848183 #3268]  INFO -- : Opening new HTTPS connection to elasticloadbalancing.us-east-1.amazonaws.com:443
W, [2012-06-12T06:11:52.086191 #3268]  WARN -- : ##### Aws::Elb returned an error: 400 Bad Request
<ErrorResponse xmlns="http://elasticloadbalancing.amazonaws.com/doc/2009-05-15/">
  <Error>
    <Type>Sender</Type>
    <Code>LoadBalancerNotFound</Code>
  </Error>
  <RequestId>07ac5d56-b477-11e1-afb7-8f588567225c</RequestId>
</ErrorResponse>
 #####
W, [2012-06-12T06:11:52.086360 #3268]  WARN -- : ##### Aws::Elb request: elasticloadbalancing.us-east-1.amazonaws.com:443/?AWSAccessKeyId=AKIAIPXNUEQVP32G4T2A&Action=DescribeLoadBalancers&LoadBalancerNames.member.1=ramesh-test-lb-dc&SignatureMethod=HmacSHA256&SignatureVersion=2&Timestamp=2012-06-12T10%3A11%3A51.000Z&Version=2009-05-15&Signature=GZxGTrmadmQx0Gk9K0mSxDH9FJcPmeTJopOU%2BVYSLXc%3D ####
Aws::AwsError:400: Bad Request (elasticloadbalancing.us-east-1.amazonaws.com:443/?AWSAccessKeyId=AKIAIPXNUEQVP32G4T2A&Action=DescribeLoadBalancers&LoadBalancerNames.member.1=ramesh-test-lb-dc&SignatureMethod=HmacSHA256&SignatureVersion=2&Timestamp=2012-06-12T10%3A11%3A51.000Z&Version=2009-05-15&Signature=GZxGTrmadmQx0Gk9K0mSxDH9FJcPmeTJopOU%2BVYSLXc%3D)
REQUEST=elasticloadbalancing.us-east-1.amazonaws.com:443/?AWSAccessKeyId=AKIAIPXNUEQVP32G4T2A&Action=DescribeLoadBalancers&LoadBalancerNames.member.1=ramesh-test-lb-dc&SignatureMethod=HmacSHA256&SignatureVersion=2&Timestamp=2012-06-12T10%3A11%3A51.000Z&Version=2009-05-15&Signature=GZxGTrmadmQx0Gk9K0mSxDH9FJcPmeTJopOU%2BVYSLXc%3D 
REQUEST ID=-undefined- 
/usr/lib/ruby/gems/1.8/gems/aws-2.5.5/lib/ses/../awsbase/awsbase.rb:572:in `request_info_impl'
/usr/lib/ruby/gems/1.8/gems/aws-2.5.5/lib/ses/../awsbase/awsbase.rb:316:in `request_info2'
/usr/lib/ruby/gems/1.8/gems/aws-2.5.5/lib/elb/elb_interface.rb:59:in `request_info'
/usr/lib/ruby/gems/1.8/gems/aws-2.5.5/lib/elb/elb_interface.rb:161:in `describe_load_balancers'
/usr/share/deltacloud-core/lib/deltacloud/./helpers/../drivers/ec2/ec2_driver.rb:363:in `load_balancers'
/usr/share/deltacloud-core/lib/deltacloud/./drivers/exceptions.rb:173:in `call'
/usr/share/deltacloud-core/lib/deltacloud/./drivers/exceptions.rb:173:in `safely'
/usr/share/deltacloud-core/lib/deltacloud/./helpers/../drivers/ec2/ec2_driver.rb:362:in `load_balancers'
/usr/share/deltacloud-core/lib/deltacloud/./helpers/../drivers/ec2/ec2_driver.rb:354:in `load_balancer'
/usr/share/deltacloud-core/lib/deltacloud/./helpers/../drivers/ec2/ec2_driver.rb:385:in `destroy_load_balancer'
/usr/share/deltacloud-core/lib/deltacloud/./collections/load_balancers.rb:72
10.11.10.160 - - [12/Jun/2012 06:11:52] "DELETE /api/load_balancers/ramesh-test-lb-dc?format=xml HTTP/1.1" 404 18 0.2584

                
      was (Author: rananda):
    There was a mistake in my previous comment regarding the curl command.  The correct command is supposed to be "curl -X DELETE" and not "curl -X Delete".  Thanks Michal for pointing out this to me.

Here is the test result w.r.t the above comments
1. Deleting from Web-ui:
==================
This was an error which has been fixed in https://issues.apache.org/jira/browse/DTACLOUD-231

2. Deleting from cURL:
================
a) Deleting an existing loadbalancer results in 204 response code
log output
=======
I, [2012-06-12T06:21:24.288446 #3306]  INFO -- : New Aws::Elb using per_thread-connection mode
I, [2012-06-12T06:21:24.289473 #3306]  INFO -- : New Aws::Elb using per_thread-connection mode
I, [2012-06-12T06:21:24.291163 #3306]  INFO -- : Describing Load Balancers
I, [2012-06-12T06:21:24.340342 #3306]  INFO -- : New Aws::Ec2 using per_thread-connection mode
I, [2012-06-12T06:21:24.410757 #3306]  INFO -- : Deleting Load Balancer - ramesh-test-aws-lb
10.11.10.162 - - [12/Jun/2012 06:21:24] "DELETE /api/load_balancers/ramesh-test-aws-lb?format=xml HTTP/1.1" 204 - 0.1917

b) Deleting an non existing loadbalancer results in 404 response code
log output:
=======
I, [2012-06-12T06:11:51.844047 #3268]  INFO -- : New Aws::Elb using per_thread-connection mode
I, [2012-06-12T06:11:51.846874 #3268]  INFO -- : New Aws::Elb using per_thread-connection mode
I, [2012-06-12T06:11:51.847014 #3268]  INFO -- : Describing Load Balancers
I, [2012-06-12T06:11:51.848183 #3268]  INFO -- : Opening new HTTPS connection to elasticloadbalancing.us-east-1.amazonaws.com:443
W, [2012-06-12T06:11:52.086191 #3268]  WARN -- : ##### Aws::Elb returned an error: 400 Bad Request
<ErrorResponse xmlns="http://elasticloadbalancing.amazonaws.com/doc/2009-05-15/">
  <Error>
    <Type>Sender</Type>
    <Code>LoadBalancerNotFound</Code>
  </Error>
  <RequestId>07ac5d56-b477-11e1-afb7-8f588567225c</RequestId>
</ErrorResponse>
 #####
W, [2012-06-12T06:11:52.086360 #3268]  WARN -- : ##### Aws::Elb request: elasticloadbalancing.us-east-1.amazonaws.com:443/?AWSAccessKeyId=AKIAIPXNUEQVP32G4T2A&Action=DescribeLoadBalancers&LoadBalancerNames.member.1=ramesh-test-lb-dc&SignatureMethod=HmacSHA256&SignatureVersion=2&Timestamp=2012-06-12T10%3A11%3A51.000Z&Version=2009-05-15&Signature=GZxGTrmadmQx0Gk9K0mSxDH9FJcPmeTJopOU%2BVYSLXc%3D ####
Aws::AwsError:400: Bad Request (elasticloadbalancing.us-east-1.amazonaws.com:443/?AWSAccessKeyId=AKIAIPXNUEQVP32G4T2A&Action=DescribeLoadBalancers&LoadBalancerNames.member.1=ramesh-test-lb-dc&SignatureMethod=HmacSHA256&SignatureVersion=2&Timestamp=2012-06-12T10%3A11%3A51.000Z&Version=2009-05-15&Signature=GZxGTrmadmQx0Gk9K0mSxDH9FJcPmeTJopOU%2BVYSLXc%3D)
REQUEST=elasticloadbalancing.us-east-1.amazonaws.com:443/?AWSAccessKeyId=AKIAIPXNUEQVP32G4T2A&Action=DescribeLoadBalancers&LoadBalancerNames.member.1=ramesh-test-lb-dc&SignatureMethod=HmacSHA256&SignatureVersion=2&Timestamp=2012-06-12T10%3A11%3A51.000Z&Version=2009-05-15&Signature=GZxGTrmadmQx0Gk9K0mSxDH9FJcPmeTJopOU%2BVYSLXc%3D 
REQUEST ID=-undefined- 
/usr/lib/ruby/gems/1.8/gems/aws-2.5.5/lib/ses/../awsbase/awsbase.rb:572:in `request_info_impl'
/usr/lib/ruby/gems/1.8/gems/aws-2.5.5/lib/ses/../awsbase/awsbase.rb:316:in `request_info2'
/usr/lib/ruby/gems/1.8/gems/aws-2.5.5/lib/elb/elb_interface.rb:59:in `request_info'
/usr/lib/ruby/gems/1.8/gems/aws-2.5.5/lib/elb/elb_interface.rb:161:in `describe_load_balancers'
/usr/share/deltacloud-core/lib/deltacloud/./helpers/../drivers/ec2/ec2_driver.rb:363:in `load_balancers'
/usr/share/deltacloud-core/lib/deltacloud/./drivers/exceptions.rb:173:in `call'
/usr/share/deltacloud-core/lib/deltacloud/./drivers/exceptions.rb:173:in `safely'
/usr/share/deltacloud-core/lib/deltacloud/./helpers/../drivers/ec2/ec2_driver.rb:362:in `load_balancers'
/usr/share/deltacloud-core/lib/deltacloud/./helpers/../drivers/ec2/ec2_driver.rb:354:in `load_balancer'
/usr/share/deltacloud-core/lib/deltacloud/./helpers/../drivers/ec2/ec2_driver.rb:385:in `destroy_load_balancer'
/usr/share/deltacloud-core/lib/deltacloud/./collections/load_balancers.rb:72
10.11.10.160 - - [12/Jun/2012 06:11:52] "DELETE /api/load_balancers/ramesh-test-lb-dc?format=xml HTTP/1.1" 404 18 0.2584

                  
> Deltacloud API does not validate for the existence of an load balancer while deleting it in EC2 setup
> -----------------------------------------------------------------------------------------------------
>
>                 Key: DTACLOUD-169
>                 URL: https://issues.apache.org/jira/browse/DTACLOUD-169
>             Project: DeltaCloud
>          Issue Type: Bug
>          Components: Client (Ruby), Server
>         Environment: Deltacloud API 0.5.0
> commit - 7e372dfca79c02a799046287e5936129216b781b
> OS - Fedora 16, RHEl 6.1
> Setup - EC2 
>            Reporter: Ramesh A
>            Assignee: Michal Fojtik
>
> Deltacloud API does not validate for the existence of an load balancer while deleting it for EC2 setup. 
> Scenario's:
> ==========
> 1. Try deleting the an existing load balancer multiple times
> 2. Try deleting the non existing load balancer (can be executed multiple times also)
> Curl Command: (Note i have executed this command trice and deltacloud API does not seems to validate and give the same output in the console)
> ===========
> curl -X DELETE --user "user:password" "http://localhost:3003/api/load_balancers/ramesh-test-lb?format=xml"
> Console o/p:
> =========
> First time:
> ========
> I, [2012-03-22T18:08:14.750269 #11412]  INFO -- : New Aws::Elb using per_thread-connection mode
> I, [2012-03-22T18:08:14.750591 #11412]  INFO -- : Deleting Load Balancer - ramesh-test-lb
> W, [2012-03-22T18:08:14.751262 #11412]  WARN -- : Rightscale::HttpConnection : request failure count: 1, exception: #<Errno::EPIPE: Broken pipe>
> I, [2012-03-22T18:08:14.751330 #11412]  INFO -- : Opening new HTTPS connection to elasticloadbalancing.us-east-1.amazonaws.com:443
> 127.0.0.1 - - [22/Mar/2012 18:08:16] "DELETE /api/load_balancers/ramesh-test-lb?format=xml HTTP/1.1" 204 - 1.6519
> Second Time:
> ==========
> I, [2012-03-22T18:08:25.004502 #11412]  INFO -- : New Aws::Elb using per_thread-connection mode
> I, [2012-03-22T18:08:25.004618 #11412]  INFO -- : Deleting Load Balancer - ramesh-test-lb
> W, [2012-03-22T18:08:25.005328 #11412]  WARN -- : Rightscale::HttpConnection : request failure count: 1, exception: #<Errno::EPIPE: Broken pipe>
> I, [2012-03-22T18:08:25.005416 #11412]  INFO -- : Opening new HTTPS connection to elasticloadbalancing.us-east-1.amazonaws.com:443
> 127.0.0.1 - - [22/Mar/2012 18:08:26] "DELETE /api/load_balancers/ramesh-test-lb?format=xml HTTP/1.1" 204 - 1.6351
> Third Time:
> ========
> I, [2012-03-22T18:08:28.944863 #11412]  INFO -- : New Aws::Elb using per_thread-connection mode
> I, [2012-03-22T18:08:28.945209 #11412]  INFO -- : Deleting Load Balancer - ramesh-test-lb
> W, [2012-03-22T18:08:28.945891 #11412]  WARN -- : Rightscale::HttpConnection : request failure count: 1, exception: #<Errno::EPIPE: Broken pipe>
> I, [2012-03-22T18:08:28.945966 #11412]  INFO -- : Opening new HTTPS connection to elasticloadbalancing.us-east-1.amazonaws.com:443
> 127.0.0.1 - - [22/Mar/2012 18:08:30] "DELETE /api/load_balancers/ramesh-test-lb?format=xml HTTP/1.1" 204 - 1.6125

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira