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

REGRESSION? 6.21 -> 6.22 - panic: when creating a listener on a loadbalancer (AWS) #3423

Closed
iamacup opened this issue Feb 13, 2024 · 3 comments
Assignees
Labels
kind/bug Some behavior is incorrect or out of spec resolution/duplicate This issue is a duplicate of another issue

Comments

@iamacup
Copy link

iamacup commented Feb 13, 2024

What happened?

 Type                 Name                        Status                  Info
 pulumi:pulumi:Stack  infrastructure-dev-payload  **failed**              1 error; 46 messages
  • └─ aws:lb:Listener payload-lb-https-listener creating failed 1 error

Diagnostics:
aws:lb:Listener (payload-lb-https-listener):
error: error reading from server: EOF

pulumi:pulumi:Stack (infrastructure-dev-payload):
error: update failed

panic: value is null
goroutine 119 [running]:
github.com/hashicorp/go-cty/cty.Value.LengthInt({{{0x111be58a8?, 0x140038568d0?}}, {0x0?, 0x0?}})
    /home/runner/go/pkg/mod/github.com/hashicorp/go-cty@v1.4.1-0.20200723130312-85980079f637/cty/value_ops.go:989 +0x254
github.com/hashicorp/terraform-provider-aws/internal/service/elbv2.flattenLbForwardActionOneOf({{{0x111be58a8?, 0x14003856910?}}, {0x10ee6c260?, 0x14003c70be8?}}, 0x10cdc66e7?, {{0x14003d8a520, 0x7}, 0x0, 0x0, 0x0, ...}, ...)
    /home/runner/work/pulumi-aws/pulumi-aws/upstream/internal/service/elbv2/listener.go:1036 +0x18c
github.com/hashicorp/terraform-provider-aws/internal/service/elbv2.flattenLbForwardAction(0x10fca26e0?, {0x10cdc66e7, 0xe}, 0x5?, {{0x14003d8a520, 0x7}, 0x0, 0x0, 0x0, 0x14003d89200, ...}, ...)
    /home/runner/work/pulumi-aws/pulumi-aws/upstream/internal/service/elbv2/listener.go:1014 +0x188
github.com/hashicorp/terraform-provider-aws/internal/service/elbv2.flattenLbListenerActions(0x10ee99480?, {0x10cdc66e7, 0xe}, {0x14003d904b0?, 0x1, 0x0?})
    /home/runner/work/pulumi-aws/pulumi-aws/upstream/internal/service/elbv2/listener.go:979 +0x240
github.com/hashicorp/terraform-provider-aws/internal/service/elbv2.resourceListenerRead({0x111be5528, 0x14003ce5380}, 0x140038ca980, {0x1119d53c0?, 0x140006baf00?})
    /home/runner/work/pulumi-aws/pulumi-aws/upstream/internal/service/elbv2/listener.go:535 +0x508
github.com/hashicorp/terraform-provider-aws/internal/service/elbv2.resourceListenerCreate({0x111be5528?, 0x14003ce5380}, 0x140038ca980, {0x1119d53c0?, 0x140006baf00})
    /home/runner/work/pulumi-aws/pulumi-aws/upstream/internal/service/elbv2/listener.go:506 +0xe20
github.com/hashicorp/terraform-provider-aws/internal/provider.New.(*wrappedResource).Create.interceptedHandler[...].func8(0x0?, {0x1119d53c0?, 0x140006baf00?})
    /home/runner/work/pulumi-aws/pulumi-aws/upstream/internal/provider/intercept.go:112 +0x1d4
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*Resource).create(0x111be5528?, {0x111be5528?, 0x14003cc20f0?}, 0xd?, {0x1119d53c0?, 0x140006baf00?})
    /home/runner/go/pkg/mod/github.com/pulumi/terraform-plugin-sdk/v2@v2.0.0-20240202163305-e2a20ae13ef9/helper/schema/resource.go:778 +0x64
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*Resource).Apply(0x140018947e0, {0x111be5528, 0x14003cc20f0}, 0x0, 0x140038ca700, {0x1119d53c0, 0x140006baf00})
    /home/runner/go/pkg/mod/github.com/pulumi/terraform-plugin-sdk/v2@v2.0.0-20240202163305-e2a20ae13ef9/helper/schema/resource.go:914 +0x86c
