Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

openstack_networking_subnet_v2 creating gateway address #6031

Closed
linuxus opened this issue Apr 6, 2016 · 4 comments · Fixed by #6060
Closed

openstack_networking_subnet_v2 creating gateway address #6031

linuxus opened this issue Apr 6, 2016 · 4 comments · Fixed by #6060
Labels

Comments

@linuxus
Copy link

linuxus commented Apr 6, 2016

Hello,
when using openstack_networking_subnet_v2 resource it creates the gateway_ip address in the subnet although I did not specifically set this as gateway_ip option. This creates an issue when using multiple subnets and attaching them to instances (VMs) as multiple network interfaces. The operating system sees 2 default gateways and sometimes the routing logic do not work as intended. For example eth0 should have the real default gateway but eth1 gets higher metric and because a gateway is set on the subnet's dhcp via terraform network traffic has unexpected behaviour.

How can we turn off gateway_ip to none via terraform if we do not want a default gateway setting on a particular subnet?

Thanks,
Abdi

@jtopjian
Copy link
Contributor

jtopjian commented Apr 7, 2016

@linuxus Coincidentally I ran into this same problem, even before seeing your issue 😄

I have a PR opened in both Terraform and Gophercloud to resolve this. Hang tight!

jtopjian added a commit to jtopjian/terraform that referenced this issue Apr 8, 2016
This commit adds a no_gateway attribute. When set, the subnet will
not have a gateway. This is different than not specifying a
gateway_ip since that will cause a default gateway of .1 to be used.
This behavior mirrors the OpenStack Neutron command-line tool.

Fixes hashicorp#6031
@linuxus
Copy link
Author

linuxus commented Apr 8, 2016

@jtopjian Excellent... thanks for the update. I'm assuming there is no value to set on this attribute but just a key in the resource config.

@jtopjian
Copy link
Contributor

@linuxus The patch has been merged and will be in the next release of Terraform. In order to disable the gateway, you'll need to set the following new attribute on the subnet:

no_gateway = true

The reasons for the new attribute and not just building onto the gateway_ip attribute are:

  1. Similar behavior with the Neutron client package
  2. Having no value on gateway_ip will cause Neutron to create a default gateway implicitly.

Let me know if you have any questions or issues 😄

chrislovecnm pushed a commit to chrislovecnm/terraform that referenced this issue Apr 16, 2016
This commit adds a no_gateway attribute. When set, the subnet will
not have a gateway. This is different than not specifying a
gateway_ip since that will cause a default gateway of .1 to be used.
This behavior mirrors the OpenStack Neutron command-line tool.

Fixes hashicorp#6031
@ghost
Copy link

ghost commented Apr 26, 2020

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@ghost ghost locked and limited conversation to collaborators Apr 26, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants