ec2_asg: Duplicate subnets specified error

85 views
Skip to first unread message

Arangel Angov

unread,
Mar 20, 2015, 7:40:16 AM3/20/15
to ansible...@googlegroups.com
Hello,

I wasn't able to find any reference to this so far so here it goes:

I have a playbook that creates a new autoscaling group

ec2_asg:
         name:   "{{ asg_name }}"
         region: "us-east-1"
         availability_zones: "us-east-1b,us-east-1c,us-east-1d,us-east-1e"
         vpc_zone_identifier: [ 'subnet-xxxxxxxx', 'subnet-xxxxxxxx', 'subnet-xxxxxxxx', 'subnet-xxxxxxxx' ]
         launch_config_name: "xxxxxxxx-{{ unique_id }}"
         health_check_period: 60
         health_check_type: ELB
         min_size: 2
         max_size: 8
         desired_capacity: 2
         replace_all_instances: yes
         load_balancers: "{{ load_balancer }}"
         wait_timeout: 600


I'm getting the following error on the task when running the playbook:

msg: BotoServerError: 400 Bad Request
<ErrorResponse xmlns="http://autoscaling.amazonaws.com/doc/2011-01-01/">
  <Error>
    <Type>Sender</Type>
    <Code>ValidationError</Code>
    <Message>Duplicate subnets specified: [x, x, x, x, ', ', s, u, b, n, e, t, -, x, x, x, x, ,x x, ', ', s, u, b, n, e, t, -, x, x, x, x, x, ', ', s, u, b, n, e, t, -, x, x, x, x, x, x, ']</Message>
  </Error>
  <RequestId>xxxxxxxxxxxxxxxxxxxxxxx</RequestId>
</ErrorResponse>



I've double-checked my subnets and they are unique.

According to the example in the documentation, the value for vpc_zone_identifier should always be a list.


Anyone seen this before or now with Ansible 1.8.4?

Thanks.

--
Arangel

Disclaimer

This email is really important (well, most of them are.). Also, hopefully the message has been sent to the person it’s intended for. If we stuffed up by entering the wrong email address, we’re very sorry for cluttering up your inbox. But if we have done that, then please do us a favour and let us know…and if you could keep the juicy bits to yourself, that would be great too.

Also…stuff that’s said in this message are the views of the person writing the email and do not actually represent the views of GetSocial (although they might, but we’re just hedging our bets here). Don’t think for one minute that anything in this message should be construed as creating a contract.

GetSocial owns the email infrastructure, including the contents.

Finally…do the right thing by the environment and “think before you ink”!

**********************************************************************

Will Vaughn

unread,
Mar 22, 2015, 4:55:16 PM3/22/15
to ansible...@googlegroups.com
I am getting the same problem. Ansible seems to be iterating over each letter in a subnet id looking for duplicate letters. Not very helpful validation. You would think unit tests would catch this before deployment, but they probably used a string that has no duplicate letters...

James Martin

unread,
Mar 22, 2015, 5:42:32 PM3/22/15
to ansible...@googlegroups.com
This should be patched in 1.9 RC2.   https://github.com/ansible/ansible-modules-core/issues/967

- James

Will Vaughn

unread,
Mar 23, 2015, 10:26:34 PM3/23/15
to ansible...@googlegroups.com
Looking at PR's its pretty clear there isn't unit test coverage for most of the modules, is that really correct? I really think they existed hooked up CI tool you'd catch things like this earlier.

I know I sound like an asshole harping on this. Ansible really is a solid project and I've liked it at times, but when you're trying to get some infrastructure spun up and you get stuck looking at release candidate fixes on google groups and github issues pages every time you try to do something. You start reflecting on the fact that this tool was supposed to make configuration management easier for you. :/
Reply all
Reply to author
Forward
0 new messages