Skip to content

Commit 65fe1fa

Browse files
authored
Merge pull request #28 from stackhpc/cluster_nets
Avoid duplicate port attachment. Fix #25 (v20.2.0)
2 parents e2b5758 + 391c164 commit 65fe1fa

14 files changed

+74
-203
lines changed

files/resources/cluster-group.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,8 @@ resources:
140140
availability_zone: { get_param: cluster_az }
141141
config_drive: { get_param: cluster_config_drive }
142142
group_node_ports: { get_attr: [port_group, networks] }
143-
group_node_ips: { get_attr: [port_group, primary_ip] }
143+
group_primary_ip: { get_attr: [port_group, primary_ip] }
144+
group_node_ips: { get_attr: [port_group, node_ips] }
144145
node_idx: "%index%"
145146

146147
outputs:

files/resources/instance-multi.yaml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,12 @@ parameters:
3434
group_node_ports:
3535
type: json
3636
label: Nested list of port resources for all nodes in this group
37-
group_node_ips:
37+
group_primary_ip:
3838
type: json
3939
label: List of primary IPs for all nodes in this group
40+
group_node_ips:
41+
type: json
42+
label: List of list of IPs per interface for all nodes in this group
4043
node_idx:
4144
type: number
4245
label: Resource group index of this node
@@ -115,6 +118,7 @@ outputs:
115118
description: ID of the primary IP
116119
value:
117120
name: {get_param: name}
118-
ip: {get_param: [group_node_ips, {get_param: node_idx}]}
121+
ip: {get_param: [group_primary_ip, {get_param: node_idx}]}
122+
node_ips: {get_param: [group_node_ips, {get_param: node_idx}]}
119123
id: {get_resource: instance}
120124
ports_gt_1: {equals: [ports_gt_1_yaql, True]}

files/resources/instance-w-volume.yaml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,12 @@ parameters:
3434
group_node_ports:
3535
type: json
3636
label: Nested list of port resources for all nodes in this group
37-
group_node_ips:
37+
group_primary_ip:
3838
type: json
3939
label: List of primary IPs for all nodes in this group
40+
group_node_ips:
41+
type: json
42+
label: List of list of IPs per interface for all nodes in this group
4043
node_idx:
4144
type: number
4245
label: Resource group index of this node
@@ -115,5 +118,6 @@ outputs:
115118
description: ID of the primary IP
116119
value:
117120
name: {get_param: name}
118-
ip: {get_param: [group_node_ips, {get_param: node_idx}]}
121+
ip: {get_param: [group_primary_ip, {get_param: node_idx}]}
122+
node_ips: {get_param: [group_node_ips, {get_param: node_idx}]}
119123
id: {get_resource: instance}

files/resources/instance.yaml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,12 @@ parameters:
3434
group_node_ports:
3535
type: json
3636
label: Nested list of port resources for all nodes in this group
37-
group_node_ips:
37+
group_primary_ip:
3838
type: json
3939
label: List of primary IPs for all nodes in this group
40+
group_node_ips:
41+
type: json
42+
label: List of list of IPs per interface for all nodes in this group
4043
node_idx:
4144
type: number
4245
label: Resource group index of this node
@@ -66,5 +69,6 @@ outputs:
6669
description: ID of the primary IP
6770
value:
6871
name: {get_param: name}
69-
ip: {get_param: [group_node_ips, {get_param: node_idx}]}
72+
ip: {get_param: [group_primary_ip, {get_param: node_idx}]}
73+
node_ips: {get_param: [group_node_ips, {get_param: node_idx}]}
7074
id: {get_resource: instance}

files/resources/nodenet-1.yaml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,11 @@ outputs:
5252
value:
5353
- port: { get_resource: port }
5454

55+
node_ips:
56+
description: List of list of IPs assigned on the named cluster networks
57+
value:
58+
- - { get_attr: [ port, fixed_ips, 0, ip_address ] }
59+
5560
primary_ip:
56-
description: ID of the IP assigned on the named cluster network
61+
description: The primary IP of the instance
5762
value: { get_attr: [ port, fixed_ips, 0, ip_address ] }

files/resources/nodenet-2-w-fip-sriov.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,13 @@ outputs:
7979
- port: { get_resource: port1 }
8080
- port: { get_resource: port2 }
8181

