Browse files

[aws_cpi] we need to ignore AWS::EC2::Errors::InvalidSubnetID::NotFou…

…nd while waiting for subnets to be available
  • Loading branch information...
1 parent b6b078a commit ed289cfeb48e3d311193eb0b31ccee8cb393142f @pmenglund pmenglund committed Mar 13, 2013
Showing with 3 additions and 1 deletion.
  1. +3 −1 bosh_aws_cpi/lib/cloud/aws/resource_wait.rb
View
4 bosh_aws_cpi/lib/cloud/aws/resource_wait.rb
@@ -87,7 +87,9 @@ def self.for_subnet(args)
valid_states = [:available]
validate_states(valid_states, target_state)
- new.for_resource(resource: subnet, target_state: target_state, state_method: :state) do |current_state|
+ ignored_errors = [AWS::EC2::Errors::InvalidSubnetID::NotFound]
+
+ new.for_resource(resource: subnet, target_state: target_state, errors: ignored_errors, state_method: :state) do |current_state|
current_state == target_state
end
end

0 comments on commit ed289cf

Please sign in to comment.