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

provider/openstack: Fix crash when access_network was not defined #4966

Merged
merged 1 commit into from
Feb 2, 2016

Conversation

jtopjian
Copy link
Contributor

@jtopjian jtopjian commented Feb 2, 2016

Fixes #4954

@@ -998,7 +998,7 @@ func getInstanceAccessAddresses(d *schema.ResourceData, networks []map[string]in
hostv6 = n["fixed_ip_v6"].(string)
}

if n["access_network"].(bool) {
if ok, an := n["access_network"].(bool); ok && an {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should these be named the opposite way around for clarity? Appreciate that it doesn't actually matter here, but the "ok" is generally the second parameter of the type assertion?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes indeed. I should really just step away from any keyboard for the rest of the day.

@jen20
Copy link
Contributor

jen20 commented Feb 2, 2016

Hi @jtopjian! I've left a comment in line - the nature of the fix looks fine, with one minor nitpick. Thanks for opening the PR!

@jtopjian
Copy link
Contributor Author

jtopjian commented Feb 2, 2016

Thanks for the review. Should be good now.

jtopjian added a commit that referenced this pull request Feb 2, 2016
provider/openstack: Fix crash when access_network was not defined
@jtopjian jtopjian merged commit 44970d4 into hashicorp:master Feb 2, 2016
@jtopjian
Copy link
Contributor Author

jtopjian commented Feb 9, 2016

@phinze I was swamped at work and wanted to fix this bug ASAP. Now that the dust has settled, I've had some time to review and I'm utterly confused as to why this bug was triggered. Most specifically, I was only able to recreate this bug by compiling Terraform to a binary and then applying a fresh config. This bug didn't trigger during any acceptance tests nor on existing configurations when used as a binary. Any ideas?

@KZachariassen
Copy link

Can we soon get a 0.6.12 including this patch? :)

@jtopjian jtopjian deleted the openstack-fix-access-network branch March 23, 2017 16:07
@ghost
Copy link

ghost commented Apr 15, 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 15, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Openstack Provider crash in 0.6.11
3 participants