82+
node_ips:
83+
description: List of list of IPs assigned on the named cluster networks
84+
value:
85+
- - { get_attr: [ floating_ip, floating_ip_address ] }
86+
- { get_attr: [ port1, fixed_ips, 0, ip_address ] }
87+
- - { get_attr: [ port2, fixed_ips, 0, ip_address ] }
88+
8289
primary_ip:
8390
description: The primary IP of the instance
8491
value: { get_attr: [ floating_ip, floating_ip_address ] }

files/resources/nodenet-2-w-fip.yaml

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -60,27 +60,28 @@ resources:
6060
type: OS::Neutron::FloatingIPAssociation
6161
properties:
6262
floatingip_id: { get_resource: floating_ip }
63-
port_id: { get_resource: port }
63+
port_id: { get_resource: port1 }
6464

6565
outputs:
6666
OS::stack_id:
6767
description: The network list
6868
value:
69-
- port: { get_resource: port }
69+
- port1: { get_resource: port1 }
70+
- port2: { get_resource: port2 }
7071

7172
networks:
7273
description: The network list
7374
value:
74-
- port: { get_resource: port }
75+
- port: { get_resource: port1 }
76+
- port: { get_resource: port2 }
7577

76-
internal_ip1:
77-
description: ID of the IP assigned on the first named cluster network
78-
value: { get_attr: [ port, fixed_ips, 0, ip_address ] }
79-
80-
internal_ip2:
81-
description: ID of the IP assigned on the second cluster network
82-
value: { get_attr: [ port, fixed_ips, 1, ip_address ] }
78+
node_ips:
79+
description: List of list of IPs assigned on the named cluster networks
80+
value:
81+
- - { get_attr: [ floating_ip, floating_ip_address ] }
82+
- { get_attr: [ port1, fixed_ips, 0, ip_address ] }
83+
- - { get_attr: [ port2, fixed_ips, 0, ip_address ] }
8384

8485
primary_ip:
85-
description: ID of the Neutron floating IP
86+
description: The primary IP of the instance
8687
value: { get_attr: [ floating_ip, floating_ip_address ] }

files/resources/nodenet-2.yaml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,12 @@ outputs:
7878
- port: { get_resource: port1 }
7979
- port: { get_resource: port2 }
8080

81+
node_ips:
82+
description: List of list of IPs assigned on the named cluster networks
83+
value:
84+
- - { get_attr: [ port1, fixed_ips, 0, ip_address ] }
85+
- - { get_attr: [ port2, fixed_ips, 0, ip_address ] }
86+
8187
primary_ip:
82-
description: ID of the IP assigned on the named cluster network
88+
description: The primary IP of the instance
8389
value: { get_attr: [ port1, fixed_ips, 0, ip_address ] }

files/resources/nodenet-3.yaml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,13 @@ outputs:
8383
- port: { get_resource: port2 }
8484
- port: { get_resource: port3 }
8585

86+
node_ips:
87+
description: List of list of IPs assigned on the named cluster networks
88+
value:
89+
- - { get_attr: [ port1, fixed_ips, 0, ip_address ] }
90+
- - { get_attr: [ port2, fixed_ips, 0, ip_address ] }
91+
- - { get_attr: [ port3, fixed_ips, 0, ip_address ] }
92+
8693
primary_ip:
87-
description: ID of the IP assigned on the named cluster network
94+
description: The primary IP of the instance
8895
value: { get_attr: [ port1, fixed_ips, 0, ip_address ] }

files/resources/nodenet-w-fip.yaml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -64,10 +64,12 @@ outputs:
6464
value:
6565
- port: { get_resource: port }
6666

67-
internal_ip:
68-
description: ID of the IP assigned on the named cluster network
69-
value: { get_attr: [ port, fixed_ips, 0, ip_address ] }
67+
node_ips:
68+
description: List of list of IPs assigned on the named cluster networks
69+
value:
70+
- - { get_attr: [ floating_ip, floating_ip_address ] }
71+
- { get_attr: [ port, fixed_ips, 0, ip_address ] }
7072

7173
primary_ip:
72-
description: ID of the Neutron floating IP
74+
description: The primary IP of the instance
7375
value: { get_attr: [ floating_ip, floating_ip_address ] }

0 commit comments

Comments
 (0)