github.com/pulumi/pulumi-terraform-bridge/v3/pkg/tfshim/sdk-v2.v2Provider.Apply({0x1400017f9e0?, {0x140010052b0?, 0x0?, 0x14003cc2360?}}, {0x111be5528, 0x14003cc20f0}, {0x10cdd10e5, 0xf}, {0x0?, 0x0}, ...)
    /home/runner/go/pkg/mod/github.com/pulumi/pulumi-terraform-bridge/v3@v3.74.0/pkg/tfshim/sdk-v2/provider.go:122 +0x140
github.com/pulumi/pulumi-terraform-bridge/v3/pkg/tfshim/sdk-v2.(*providerWithPlanResourceChangeDispatch).Apply(0x14001964b40, {0x111be5528, 0x14003cc20f0}, {0x10cdd10e5, 0xf}, {0x0, 0x0}, {0x111bf64e0, 0x140038ca700})
    /home/runner/go/pkg/mod/github.com/pulumi/pulumi-terraform-bridge/v3@v3.74.0/pkg/tfshim/sdk-v2/provider2.go:700 +0xc8
github.com/pulumi/pulumi-terraform-bridge/v3/pkg/tfbridge.(*Provider).Create(0x14000d47980, {0x111be5528?, 0x14003ca9c80?}, 0x14003c4b0e0)
    /home/runner/go/pkg/mod/github.com/pulumi/pulumi-terraform-bridge/v3@v3.74.0/pkg/tfbridge/provider.go:1025 +0x654
github.com/pulumi/pulumi-terraform-bridge/x/muxer.(*muxer).Create.func1({0x111c43a20?, 0x14000d47980?})
    /home/runner/go/pkg/mod/github.com/pulumi/pulumi-terraform-bridge/x/muxer@v0.0.7/muxer.go:363 +0x3c
github.com/pulumi/pulumi-terraform-bridge/x/muxer.resourceMethod[...](0x140036c8cc0?, 0x14003a556c8, 0x14003a556a8?)
    /home/runner/go/pkg/mod/github.com/pulumi/pulumi-terraform-bridge/x/muxer@v0.0.7/muxer.go:322 +0xc4
github.com/pulumi/pulumi-terraform-bridge/x/muxer.(*muxer).Create(0x14003a55708?, {0x111be5528?, 0x14003ca9c80?}, 0x10f25f320?)
    /home/runner/go/pkg/mod/github.com/pulumi/pulumi-terraform-bridge/x/muxer@v0.0.7/muxer.go:362 +0x5c
github.com/pulumi/pulumi/sdk/v3/proto/go._ResourceProvider_Create_Handler.func1({0x111be5528, 0x14003ca9c80}, {0x1111f2260?, 0x14003c4b0e0})
    /home/runner/go/pkg/mod/github.com/pulumi/pulumi/sdk/v3@v3.105.0/proto/go/provider_grpc.pb.go:593 +0x74
github.com/grpc-ecosystem/grpc-opentracing/go/otgrpc.OpenTracingServerInterceptor.func1({0x111be5528, 0x14003ca9920}, {0x1111f2260, 0x14003c4b0e0}, 0x14003cb82c0, 0x14003c70a08)
    /home/runner/go/pkg/mod/github.com/grpc-ecosystem/grpc-opentracing@v0.0.0-20180507213350-8e809c8a8645/go/otgrpc/server.go:57 +0x2e8
github.com/pulumi/pulumi/sdk/v3/proto/go._ResourceProvider_Create_Handler({0x1118224e0?, 0x140036c8cc0}, {0x111be5528, 0x14003ca9920}, 0x14003807e80, 0x14003e1c160)
    /home/runner/go/pkg/mod/github.com/pulumi/pulumi/sdk/v3@v3.105.0/proto/go/provider_grpc.pb.go:595 +0x12c
