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

Error: The terraform-provider-pagerduty_v2.5.1 plugin crashed! #526

Open
mikebryant opened this issue Jun 10, 2022 · 3 comments
Open

Error: The terraform-provider-pagerduty_v2.5.1 plugin crashed! #526

mikebryant opened this issue Jun 10, 2022 · 3 comments

Comments

@mikebryant
Copy link

Hi there,

Thank you for opening an issue. Please note that we try to keep the Terraform issue tracker reserved for bug reports and feature requests. For general usage questions, please see: https://www.terraform.io/community.html.

Terraform Version

Run terraform -v to show the version. If you are not running the latest version of Terraform, please upgrade because your issue may have already been fixed.

terraform -v
Terraform v0.15.0
on darwin_amd64
+ provider registry.terraform.io/hashicorp/aws v4.17.1
+ provider registry.terraform.io/pagerduty/pagerduty v2.5.1

Your version of Terraform is out of date! The latest version
is 1.2.2. You can update by downloading from https://www.terraform.io/downloads.html

Affected Resource(s)

Please list the resources as a list, for example:

  • pagerduty_service_dependency

If this issue appears to affect multiple resources, it may be an issue with Terraform's core, so please mention this.

Terraform Configuration Files

# Copy-paste your Terraform configurations here - for large Terraform configs,
# please use a service like Dropbox and share a link to the ZIP file. For
# security, you can also encrypt the files using our GPG public key.

Debug Output

Please provider a link to a GitHub Gist containing the complete debug output: https://www.terraform.io/docs/internals/debugging.html. Please do NOT paste the debug output in the issue; just paste a link to the Gist.

Panic Output

If Terraform produced a panic, please provide a link to a GitHub Gist containing the output of the crash.log.

https://gist.github.com/mikebryant/e3c457f2f32d26ef0f82791b85ef6970

Expected Behavior

What should have happened?

Deleted a dependency

Actual Behavior

What actually happened?

Crashed

Steps to Reproduce

Please list the steps required to reproduce the issue, for example:

  1. terraform apply

Important Factoids

Are there anything atypical about your accounts that we should know? For example: Running in EC2 Classic? Custom version of OpenStack? Tight ACLs?

References

Are there any other GitHub issues (open or closed) or Pull Requests that should be linked here? For example:

@stmcallister
Copy link
Contributor

Hi @mikebryant! Thanks for posting this issue. Unfortunately, I'm unable to reproduce the error. Can you provide more context into you what led to the crash? For example, would you be able to share the pagerduty_service_dependency definition in question?

@mikebryant
Copy link
Author

Sure, here's what's in the state:

$ terraform state show 'module.services["Quotes & Invoices"].pagerduty_service_dependency.dependencies["invoice"]'
# module.services["Quotes & Invoices"].pagerduty_service_dependency.dependencies["invoice"]:
resource "pagerduty_service_dependency" "dependencies" {
    id = "DEUR9QMW4JX2P2055H"

    dependency {
        dependent_service {
            id   = "P0CUB2Z"
            type = "business_service"
        }

        supporting_service {
            id   = "PXK9K1O"
            type = "service"
        }
    }
}

(The actual code that created this in the first place is a complicated mess of logic, but it all boils down to a business service depending on a technical service)

And here's a redacted debug log for this apply: https://gist.github.com/mikebryant/8940c6336dfee910d14e5d27f6330133

Actually looking at this output - it looks like this might be because a previous failed apply did remove the relationship but crashed before it updated the state, and the provider doesn't handle things in the state that no longer exist?

(We're also repeatedly hitting #328, where this provider gets stuck and can't continue if event rules are in the state but no longer exist, which seems to be a similar case to this)

@stmcallister
Copy link
Contributor

Hey @mikebryant ! Thanks for sharing the additional context. That's an interesting idea that it could be related to #328. Would you happen to have the logs of the failed deletion of the Service Dependencies as well? That could help us verify your assumption.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants