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

The plugin encountered an error, and failed to respond to the plugin6.(*GRPCProvider).UpgradeResourceState call. #2834

Closed
2 tasks done
rajendrapinnamaneni opened this issue Oct 11, 2023 · 2 comments
Labels
triage/duplicate Indicates an issue is a duplicate of other open issue.

Comments

@rajendrapinnamaneni
Copy link

Confirmation

  • My issue isn't already found on the issue tracker.
  • I have replicated my issue using the latest version of the provider and it is still present.

Terraform and Cloudflare provider version

Terraform v1.0.11
on linux_amd64

provider registry.terraform.io/cloudflare/cloudflare v4.16.0
provider registry.terraform.io/hashicorp/azurerm v3.75.0

Affected resource(s)

resource "cloudflare_ruleset" "cache_everything"

Terraform configuration files

resource "cloudflare_ruleset" "cache_everything" {
  zone_id    = {zoneid}
  kind       = "zone"
  name       = "Cache Everything"
  phase      = "http_request_cache_settings"

  rules {
    action      = "set_cache_settings"

    expression  = "(http.host eq \"www.${domain}\" and not http.request.uri.path contains \"/web/\")"
    description = "Cache Everything"
    enabled     = true

    action_parameters {

      cache = true

      edge_ttl {
        mode    = "respect_origin"
      }
      serve_stale {
        disable_stale_while_updating = false
      }
    }
  }
}
Link to

Link to debug output

Added debug output in zip file as https://gist.github.com/ is not able to create a gist url/unresponsive for longer times.

Panic output

panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x9996c0]

goroutine 10746 [running]:
github.com/cloudflare/terraform-provider-cloudflare/internal/framework/service/rulesets.toRulesetResourceModel({0x130ada0, 0xc0021e5c80}, {0x80?, {0xc000946b80?, 0xc000946ac0?}}, {0x20?, {0x0?, 0x0?}}, {{0xc0005d951b, 0x20}, ...})
github.com/cloudflare/terraform-provider-cloudflare/internal/framework/service/rulesets/resource.go:614 +0x3aa0
github.com/cloudflare/terraform-provider-cloudflare/internal/framework/service/rulesets.(*RulesetResource).Read(0xc0004bc090, {0x130ada0, 0xc0021e5c80}, {{{{0x130f8a8, 0xc002028510}, {0xfcbf60, 0xc0011cd1a0}}, {0x13110e0, 0xc000a40e60}}, 0xc000632018, ...}, ...)
github.com/cloudflare/terraform-provider-cloudflare/internal/framework/service/rulesets/resource.go:208 +0x57b
github.com/hashicorp/terraform-plugin-framework/internal/fwserver.(*Server).ReadResource(0xc00050e420, {0x130ada0, 0xc0021e5c80}, 0xc0021e5d10, 0xc001d35520)
github.com/hashicorp/[email protected]/internal/fwserver/server_readresource.go:101 +0x677
github.com/hashicorp/terraform-plugin-framework/internal/proto6server.(*Server).ReadResource(0xc00050e420, {0x130ada0?, 0xc0021e5b30?}, 0xc002bd7f40)
github.com/hashicorp/[email protected]/internal/proto6server/server_readresource.go:55 +0x41a
github.com/hashicorp/terraform-plugin-mux/tf6muxserver.muxServer.ReadResource({0xc0003402d0, 0xc000a1bbd0, 0xc000340300, 0xc000340330, {0xc0000abf40, 0x2,
0x2}}, {0x130ada0?, 0xc0021e5800?}, 0xc002bd7f40)
github.com/hashicorp/[email protected]/tf6muxserver/mux_server_ReadResource.go:29 +0x139
github.com/hashicorp/terraform-plugin-go/tfprotov6/tf6server.(*server).ReadResource(0xc0003314a0, {0x130ada0?, 0xc0021e5050?}, 0xc000ba75c0)
github.com/hashicorp/[email protected]/tfprotov6/tf6server/server.go:749 +0x4b1
github.com/hashicorp/terraform-plugin-go/tfprotov6/internal/tfplugin6._Provider_ReadResource_Handler({0x10e53e0?, 0xc0003314a0}, {0x130ada0, 0xc0021e5050}, 0xc0002a4d90, 0x0)
github.com/hashicorp/[email protected]/tfprotov6/internal/tfplugin6/tfplugin6_grpc.pb.go:386 +0x170
google.golang.org/grpc.(*Server).processUnaryRPC(0xc0000363c0, {0x130fbf8, 0xc000583ba0}, 0xc0021da6c0, 0xc0006ba150, 0x1997590, 0x0)
google.golang.org/[email protected]/server.go:1337 +0xdf3
google.golang.org/grpc.(*Server).handleStream(0xc0000363c0, {0x130fbf8, 0xc000583ba0}, 0xc0021da6c0, 0x0)
google.golang.org/[email protected]/server.go:1714 +0xa36
google.golang.org/grpc.(*Server).serveStreams.func1.1()
google.golang.org/[email protected]/server.go:959 +0x98
created by google.golang.org/grpc.(*Server).serveStreams.func1
google.golang.org/[email protected]/server.go:957 +0x18c