google.golang.org/grpc.(*Server).processUnaryRPC(0x14003efc000, {0x111be5528, 0x14003ca9890}, {0x111c17300, 0x1400274fd40}, 0x14003cb4a20, 0x1400373ef90, 0x11b099a40, 0x0)
    /home/runner/go/pkg/mod/google.golang.org/grpc@v1.61.0/server.go:1385 +0xb8c
google.golang.org/grpc.(*Server).handleStream(0x14003efc000, {0x111c17300, 0x1400274fd40}, 0x14003cb4a20)
    /home/runner/go/pkg/mod/google.golang.org/grpc@v1.61.0/server.go:1796 +0xc4c
google.golang.org/grpc.(*Server).serveStreams.func2.1()
    /home/runner/go/pkg/mod/google.golang.org/grpc@v1.61.0/server.go:1029 +0x8c
created by google.golang.org/grpc.(*Server).serveStreams.func2 in goroutine 60
    /home/runner/go/pkg/mod/google.golang.org/grpc@v1.61.0/server.go:1040 +0x150

Example

  const cert = new aws.acm.Certificate("certificates-payload", {
    domainName: payloadDomainName,
    validationMethod: "DNS",
  });

  // Create an ECS Fargate cluster.
  const cluster = new aws.ecs.Cluster("payload-cluster");  

// Define the Networking for our service.
  const loadbalancer = new awsx.lb.ApplicationLoadBalancer("payload-lb", {
    securityGroups: [payloadALBSGID],
    subnetIds: publicSubnetIDs,
  });

  const certificateListener = new aws.lb.Listener("payload-lb-https-listener", {
    loadBalancerArn: loadbalancer.loadBalancer.arn,
    port: 443,
    protocol: "HTTPS",
    sslPolicy: "ELBSecurityPolicy-2016-08",
    certificateArn: cert.arn,
    defaultActions: [
      {
        type: "forward",
        targetGroupArn: loadbalancer.defaultTargetGroup.arn,
      },
    ],
  });

Output of pulumi about

tompickard@Toms-Mac-mini infrastructure % pulumi about
CLI
Version 3.105.0
Go Version go1.21.6
Go Compiler gc

Plugins
NAME VERSION
nodejs unknown

Host
OS darwin
Version 14.2.1
Arch arm64

This project is written in nodejs: executable='/Users/tompickard/.nvm/versions/node/v18.18.2/bin/node' version='v18.18.2'

Current Stack: eyekandy/infrastructure/dev-payload

TYPE URN
pulumi:pulumi:Stack urn:pulumi:dev-payload::infrastructure::pulumi:pulumi:Stack::infrastructure-dev-payload
pulumi:providers:pulumi urn:pulumi:dev-payload::infrastructure::pulumi:providers:pulumi::default
pulumi:providers:aws urn:pulumi:dev-payload::infrastructure::pulumi:providers:aws::default_6_22_0
aws:ecs/cluster:Cluster urn:pulumi:dev-payload::infrastructure::aws:ecs/cluster:Cluster::payload-cluster
aws:acm/certificate:Certificate urn:pulumi:dev-payload::infrastructure::aws:acm/certificate:Certificate::certificates-payload
pulumi:pulumi:StackReference urn:pulumi:dev-payload::infrastructure::pulumi:pulumi:StackReference::eyekandy/infrastructure/dev-networking
pulumi:providers:awsx urn:pulumi:dev-payload::infrastructure::pulumi:providers:awsx::default_2_5_0
awsx:lb:ApplicationLoadBalancer urn:pulumi:dev-payload::infrastructure::awsx:lb:ApplicationLoadBalancer::payload-lb
pulumi:providers:aws urn:pulumi:dev-payload::infrastructure::pulumi:providers:aws::default_6_9_0
aws:lb/loadBalancer:LoadBalancer urn:pulumi:dev-payload::infrastructure::awsx:lb:ApplicationLoadBalancer$aws:lb/loadBalancer:LoadBalancer::payload-lb
aws:lb/targetGroup:TargetGroup urn:pulumi:dev-payload::infrastructure::awsx:lb:ApplicationLoadBalancer$aws:lb/targetGroup:TargetGroup::payload-lb
aws:lb/listener:Listener urn:pulumi:dev-payload::infrastructure::awsx:lb:ApplicationLoadBalancer$aws:lb/listener:Listener::payload-lb-0

