Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

create_instance using cloud availability zone instead of hosts #594

Open
dsadaka opened this issue Aug 8, 2016 · 1 comment
Open

create_instance using cloud availability zone instead of hosts #594

dsadaka opened this issue Aug 8, 2016 · 1 comment

Comments

@dsadaka
Copy link

dsadaka commented Aug 8, 2016

I am creating my first vpc based instance with rubber. I received the error:

Conflict => The CIDR '<hidden>' conflicts with another...

Reading through the code I discovered that availability zone was nil so when vpc looked up the subnet it didn't find it and then tried to create it. Further perusal lead be to the offending code in instances.rb:

def create_instance(instance_alias, instance_roles, create_spot_instance)
role_names = instance_roles.collect{|x| x.name}
env = rubber_cfg.environment.bind(role_names, instance_alias)
cloud_env = env.cloud_providers[env.cloud_provider]

availability_zone = cloud_env.availability_zone

...

instance_item.zone = availability_zone

Shouldn't this be using the hosts availability zone instead of the cloud_providers? After all it's recommended in rubber.yml that this setting be made at the host level. Setup like this, I'm going to have to change the cloud_provider availability_zone each time.

@davebenvenuti
Copy link
Contributor

I think you're right. I will look into this. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants