-
Notifications
You must be signed in to change notification settings - Fork 7
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
Connecting to host panics under some condition #238
Labels
kind/bug
Something isn't working
Comments
I also encountered this with the following configuration: locals {
controller_ips = ["1.1.1.1"]
controller_names = ["controller01"]
}
resource "flexkube_pki" "pki" {
etcd {
peers = zipmap(local.controller_names, local.controller_ips)
servers = zipmap(local.controller_names, local.controller_ips)
}
}
resource "flexkube_etcd_cluster" "etcd" {
pki_yaml = flexkube_pki.pki.state_yaml
ssh {
user = "root"
private_key = file("~/.ssh/id_ed25519")
}
dynamic "member" {
for_each = flexkube_pki.pki.etcd[0].peers
content {
name = member.key
peer_address = member.value
server_address = member.value
host {
ssh {
address = member.value
user = "root"
private_key = file("~/.ssh/id_ed25519")
}
}
}
}
} 2023-11-14T06:45:29.604Z [INFO] Starting apply for flexkube_etcd_cluster.etcd
2023-11-14T06:45:29.604Z [TRACE] terraform.contextPlugins: Initializing provider "registry.terraform.io/flexkube/flexkube" to read its schema
2023-11-14T06:45:29.604Z [TRACE] terraform.contextPlugins: Initializing provider "registry.terraform.io/flexkube/flexkube" to read its schema
2023-11-14T06:45:29.611Z [TRACE] terraform.contextPlugins: Initializing provider "registry.terraform.io/flexkube/flexkube" to read its schema
2023-11-14T06:45:29.611Z [TRACE] terraform.contextPlugins: Initializing provider "registry.terraform.io/flexkube/flexkube" to read its schema
2023-11-14T06:45:29.620Z [TRACE] GRPCProvider: GetProviderSchema
2023-11-14T06:45:29.620Z [DEBUG] flexkube_etcd_cluster.etcd: applying the planned Create change
2023-11-14T06:45:29.620Z [TRACE] GRPCProvider: ApplyResourceChange
2023-11-14T06:45:29.620Z [TRACE] GRPCProvider: GetProviderSchema
2023-11-14T06:45:29.622Z [TRACE] provider.terraform-provider-flexkube_v0.9.0: Received request: @module=sdk.proto tf_proto_version=5.3 tf_provider_addr=provider tf_req_id=ecc40116-1e9c-717d-15bb-ee91f0d4eb9d tf_resource_type=flexkube_etcd_cluster @caller=github.com/hashicorp/[email protected]/tfprotov5/tf5server/server.go:808 tf_rpc=ApplyResourceChange timestamp=2023-11-14T06:45:29.622Z
2023-11-14T06:45:29.622Z [TRACE] provider.terraform-provider-flexkube_v0.9.0: Sending request downstream: tf_rpc=ApplyResourceChange @module=sdk.proto tf_proto_version=5.3 tf_provider_addr=provider @caller=github.com/hashicorp/[email protected]/tfprotov5/internal/tf5serverlogging/downstream_request.go:20 tf_req_id=ecc40116-1e9c-717d-15bb-ee91f0d4eb9d tf_resource_type=flexkube_etcd_cluster timestamp=2023-11-14T06:45:29.622Z
2023-11-14T06:45:29.623Z [INFO] provider.terraform-provider-flexkube_v0.9.0: 2023/11/14 06:45:29 [DEBUG] setting computed for "state_sensitive" from ComputedKeys: timestamp=2023-11-14T06:45:29.623Z
2023-11-14T06:45:29.623Z [INFO] provider.terraform-provider-flexkube_v0.9.0: 2023/11/14 06:45:29 [DEBUG] setting computed for "state" from ComputedKeys: timestamp=2023-11-14T06:45:29.623Z
2023-11-14T06:45:29.624Z [TRACE] provider.terraform-provider-flexkube_v0.9.0: Calling downstream: tf_req_id=ecc40116-1e9c-717d-15bb-ee91f0d4eb9d tf_rpc=ApplyResourceChange @caller=github.com/hashicorp/terraform-plugin-sdk/[email protected]/helper/schema/resource.go:908 tf_provider_addr=provider tf_resource_type=flexkube_etcd_cluster @module=sdk.helper_schema timestamp=2023-11-14T06:45:29.623Z
2023-11-14T06:45:29.634Z [TRACE] provider.stdio: received data: channel=STDOUT len=84
2023-11-14T06:45:29.634Z [WARN] unexpected data:
registry.terraform.io/flexkube/flexkube:stdout=
| Checking for stopped and missing containers
| Configuring and creating new containers
2023-11-14T06:45:29.635Z [TRACE] provider.stdio: waiting for stdio data
2023-11-14T06:45:29.638Z [TRACE] provider.terraform-provider-flexkube_v0.9.0: Served request: @module=sdk.proto tf_proto_version=5.3 tf_provider_addr=provider tf_rpc=ApplyResourceChange @caller=runtime/panic.go:914 tf_req_id=ecc40116-1e9c-717d-15bb-ee91f0d4eb9d tf_resource_type=flexkube_etcd_cluster timestamp=2023-11-14T06:45:29.637Z
2023-11-14T06:45:29.640Z [DEBUG] provider.terraform-provider-flexkube_v0.9.0: panic: runtime error: invalid memory address or nil pointer dereference
2023-11-14T06:45:29.640Z [DEBUG] provider.terraform-provider-flexkube_v0.9.0: [signal SIGSEGV: segmentation violation code=0x1 addr=0x18 pc=0xc1b279]
2023-11-14T06:45:29.640Z [DEBUG] provider.terraform-provider-flexkube_v0.9.0
2023-11-14T06:45:29.640Z [DEBUG] provider.terraform-provider-flexkube_v0.9.0: goroutine 113 [running]:
2023-11-14T06:45:29.640Z [DEBUG] provider.terraform-provider-flexkube_v0.9.0: github.com/flexkube/libflexkube/pkg/host.(*host).Connect(0xc0007a2510?)
2023-11-14T06:45:29.640Z [DEBUG] provider.terraform-provider-flexkube_v0.9.0: github.com/flexkube/[email protected]/pkg/host/host.go:86 +0x19
2023-11-14T06:45:29.640Z [DEBUG] provider.terraform-provider-flexkube_v0.9.0: github.com/flexkube/libflexkube/pkg/container.(*hostConfiguredContainer).connectAndForward(0x0?, {0x246e665, 0x1b})
2023-11-14T06:45:29.640Z [DEBUG] provider.terraform-provider-flexkube_v0.9.0: github.com/flexkube/[email protected]/pkg/container/hostconfiguredcontainer.go:146 +0x7e
2023-11-14T06:45:29.640Z [DEBUG] provider.terraform-provider-flexkube_v0.9.0: github.com/flexkube/libflexkube/pkg/container.(*hostConfiguredContainer).withForwardedRuntime(0xc0007a2500, 0xc0009b0a08)
2023-11-14T06:45:29.640Z [DEBUG] provider.terraform-provider-flexkube_v0.9.0: github.com/flexkube/[email protected]/pkg/container/hostconfiguredcontainer.go:167 +0x7f
2023-11-14T06:45:29.640Z [DEBUG] provider.terraform-provider-flexkube_v0.9.0: github.com/flexkube/libflexkube/pkg/container.(*hostConfiguredContainer).Configure(0x27e5e68?, {0xc000c17f80?, 0x0?, 0xc000c16e00?})
2023-11-14T06:45:29.640Z [DEBUG] provider.terraform-provider-flexkube_v0.9.0: github.com/flexkube/[email protected]/pkg/container/hostconfiguredcontainer.go:324 +0x5e
2023-11-14T06:45:29.640Z [DEBUG] provider.terraform-provider-flexkube_v0.9.0: github.com/flexkube/libflexkube/pkg/container.(*containers).ensureConfigured(0xc00096d8d8, {0xc000b0c204, 0xc})
2023-11-14T06:45:29.640Z [DEBUG] provider.terraform-provider-flexkube_v0.9.0: github.com/flexkube/[email protected]/pkg/container/containers.go:224 +0x12d
2023-11-14T06:45:29.640Z [DEBUG] provider.terraform-provider-flexkube_v0.9.0: github.com/flexkube/libflexkube/pkg/container.(*containers).ensureNewContainer(0xc00096d8d8, {0xc000b0c204, 0xc})
2023-11-14T06:45:29.640Z [DEBUG] provider.terraform-provider-flexkube_v0.9.0: github.com/flexkube/[email protected]/pkg/container/containers.go:451 +0x67
2023-11-14T06:45:29.640Z [DEBUG] provider.terraform-provider-flexkube_v0.9.0: github.com/flexkube/libflexkube/pkg/container.(*containers).Deploy(0xc00096d8d8)
2023-11-14T06:45:29.640Z [DEBUG] provider.terraform-provider-flexkube_v0.9.0: github.com/flexkube/[email protected]/pkg/container/containers.go:529 +0x38a
2023-11-14T06:45:29.640Z [DEBUG] provider.terraform-provider-flexkube_v0.9.0: github.com/flexkube/libflexkube/pkg/etcd.(*cluster).Deploy(0xc00096d320)
2023-11-14T06:45:29.640Z [DEBUG] provider.terraform-provider-flexkube_v0.9.0: github.com/flexkube/[email protected]/pkg/etcd/cluster.go:374 +0x162
2023-11-14T06:45:29.640Z [DEBUG] provider.terraform-provider-flexkube_v0.9.0: github.com/flexkube/terraform-provider-flexkube/flexkube.resourceEtcdCluster.resourceCreate.func1({0x27d7078?, 0xc0007beae0?}, 0x0?, {0x0?, 0x0?})
2023-11-14T06:45:29.640Z [DEBUG] provider.terraform-provider-flexkube_v0.9.0: github.com/flexkube/terraform-provider-flexkube/flexkube/util.go:233 +0xab
2023-11-14T06:45:29.640Z [DEBUG] provider.terraform-provider-flexkube_v0.9.0: github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*Resource).create(0xc000802620, {0x27d7078, 0xc0007beae0}, 0xd?, {0x1f1ea40, 0xc000329358})
2023-11-14T06:45:29.640Z [DEBUG] provider.terraform-provider-flexkube_v0.9.0: github.com/hashicorp/terraform-plugin-sdk/[email protected]/helper/schema/resource.go:778 +0x11b
2023-11-14T06:45:29.640Z [DEBUG] provider.terraform-provider-flexkube_v0.9.0: github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*Resource).Apply(0xc000802620, {0x27d7078, 0xc0007beae0}, 0xc000541930, 0xc000c16a80, {0x1f1ea40, 0xc000329358})
2023-11-14T06:45:29.640Z [DEBUG] provider.terraform-provider-flexkube_v0.9.0: github.com/hashicorp/terraform-plugin-sdk/[email protected]/helper/schema/resource.go:909 +0xa7e
2023-11-14T06:45:29.640Z [DEBUG] provider.terraform-provider-flexkube_v0.9.0: github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*GRPCProviderServer).ApplyResourceChange(0xc0007f4000, {0x27d7078?, 0xc0007be9f0?}, 0xc0000bc730)
2023-11-14T06:45:29.640Z [DEBUG] provider.terraform-provider-flexkube_v0.9.0: github.com/hashicorp/terraform-plugin-sdk/[email protected]/helper/schema/grpc_provider.go:1027 +0xdbc
2023-11-14T06:45:29.640Z [DEBUG] provider.terraform-provider-flexkube_v0.9.0: github.com/hashicorp/terraform-plugin-go/tfprotov5/tf5server.(*server).ApplyResourceChange(0xc000792000, {0x27d7078?, 0xc0007be000?}, 0xc000b0e070)
2023-11-14T06:45:29.640Z [DEBUG] provider.terraform-provider-flexkube_v0.9.0: github.com/hashicorp/[email protected]/tfprotov5/tf5server/server.go:821 +0x56a
2023-11-14T06:45:29.640Z [DEBUG] provider.terraform-provider-flexkube_v0.9.0: github.com/hashicorp/terraform-plugin-go/tfprotov5/internal/tfplugin5._Provider_ApplyResourceChange_Handler({0x2335e60?, 0xc000792000}, {0x27d7078, 0xc0007be000}, 0xc000b0e000, 0x0)
2023-11-14T06:45:29.640Z [DEBUG] provider.terraform-provider-flexkube_v0.9.0: github.com/hashicorp/[email protected]/tfprotov5/internal/tfplugin5/tfplugin5_grpc.pb.go:422 +0x169
2023-11-14T06:45:29.640Z [DEBUG] provider.terraform-provider-flexkube_v0.9.0: google.golang.org/grpc.(*Server).processUnaryRPC(0xc00046c780, {0x27e2020, 0xc000a10680}, 0xc0006a0000, 0xc00091b530, 0x3a8a300, 0x0)
2023-11-14T06:45:29.640Z [DEBUG] provider.terraform-provider-flexkube_v0.9.0: google.golang.org/[email protected]/server.go:1337 +0xde7
2023-11-14T06:45:29.640Z [DEBUG] provider.terraform-provider-flexkube_v0.9.0: google.golang.org/grpc.(*Server).handleStream(0xc00046c780, {0x27e2020, 0xc000a10680}, 0xc0006a0000, 0x0)
2023-11-14T06:45:29.640Z [DEBUG] provider.terraform-provider-flexkube_v0.9.0: google.golang.org/[email protected]/server.go:1714 +0x9e7
2023-11-14T06:45:29.640Z [DEBUG] provider.terraform-provider-flexkube_v0.9.0: google.golang.org/grpc.(*Server).serveStreams.func1.1()
2023-11-14T06:45:29.640Z [DEBUG] provider.terraform-provider-flexkube_v0.9.0: google.golang.org/[email protected]/server.go:959 +0x8d
2023-11-14T06:45:29.640Z [DEBUG] provider.terraform-provider-flexkube_v0.9.0: created by google.golang.org/grpc.(*Server).serveStreams.func1 in goroutine 87
2023-11-14T06:45:29.640Z [DEBUG] provider.terraform-provider-flexkube_v0.9.0: google.golang.org/[email protected]/server.go:957 +0x165
2023-11-14T06:45:29.644Z [DEBUG] provider.stdio: received EOF, stopping recv loop: err="rpc error: code = Unavailable desc = error reading from server: EOF"
2023-11-14T06:45:29.644Z [DEBUG] provider: plugin process exited: path=.terraform/providers/registry.terraform.io/flexkube/flexkube/0.9.0/linux_amd64/terraform-provider-flexkube_v0.9.0 pid=248844 error="exit status 2"
2023-11-14T06:45:29.644Z [ERROR] plugin.(*GRPCProvider).ApplyResourceChange: error="rpc error: code = Unavailable desc = error reading from server: EOF"
2023-11-14T06:45:29.644Z [TRACE] maybeTainted: flexkube_etcd_cluster.etcd encountered an error during creation, so it is now marked as tainted |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The text was updated successfully, but these errors were encountered: