Skip to content

Commit

Permalink
Bug 1822701: OpenStack: Set port instead of vrrp protocol name
Browse files Browse the repository at this point in the history
If VRRP plugin is disabled in neutron, then Terraform fails to fetch
the desired protocol number.

To prevent the issue this patch explicitly sets the protocol number
to 112 for the sg rules.

For more information:
https://docs.openstack.org/api-ref/network/v2/index.html?expanded=create-security-group-rule-detail
  • Loading branch information
Fedosin committed Apr 9, 2020
1 parent 5e597cc commit 38fe2fa
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
8 changes: 5 additions & 3 deletions data/data/openstack/topology/sg-master.tf
Original file line number Diff line number Diff line change
Expand Up @@ -353,9 +353,11 @@ resource "openstack_networking_secgroup_rule_v2" "master_ingress_services_udp_fr
}

resource "openstack_networking_secgroup_rule_v2" "master_ingress_vrrp" {
direction = "ingress"
ethertype = "IPv4"
protocol = "vrrp"
direction = "ingress"
ethertype = "IPv4"
# Explicitly set the vrrp protocol number to prevent cases when the Neutron Plugin
# is disabled and it cannot identify a number by name.
protocol = "112"
remote_ip_prefix = var.cidr_block
security_group_id = openstack_networking_secgroup_v2.master.id

Expand Down
8 changes: 5 additions & 3 deletions data/data/openstack/topology/sg-worker.tf
Original file line number Diff line number Diff line change
Expand Up @@ -258,9 +258,11 @@ resource "openstack_networking_secgroup_rule_v2" "worker_ingress_services_udp_fr
}

resource "openstack_networking_secgroup_rule_v2" "worker_ingress_vrrp" {
direction = "ingress"
ethertype = "IPv4"
protocol = "vrrp"
direction = "ingress"
ethertype = "IPv4"
# Explicitly set the vrrp protocol number to prevent cases when the Neutron Plugin
# is disabled and it cannot identify a number by name.
protocol = "112"
remote_ip_prefix = var.cidr_block
security_group_id = openstack_networking_secgroup_v2.worker.id

Expand Down

0 comments on commit 38fe2fa

Please sign in to comment.