[aws; beta13] Juju can pick subnets from the wrong VPC with spaces constraints specified

Bug #1609343 reported by Dimiter Naydenov
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Canonical Juju
Fix Released
High
Dimiter Naydenov

Bug Description

Steps to reproduce (currently on rev# e2dec28):

1. Multiple VPCs and subnets should exist in some (or all) AZs, so there is a mix of subnets from different VPCs in a given AZ.
2. Bootstrap on AWS with --config vpc-id=vpc-a1b2c3d4 (a non-default VPC ID).
3. Add a model with the same VPC ID (juju add-model hosted ... --config vpc-id=vpc-a1b2c3d4)
4. Add a space (juju add-space mytest)
5. Add one or more subnets to that space, from same VPC the controller runs in (juju add-subnet xxx mytest ..)
6. Deploy with spaces, possibly multiple units to up the chance of picking "empty" AZ with multiple different VPC subnets (juju deploy ubuntu --num-units 4 --constraints spaces=mytest)

Expected: Success; all units come up as expected in different AZ (verifying the auto-AZ distributuon worked), but in subnets of the controller VPC.

Actual: Provisioning fails with an error (visible in juju status --format yaml) like this:
...
"1":
    juju-status:
      current: error
      message: 'cannot run instances: Security group sg-7d3cd107 and subnet subnet-bf1a3cc8
        belong to different networks. (InvalidParameter)'
      since: 02 Aug 2016 10:28:06-07:00
    instance-id: pending
...

(subnet-bf1a3cc8 is from a different VPC, sg-7d3cd107 is from the specified controller and hosted model VPC)

In StartInstance() of the EC2 provider, Juju should filter all subnets in SubnetsToZones argument, in the chosen AZ to exclude those not part of the model's vpcID setting (if populated).

Changed in juju-core:
milestone: none → 2.0-beta14
assignee: nobody → Dimiter Naydenov (dimitern)
description: updated
Revision history for this message
Dimiter Naydenov (dimitern) wrote :
Curtis Hovey (sinzui)
Changed in juju-core:
milestone: 2.0-beta14 → 2.0-beta15
Changed in juju-core:
status: In Progress → Fix Committed
milestone: 2.0-beta15 → 2.0-beta14
milestone: 2.0-beta14 → 2.0-beta15
Revision history for this message
james beedy (jamesbeedy) wrote :

@dimitern, for me this issue exists for subnets within the same vpc :-(

Revision history for this message
Anastasia (anastasia-macmood) wrote :

@jamesbeedy

Could you please confirm your version of Juju? Or are you testing from trunk?
The fix for this bug was committed 5 days ago and will be available in beta15 which is due this week.

Curtis Hovey (sinzui)
Changed in juju-core:
status: Fix Committed → Fix Released
affects: juju-core → juju
Changed in juju:
milestone: 2.0-beta15 → none
milestone: none → 2.0-beta15
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.