Found no pending operations associated with dev-payload

Additional context

I'm at a bit of a loss as to what to do here - and I don't think i can work this down to a more minimal requirement but i can provide more info if needed.

I can destroy the stack, revalidate the SSL and recreate this and it happens each time. I previously had the SSL creation inside of a check for issued but moved it out to debug.

The SSL certificate is validated (in another stack) and the actual listener gets added in AWS.

this error happens every time i run the stack with this new aws.lb.Listener in it. It goes away if i comment out the listener.

This is happening locally and on github actions.

I've tried to use the AI to find a workaround: https://www.pulumi.com/ai/conversations/3e27b81f-6a52-42cb-9575-c27f0945e4b2 but it appears to not have the latest version of the docs or is hallucinating some docs.

i have checked the ARNs passed to it and they exist and are fine:

Outputs:
    a: "arn:aws:elasticloadbalancing:eu-west-2:975050322000:loadbalancer/app/payload-lb-2ad9e40/855a9b67ec0d8eaa"
    b: "arn:aws:elasticloadbalancing:eu-west-2:975050322000:targetgroup/payload-lb-ffb0184/2584f019d05e6257"

cert
alb

Contributing

No response

@iamacup iamacup added kind/bug Some behavior is incorrect or out of spec needs-triage Needs attention from the triage team labels Feb 13, 2024
@iamacup
Copy link
Author

iamacup commented Feb 13, 2024

  const loadbalancer = new aws.lb.LoadBalancer("payload-lb", {
    loadBalancerType: "application",
    securityGroups: [payloadALBSGID],
    subnets: publicSubnetIDs,
  });

  const targetGroup = new aws.lb.TargetGroup("payload-tg", {
    port: 80,
    protocol: "HTTP",
    targetType: "ip",
    vpcId: vpcID,
  });

  new aws.lb.Listener("payload-lb-listner-http", {
    loadBalancerArn: loadbalancer.arn,
    port: 80,
    protocol: "HTTP",
    defaultActions: [
      {
        type: "forward",
        targetGroupArn: targetGroup.arn,
      },
    ],
  });

this is also causing a panic


     Type                 Name                        Status                  Info
     pulumi:pulumi:Stack  infrastructure-dev-payload  **failed**              1 error; 46 messages
 +   └─ aws:lb:Listener   payload-lb-listner-http     **creating failed**     1 error