Error: The terraform-provider-cloudflare_v4.13.0 plugin crashed!

This is always indicative of a bug within the plugin. It would be immensely
helpful if you could report the crash with the plugin's maintainers so that it
can be fixed. The output above should help diagnose the issue.

2023-10-02T10:40:50.535+0100 [DEBUG] Azure Backend Response for https://mabgotfstateprodst001.blob.core.windows.net/mab-go-eun-prod-terraform-state/cloudflare-cdn.tfstate?comp=lease:
HTTP/1.1 200 OK
Content-Length: 0
Date: Mon, 02 Oct 2023 09:40:52 GMT
Etag: "0x8DBC32BAAE9CC73"
Last-Modified: Mon, 02 Oct 2023 09:40:52 GMT
Server: Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0
X-Ms-Request-Id: 34ad54a0-701e-009b-2514-f54da7000000
X-Ms-Version: 2018-11-09
2023-10-02T10:40:50.535+0100 [DEBUG] provider: plugin exited

Expected output

cloudflare_ruleset.cache_everything[""]: Refreshing state... [id=]
cloudflare_ruleset.cache_everything[""]: Refreshing state... [id=]

Actual output


│ Error: Plugin did not respond

│ The plugin encountered an error, and failed to respond to the plugin6.(*GRPCProvider).UpgradeResourceState call. The plugin logs may contain more
│ details.


│ Error: Request cancelled

│ The plugin6.(*GRPCProvider).UpgradeResourceState request was cancelled.

Steps to reproduce

We are getting issues while doing Terraform plan itself and even in Debug, couldn’t find helpful information.

Additional factoids

we compared the current terraform state file to existing terraform configuration where I didn't find any mismatch.
Also we tried with the latest version v4.15.0 and still it didn't works.

References

No response

@rajendrapinnamaneni rajendrapinnamaneni added kind/bug Categorizes issue or PR as related to a bug. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. labels Oct 11, 2023
@github-actions
Copy link
Contributor

Thank you for reporting this issue! For maintainers to dig into issues it is required that all issues include the entirety of TF_LOG=DEBUG output to be provided. The only parts that should be redacted are your user credentials in the X-Auth-Key, X-Auth-Email and Authorization HTTP headers. Details such as zone or account identifiers are not considered sensitive but can be redacted if you are very cautious. This log file provides additional context from Terraform, the provider and the Cloudflare API that helps in debugging issues. Without it, maintainers are very limited in what they can do and may hamper diagnosis efforts.

This issue has been marked with triage/needs-information and is unlikely to receive maintainer attention until the log file is provided making this a complete bug report.

@github-actions github-actions bot added triage/needs-information Indicates an issue needs more information in order to work on it. and removed needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. labels Oct 11, 2023
@github-actions
Copy link
Contributor

Community Note

Voting for Prioritization

  • Please vote on this issue by adding a 👍 reaction to the original post to help the community and maintainers prioritize this request.
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request.

Volunteering to Work on This Issue

  • If you are interested in working on this issue, please leave a comment.
  • If this would be your first contribution, please review the contribution guide.

@jacobbednarz jacobbednarz closed this as not planned Won't fix, can't repro, duplicate, stale Oct 11, 2023
@jacobbednarz jacobbednarz added triage/duplicate Indicates an issue is a duplicate of other open issue. and removed kind/bug Categorizes issue or PR as related to a bug. triage/needs-information Indicates an issue needs more information in order to work on it. labels Oct 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
triage/duplicate Indicates an issue is a duplicate of other open issue.
Projects
None yet
Development

No branches or pull requests

2 participants