-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
pkg/destroy/libvirt: Add behind a libvirt_destroy build tag #387
pkg/destroy/libvirt: Add behind a libvirt_destroy build tag #387
Conversation
I get the segfault in master too, so it's probably orthogonal. I'm digging into it now. |
e65f8f7
to
70a37ae
Compare
This was from a corrupted $ sha1sum bin/terraform ~/bin/terraform-0.11.8
5aa0067541c0273bb650ed89be3b1b1f4dc83944 bin/terraform
06339cdd7a39657355e5c4b04e12efc91672a450 /home/trking/bin/terraform-0.11.8 Pulling a fresh copy with |
70a37ae
to
d0feed5
Compare
Can we hide all of this behind the dev mode? Developers are the only ones that will use libvirt and since it's likely that they are compiling the installer locally, cgo should play nicely. |
@steveej, at least, had issues with dynamic linking (so he might want dev-mode's lack of compiled-in Terraform without libvirt deletion). And @abhinavdahiya would prefer not to have to mess with |
Looks good. Can you add a quick note to the docs regarding the build tag? |
d0feed5
to
c5fb068
Compare
Done with d0feed5 -> c5fb068. |
Docs for Go's build constraints are in [1]. This commit allows folks with local libvirt C libraries to compile our libvirt deletion logic (and get a dynamically-linked executable), while release binaries and folks without libvirt C libraries can continue to get statically-linked executables that lack libvirt deletion. I've also simplified the public names (e.g. NewDestroyer -> New), dropping information which is already encoded in the import path. Pulling the init() registration out into separate files is at Abhinav's request [2]. [1]: https://golang.org/pkg/go/build/#hdr-Build_Constraints [2]: openshift#387 (comment)
c5fb068
to
4d940ce
Compare
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: crawford, wking The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Docs for Go's build constraints are here. This pull request allows folks with local libvirt C libraries to compile our libvirt deletion logic (and get a dynamically-linked executable), while release binaries and folks without libvirt C libraries can continue to get statically-linked executables that lack libvirt deletion.
/assign @abhinavdahiya
Testing this locally, I'm getting:
Dunno what's going on there yet.