On Aug 21, 2012, at 1:28 AM, [email protected] wrote:

NACK :(

Unfortunately this patch set will break EC2 tests (rake test:drivers:ec2):

  1) Error:
test_0002_must return list of realms(Ec2Driver Realms):
Deltacloud::ExceptionHandler::ProviderError: RequestExpired: Request has 
expired. Timestamp date is 2012-07-30T11:05:00.000Z
REQUEST=ec2.us-east-1.amazonaws.com:443/?AWSAccessKeyId=AKIAJYOQYLLOIWN5LQ3A&Action=DescribeSubnets&SignatureMethod=HmacSHA256&SignatureVersion=2&Timestamp=2012-07-30T11%3A05%3A00.000Z&Version=2010-08-31&Signature=IiUb4TMnXSY2vdLZcsQ5PEHbIlpgfT1BUe7BeYcaf%2Fg%3D
 
REQUEST ID=d56ecde0-4ae0-4489-8cb3-b761bf42eb14 
    
/Users/mfojtik/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/aws-2.5.6/lib/awsbase/awsbase.rb:572:in
 `request_info_impl'
    
/Users/mfojtik/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/aws-2.5.6/lib/ec2/ec2.rb:177:in
 `request_info'
    
/Users/mfojtik/code/core/server/lib/deltacloud/drivers/ec2/aws_vpc_monkey_patch.rb:87:in
 `describe_subnets'
    
/Users/mfojtik/code/core/server/lib/deltacloud/drivers/ec2/ec2_driver.rb:197:in 
`block in realms'

* This one looks like not recorded request, since it's touching EC2. The test 
should be 're-recorded' so it will
  include this request as well.

  2) Error:
test_0004_must allow to retrieve single realm(Ec2Driver Realms):
Deltacloud::ExceptionHandler::ProviderError: undefined method `to_a' for 
"us-east-1a":String
    
/Users/mfojtik/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/aws-2.5.6/lib/ec2/ec2.rb:1119:in
 `describe_availability_zones'
    
/Users/mfojtik/code/core/server/lib/deltacloud/drivers/ec2/ec2_driver.rb:184:in 
`block in realms'
    /Users/mfojtik/code/core/server/lib/deltacloud/drivers/exceptions.rb:181:in 
`call'
    /Users/mfojtik/code/core/server/lib/deltacloud/drivers/exceptions.rb:181:in 
`safely'
    
/Users/mfojtik/code/core/server/lib/deltacloud/drivers/ec2/ec2_driver.rb:176:in 
`realms'
    
/Users/mfojtik/code/core/server/lib/deltacloud/drivers/base_driver.rb:213:in 
`realm'
    /Users/mfojtik/code/core/server/lib/deltacloud/api.rb:119:in 
`method_missing'
    /Users/mfojtik/code/core/server/tests/drivers/ec2/realms_test.rb:37:in 
`block (2 levels) in <top (required)>'

  3) Error:
test_0003_must allow to filter realms(Ec2Driver Realms):
Deltacloud::ExceptionHandler::ProviderError: undefined method `to_a' for 
"us-east-1a":String
    
/Users/mfojtik/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/aws-2.5.6/lib/ec2/ec2.rb:1119:in
 `describe_availability_zones'
    
/Users/mfojtik/code/core/server/lib/deltacloud/drivers/ec2/ec2_driver.rb:184:in 
`block in realms'
    /Users/mfojtik/code/core/server/lib/deltacloud/drivers/exceptions.rb:181:in 
`call'
    /Users/mfojtik/code/core/server/lib/deltacloud/drivers/exceptions.rb:181:in 
`safely'
    
/Users/mfojtik/code/core/server/lib/deltacloud/drivers/ec2/ec2_driver.rb:176:in 
`realms'
    /Users/mfojtik/code/core/server/lib/deltacloud/api.rb:119:in 
`method_missing'
    /Users/mfojtik/code/core/server/tests/drivers/ec2/realms_test.rb:29:in 
`block (2 levels) in <top (required)>

* No idea about this two :-)

But the code looks great, no inline comments from me.
Also you should include some tests for EC2 driver for this feature as well.

  -- Michal


> As recently discussed, these patches make it possible to launch instances
> into a subnet in a VPC in EC2.
> 
> Subnets appear as new realms with the name AZ:SN where AZ is the
> availability zone (e.g., us-east-1a) to which the subnet is attached, and
> SN is the subnet ID.
> 
> When such a realm is supplied to the create instances call, the SubnetID is
> sent to EC2, placing the instane in that subnet.
> 
> Note that you can not provide a security group when launching into a VPC,
> which makes the current HTML UI a little awkward, in that you have to
> uncheck the 'default' security group in the UI under 'Additional
> Parameters'
> 
> The VPC functionality requires some additional mappings from the AWS gem,
> which I have sent upstream[1] - until they are in a released AWS gem, I am
> including a monkey patch that puts them into the AWS::Ec2 class.
> 
> David
> 
> [1] https://github.com/appoxy/aws/pull/116

Michal Fojtik
http://deltacloud.org
[email protected]



Reply via email to