-
Notifications
You must be signed in to change notification settings - Fork 78
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Previously only `az` was supported. Now when specifying multiple AZs in a subnet, all IPs from that subnet can be used in any instance_group/job that is in a zone that the subnet mentioned. This can lead to interesting scenarios when using mixes of multi-az subnets and single-az subnets, where different offsets can mean the same IP in a different zone, or the same index could mean different IPs in different zones. Try not to do this, as it will likely lead to confusion down the road. However, care is made to ensure that IPs are never re-used, regardless of what subnets/azs they were allowed to be used by. This should not affect any existing IP allocations, since previously the `azs` field wasn't looked at, and the old behaviors remain the same for `az` and no-azs.
- Loading branch information
1 parent
84c949d
commit e3380de
Showing
10 changed files
with
413 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
|
||
jobs: | ||
- name: static_z1 | ||
instances: 1 | ||
azs: [z1, z2, z3] | ||
networks: | ||
- name: net1 | ||
static_ips: (( static_ips(16) )) # should fail saying pool is only 16 big | ||
# definitely shouldn't say pool is 48 big | ||
# (# azs * size of pool == 48 in this case) | ||
networks: | ||
- name: net1 | ||
subnets: | ||
- azs: [ z1, z2, z3 ] | ||
static: | ||
- 10.0.0.1 - 10.0.0.15 | ||
- azs: [z1] | ||
static: | ||
- 10.1.1.1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
|
||
jobs: | ||
- name: static_z1 | ||
instances: 2 | ||
azs: [z1, z2, z3] | ||
networks: | ||
- name: net1 | ||
static_ips: (( static_ips(15, 16) )) # will grab 10.1.1.1 and 10.2.2.2 | ||
# from the 2nd/3rd subnet definitions | ||
networks: | ||
- name: net1 | ||
subnets: | ||
- azs: [ z1, z2, z3 ] | ||
static: | ||
- 10.0.0.1 - 10.0.0.15 | ||
- azs: [z1] | ||
static: | ||
- 10.1.1.1 | ||
- azs: [z2] | ||
static: | ||
- 10.2.2.2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
jobs: | ||
- azs: | ||
- z1 | ||
instances: 2 | ||
name: static_z1 | ||
networks: | ||
- name: net1 | ||
static_ips: (( static_ips(0, 15) )) | ||
networks: | ||
- name: net1 | ||
subnets: | ||
- azs: | ||
- z1 | ||
- z2 | ||
- z3 | ||
static: | ||
- 10.0.0.1 - 10.0.0.15 | ||
- azs: | ||
- z1 | ||
static: | ||
- 10.1.1.1 | ||
- azs: | ||
- z2 | ||
static: | ||
- 10.2.2.2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
|
||
jobs: | ||
- name: static_z1 | ||
instances: 1 | ||
azs: [z1] | ||
networks: | ||
- name: net1 | ||
static_ips: (( static_ips(15) )) | ||
- name: static_z2 | ||
instances: 1 | ||
azs: [z2] | ||
networks: | ||
- name: net1 | ||
static_ips: (( static_ips(15) )) | ||
networks: | ||
- name: net1 | ||
subnets: | ||
- azs: [ z1, z2, z3 ] | ||
static: | ||
- 10.0.0.1 - 10.0.0.15 | ||
- azs: [z1] | ||
static: | ||
- 10.1.1.1 | ||
- azs: [z2] | ||
static: | ||
- 10.2.2.2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
|
||
jobs: | ||
- name: static_z1 | ||
instances: 1 | ||
azs: [z1, z2, z3] | ||
networks: | ||
- name: net1 | ||
static_ips: (( static_ips(16) )) | ||
- name: static_z2 | ||
instances: 1 | ||
azs: [z2] | ||
networks: | ||
- name: net1 | ||
static_ips: (( static_ips(15) )) | ||
networks: | ||
- name: net1 | ||
subnets: | ||
- azs: [ z1, z2, z3 ] | ||
static: | ||
- 10.0.0.1 - 10.0.0.15 | ||
- azs: [z1] | ||
static: | ||
- 10.1.1.1 | ||
- azs: [z2] | ||
static: | ||
- 10.2.2.2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
|
||
jobs: | ||
- name: static_z1 | ||
instances: 1 | ||
azs: [z1] | ||
networks: | ||
- name: net1 | ||
static_ips: (( static_ips(14) )) | ||
- name: static_z2 | ||
instances: 1 | ||
azs: [z2] | ||
networks: | ||
- name: net1 | ||
static_ips: (( static_ips(14) )) | ||
networks: | ||
- name: net1 | ||
subnets: | ||
- azs: [ z1, z2, z3 ] | ||
static: | ||
- 10.0.0.1 - 10.0.0.15 | ||
- azs: [z1] | ||
static: | ||
- 10.1.1.1 | ||
- azs: [z2] | ||
static: | ||
- 10.2.2.2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
|
||
jobs: | ||
- name: static_z1 | ||
instances: 1 | ||
azs: [z2] | ||
networks: | ||
- name: net1 | ||
static_ips: (( static_ips(15) )) # should fail to grab 10.1.1.1, giving | ||
# an index offset error - z2 only has 15 IPs | ||
networks: | ||
- name: net1 | ||
subnets: | ||
- azs: [ z1, z2, z3 ] | ||
static: | ||
- 10.0.0.1 - 10.0.0.15 | ||
- azs: [z1] | ||
static: | ||
- 10.1.1.1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# Bug Fixes | ||
|
||
- Fixes #201 by supporting `azs` key in subnets | ||
|
||
Previously only `az` was supported. Now when specifying | ||
multiple AZs in a subnet, all IPs from that subnet can be | ||
used in any instance-group/job that is in a zone that the | ||
subnet mentioned. | ||
|
||
This can lead to interesting scenarios when using mixes of | ||
multi-az subnets and single-az subnets, where different offsets | ||
can mean the same IP in a different zone, or the same index could | ||
mean different IPs in different zones. Try not to do this, as it will | ||
likely lead to confusion down the road. However, care is made to ensure | ||
that IPs are never re-used, regardless of what subnets/azs they were | ||
allowed to be used by. | ||
|
||
This should not affect any existing IP allocations, since previously the | ||
`azs` field wasn't looked at, and the old behaviors remain the same | ||
for `az` and no-azs. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.