Subnets are not associated with VPCs when using AWS
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Canonical Juju |
Fix Released
|
High
|
Witold Krecicki | ||
2.2 |
Fix Released
|
High
|
Witold Krecicki |
Bug Description
When I attempted to bootstrap juju on AWS, it failed with the following:
ERROR fetching hosted model spaces: adding subnet "10.0.1.0/24": subnet "10.0.1.0/24" already exists
2017-06-22 18:01:20 DEBUG cmd supercommand.go:459 error stack:
github.
github.
github.
github.
github.
github.
github.
2017-06-22 18:01:20 DEBUG juju.cmd.jujud main.go:186 jujud complete, code 0, err <nil>
14:01:21 ERROR juju.cmd.
My account has 4 VPCs and 17 subnets across them. The subnet failure above is owned by one of the other VPCs (not the default one).
I added some debug code,
2017-06-22 18:01:20 INFO XXX subnets.go:209 AddSubnet state.SubnetInf
The ProviderNetworkId is "". The comment states that
// ProviderNetworkId holds the provider id of the network
// containing this subnet, for example VPC id for EC2.
Something is amiss.
Changed in juju: | |
importance: | Undecided → High |
status: | New → In Progress |
assignee: | nobody → Witold Krecicki (wpk) |
Changed in juju: | |
status: | Fix Committed → Fix Released |
I added some debug and it becomes more obvious what the issue is.
Like I stated, I have 4 VPCs, there are subnets across them that have identical CIDR ranges. The list of subnets to add are coming from mutiple VPCs. When they are added, a duplicate is detected because only the CIDR is taken into consideration.
Here are the subnets being added, I have set the NetworkId to be the VPC id.
AddSubnet() state.SubnetInf o{ProviderId: "subnet- 9c429dfb" , ProviderNetwork Id:"vpc- 327dc555" , CIDR:"10.0.1.0/24", VLANTag:0, AvailabilityZon e:"us-west- 2b", SpaceName:""} o{ProviderId: "subnet- 2bb24773" , ProviderNetwork Id:"vpc- c29f1da6" , CIDR:"10.0.1.0/24", VLANTag:0, AvailabilityZon e:"us-west- 2c", SpaceName:""}
AddSubnet() state.SubnetInf
Subnet() &state. subnetDoc{ DocID:" 45cb8652- b8ea-4daf- 8edd-68aa5b87e4 ce:10.0. 1.0/24" , ModelUUID: "45cb8652- b8ea-4daf- 8edd-68aa5b87e4 ce", Life:0, ProviderId: "subnet- 9c429dfb" , ProviderNetwork Id:"vpc- 327dc555" , CIDR:"10.0.1.0/24", VLANTag:0, AvailabilityZon e:"us-west- 2b", IsPublic:false, SpaceName:""}