Diagnostics:
  aws:lb:Listener (payload-lb-listner-http):
    error: error reading from server: EOF

  pulumi:pulumi:Stack (infrastructure-dev-payload):
    error: update failed

    panic: value is null
    goroutine 31 [running]:
    github.com/hashicorp/go-cty/cty.Value.LengthInt({{{0x1115198a8?, 0x14002ba1ab0?}}, {0x0?, 0x0?}})
        /home/runner/go/pkg/mod/github.com/hashicorp/go-cty@v1.4.1-0.20200723130312-85980079f637/cty/value_ops.go:989 +0x254
    github.com/hashicorp/terraform-provider-aws/internal/service/elbv2.flattenLbForwardActionOneOf({{{0x1115198a8?, 0x14002ba1b00?}}, {0x10e7a0260?, 0x14002b01bd8?}}, 0x10c6fa6e7?, {{0x1400288c7f0, 0x7}, 0x0, 0x0, 0x0, ...}, ...)
        /home/runner/work/pulumi-aws/pulumi-aws/upstream/internal/service/elbv2/listener.go:1036 +0x18c
    github.com/hashicorp/terraform-provider-aws/internal/service/elbv2.flattenLbForwardAction(0x10f5d66e0?, {0x10c6fa6e7, 0xe}, 0x5?, {{0x1400288c7f0, 0x7}, 0x0, 0x0, 0x0, 0x14002ed3770, ...}, ...)
        /home/runner/work/pulumi-aws/pulumi-aws/upstream/internal/service/elbv2/listener.go:1014 +0x188
    github.com/hashicorp/terraform-provider-aws/internal/service/elbv2.flattenLbListenerActions(0x10e7cd480?, {0x10c6fa6e7, 0xe}, {0x14002892a50?, 0x1, 0x0?})
        /home/runner/work/pulumi-aws/pulumi-aws/upstream/internal/service/elbv2/listener.go:979 +0x240
    github.com/hashicorp/terraform-provider-aws/internal/service/elbv2.resourceListenerRead({0x111519528, 0x14002dd8c60}, 0x14000cc3100, {0x1113093c0?, 0x1400216e4b0?})
        /home/runner/work/pulumi-aws/pulumi-aws/upstream/internal/service/elbv2/listener.go:535 +0x508
    github.com/hashicorp/terraform-provider-aws/internal/service/elbv2.resourceListenerCreate({0x111519528?, 0x14002dd8c60}, 0x14000cc3100, {0x1113093c0?, 0x1400216e4b0})
        /home/runner/work/pulumi-aws/pulumi-aws/upstream/internal/service/elbv2/listener.go:506 +0xe20
    github.com/hashicorp/terraform-provider-aws/internal/provider.New.(*wrappedResource).Create.interceptedHandler[...].func8(0x0?, {0x1113093c0?, 0x1400216e4b0?})
        /home/runner/work/pulumi-aws/pulumi-aws/upstream/internal/provider/intercept.go:112 +0x1d4
    github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*Resource).create(0x111519528?, {0x111519528?, 0x14003dfed20?}, 0xd?, {0x1113093c0?, 0x1400216e4b0?})
        /home/runner/go/pkg/mod/github.com/pulumi/terraform-plugin-sdk/v2@v2.0.0-20240202163305-e2a20ae13ef9/helper/schema/resource.go:778 +0x64
    github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*Resource).Apply(0x140018a89a0, {0x111519528, 0x14003dfed20}, 0x0, 0x14000cc2b00, {0x1113093c0, 0x1400216e4b0})
        /home/runner/go/pkg/mod/github.com/pulumi/terraform-plugin-sdk/v2@v2.0.0-20240202163305-e2a20ae13ef9/helper/schema/resource.go:914 +0x86c
    github.com/pulumi/pulumi-terraform-bridge/v3/pkg/tfshim/sdk-v2.v2Provider.Apply({0x140005fca20?, {0x14001de1ed0?, 0x0?, 0x14003e0e330?}}, {0x111519528, 0x14003dfed20}, {0x10c7050e5, 0xf}, {0x0?, 0x0}, ...)
        /home/runner/go/pkg/mod/github.com/pulumi/pulumi-terraform-bridge/v3@v3.74.0/pkg/tfshim/sdk-v2/provider.go:122 +0x140
    github.com/pulumi/pulumi-terraform-bridge/v3/pkg/tfshim/sdk-v2.(*providerWithPlanResourceChangeDispatch).Apply(0x14001902090, {0x111519528, 0x14003dfed20}, {0x10c7050e5, 0xf}, {0x0, 0x0}, {0x11152a4e0, 0x14000cc2b00})
        /home/runner/go/pkg/mod/github.com/pulumi/pulumi-terraform-bridge/v3@v3.74.0/pkg/tfshim/sdk-v2/provider2.go:700 +0xc8
    github.com/pulumi/pulumi-terraform-bridge/v3/pkg/tfbridge.(*Provider).Create(0x14002192000, {0x111519528?, 0x14003dfe390?}, 0x14003b6d0e0)
        /home/runner/go/pkg/mod/github.com/pulumi/pulumi-terraform-bridge/v3@v3.74.0/pkg/tfbridge/provider.go:1025 +0x654
    github.com/pulumi/pulumi-terraform-bridge/x/muxer.(*muxer).Create.func1({0x111577a20?, 0x14002192000?})
        /home/runner/go/pkg/mod/github.com/pulumi/pulumi-terraform-bridge/x/muxer@v0.0.7/muxer.go:363 +0x3c
    github.com/pulumi/pulumi-terraform-bridge/x/muxer.resourceMethod[...](0x140020b2720?, 0x1400286f6c8, 0x1400286f6a8?)
        /home/runner/go/pkg/mod/github.com/pulumi/pulumi-terraform-bridge/x/muxer@v0.0.7/muxer.go:322 +0xc4
    github.com/pulumi/pulumi-terraform-bridge/x/muxer.(*muxer).Create(0x1400286f708?, {0x111519528?, 0x14003dfe390?}, 0x10eb93320?)
        /home/runner/go/pkg/mod/github.com/pulumi/pulumi-terraform-bridge/x/muxer@v0.0.7/muxer.go:362 +0x5c
    github.com/pulumi/pulumi/sdk/v3/proto/go._ResourceProvider_Create_Handler.func1({0x111519528, 0x14003dfe390}, {0x110b26260?, 0x14003b6d0e0})
        /home/runner/go/pkg/mod/github.com/pulumi/pulumi/sdk/v3@v3.105.0/proto/go/provider_grpc.pb.go:593 +0x74
    github.com/grpc-ecosystem/grpc-opentracing/go/otgrpc.OpenTracingServerInterceptor.func1({0x111519528, 0x14003de9da0}, {0x110b26260, 0x14003b6d0e0}, 0x14002bb4840, 0x14002b019f8)
        /home/runner/go/pkg/mod/github.com/grpc-ecosystem/grpc-opentracing@v0.0.0-20180507213350-8e809c8a8645/go/otgrpc/server.go:57 +0x2e8
    github.com/pulumi/pulumi/sdk/v3/proto/go._ResourceProvider_Create_Handler({0x1111564e0?, 0x140020b2720}, {0x111519528, 0x14003de9da0}, 0x1400100ee80, 0x14002312f80)
        /home/runner/go/pkg/mod/github.com/pulumi/pulumi/sdk/v3@v3.105.0/proto/go/provider_grpc.pb.go:595 +0x12c
    google.golang.org/grpc.(*Server).processUnaryRPC(0x1400470f200, {0x111519528, 0x14003de9bf0}, {0x11154b300, 0x140015dc340}, 0x14002bd3680, 0x14002dcaf90, 0x11a9cda40, 0x0)
        /home/runner/go/pkg/mod/google.golang.org/grpc@v1.61.0/server.go:1385 +0xb8c
    google.golang.org/grpc.(*Server).handleStream(0x1400470f200, {0x11154b300, 0x140015dc340}, 0x14002bd3680)
        /home/runner/go/pkg/mod/google.golang.org/grpc@v1.61.0/server.go:1796 +0xc4c
    google.golang.org/grpc.(*Server).serveStreams.func2.1()
        /home/runner/go/pkg/mod/google.golang.org/grpc@v1.61.0/server.go:1029 +0x8c
    created by google.golang.org/grpc.(*Server).serveStreams.func2 in goroutine 39
        /home/runner/go/pkg/mod/google.golang.org/grpc@v1.61.0/server.go:1040 +0x150

so im at a loss really

@Frassle Frassle transferred this issue from pulumi/pulumi Feb 13, 2024
@iamacup iamacup changed the title panic: when creating a listener on a loadbalancer (AWS) REGRESSION? 6.21 -> 6.22 - panic: when creating a listener on a loadbalancer (AWS) Feb 13, 2024
@iamacup
Copy link
Author

iamacup commented Feb 13, 2024

I think this is a regression

"@pulumi/aws": "6.21.0", works
"@pulumi/aws": "6.22.0", does not

problem is here: #3411

@iwahbe
Copy link
Member

iwahbe commented Feb 14, 2024

Hi @iamacup. This is indeed a regression, tracked in #3421. We have a fix going in now and plan to release later today.

@iwahbe iwahbe closed this as not planned Won't fix, can't repro, duplicate, stale Feb 14, 2024
@iwahbe iwahbe self-assigned this Feb 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Some behavior is incorrect or out of spec resolution/duplicate This issue is a duplicate of another issue
Projects
None yet
Development

No branches or pull requests

2 participants