terraform-provider-openstack: Terraform crashes (while creating instances)
Terraform Version
Terraform v0.11.10
+ provider.openstack v1.12.0
+ provider.template v1.0.0
Affected Resource(s)
I am using the OpenStack provider only to:
- create a private network and a subnet
- attach router/interface
- attach the network/subnet to the router
- add peering to existing public network
- create ports
- create instances
I can say that the first 3 steps always work. Creating the ports also seems to be successful always, but then it crashes while creating the instances.
I am creating a total of 4 instances in my test — 3 using my custom module (which wraps port and instance creating — see below) and one with straight Terraform (a jump host, which is connected to the private network it created and an existing public network).
Terraform Configuration Files
I have a terraform repository with the usual (variables, deploy, …) and two sub-modules which wrap:
- network creation (
k8s_network) - instance creation (
k8s_node) - More terraform in my
deploy.tfto add a jump host once the rest is done
I can share all that (sans variables.tf), if required.
Panic Output
https://gist.github.com/till/a5e401bf883c91f02e703235ca26b7ee
Expected Behavior
Network gets created, ports get created, instances are attached. Clean exit.
Actual Behavior
Most of the above happens, but Terraform crashes (and is unable to capture state).
In addition this is output:
Error: Error applying plan:
4 error(s) occurred:
* module.k8s_worker_node.openstack_compute_instance_v2.node: 1 error(s) occurred:
* openstack_compute_instance_v2.node: unexpected EOF
* module.k8s_controlplane_node.openstack_compute_instance_v2.node: 1 error(s) occurred:
* openstack_compute_instance_v2.node: unexpected EOF
* module.k8s_etcd_node.openstack_compute_instance_v2.node: 1 error(s) occurred:
* openstack_compute_instance_v2.node: unexpected EOF
* openstack_compute_instance_v2.jump-host: 1 error(s) occurred:
* openstack_compute_instance_v2.jump-host: unexpected EOF
Terraform does not automatically rollback in the face of errors.
Instead, your Terraform state file has been partially updated with
any resources that successfully completed. Please address the error
above and apply again to incrementally change your infrastructure.
panic: runtime error: index out of range
Steps to Reproduce
source /etc/kolla/admin-openrcterraform apply
Questions I had
I noticed lots of PRs closed since last release, but I am unable to figure out how to run the provider from “master”. Any hints appreciated, then I will re-test.
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Comments: 24 (20 by maintainers)
@till Yes, 30 minutes ago 😉
It’s doubtful that any changes since the last release will fix this problem. The better solution would be to apply #539 and see if that helps.
If you are familiar with compiling Go binaries, then the following should work: