Use /32 or /128 netmask for VIPs
Commit1ebf115f85
hard code the netmask for VIPs to /32. This will not work for IPv6. Add a conditional checking for ':' in the IP addresses for control_virtual_ip and public_virtual_ip and set netmask correctly based on IP version. Related-Bug: #1878101 Change-Id: I00718cf436ba438ef19c1a42aa2d2004fe73dcd2 (cherry picked from commit2f38880744
)
This commit is contained in:
parent
9e751c820d
commit
4dba85d815
|
@ -92,6 +92,8 @@ conditions:
|
|||
equals: [{get_param: StandaloneNetConfigOverride}, {}]
|
||||
control_virtual_ip_unset: {equals : [{get_param: [DeployedServerPortMap, 'control_virtual_ip', fixed_ips, 0, ip_address]}, '']}
|
||||
public_virtual_ip_unset: {equals : [{get_param: [DeployedServerPortMap, 'public_virtual_ip', fixed_ips, 0, ip_address]}, '']}
|
||||
control_virtual_ip_is_ipv6: {contains: [':', {get_param: [DeployedServerPortMap, 'control_virtual_ip', fixed_ips, 0, ip_address]}]}
|
||||
public_virtual_ip_is_ipv6: {contains: [':', {get_param: [DeployedServerPortMap, 'public_virtual_ip', fixed_ips, 0, ip_address]}]}
|
||||
|
||||
resources:
|
||||
OsNetConfigImpl:
|
||||
|
@ -135,7 +137,7 @@ resources:
|
|||
list_join:
|
||||
- /
|
||||
- - {get_param: [DeployedServerPortMap, 'control_virtual_ip', fixed_ips, 0, ip_address]}
|
||||
- '32'
|
||||
- {if: [control_virtual_ip_is_ipv6, '128', '32']}
|
||||
-
|
||||
if:
|
||||
- public_virtual_ip_unset
|
||||
|
@ -144,7 +146,7 @@ resources:
|
|||
list_join:
|
||||
- /
|
||||
- - {get_param: [DeployedServerPortMap, 'public_virtual_ip', fixed_ips, 0, ip_address]}
|
||||
- '32'
|
||||
- {if: [public_virtual_ip_is_ipv6, '128', '32']}
|
||||
routes: {get_param: ControlPlaneStaticRoutes}
|
||||
members:
|
||||
- type: interface
|
||||
|
|
|
@ -88,6 +88,8 @@ conditions:
|
|||
equals: [{get_param: UndercloudNetConfigOverride}, {}]
|
||||
control_virtual_ip_unset: {equals : [{get_param: [DeployedServerPortMap, 'control_virtual_ip', fixed_ips, 0, ip_address]}, '']}
|
||||
public_virtual_ip_unset: {equals : [{get_param: [DeployedServerPortMap, 'public_virtual_ip', fixed_ips, 0, ip_address]}, '']}
|
||||
control_virtual_ip_is_ipv6: {contains: [':', {get_param: [DeployedServerPortMap, 'control_virtual_ip', fixed_ips, 0, ip_address]}]}
|
||||
public_virtual_ip_is_ipv6: {contains: [':', {get_param: [DeployedServerPortMap, 'public_virtual_ip', fixed_ips, 0, ip_address]}]}
|
||||
|
||||
resources:
|
||||
OsNetConfigImpl:
|
||||
|
@ -130,7 +132,7 @@ resources:
|
|||
list_join:
|
||||
- /
|
||||
- - {get_param: [DeployedServerPortMap, 'control_virtual_ip', fixed_ips, 0, ip_address]}
|
||||
- '32'
|
||||
- {if: [control_virtual_ip_is_ipv6, '128', '32']}
|
||||
-
|
||||
if:
|
||||
- public_virtual_ip_unset
|
||||
|
@ -139,7 +141,7 @@ resources:
|
|||
list_join:
|
||||
- /
|
||||
- - {get_param: [DeployedServerPortMap, 'public_virtual_ip', fixed_ips, 0, ip_address]}
|
||||
- '32'
|
||||
- {if: [public_virtual_ip_is_ipv6, '128', '32']}
|
||||
routes: {get_param: ControlPlaneStaticRoutes}
|
||||
members:
|
||||
- type: interface
|
||||
|
|
Loading…
Reference in New Issue