question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. ItΒ collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Issues creating nodegroup, Cryptic error message

See original GitHub issue

Expected behavior

Successfully create a nodegroup attached to a cluster

Current behavior

Erroring with the following message:

    error: program failed: marshaling properties: awaiting input property cluster: missing one or more required arguments
    exit status 1

    error: an unhandled error occurred: program exited with non-zero exit code: 1

Steps to reproduce

run pulumi up with the following code snippet:


    cluster, err := eks.NewCluster(ctx, stack, &eks.ClusterArgs{
      SkipDefaultNodeGroup: pulumi.Bool(true),
      VpcId: pulumi.String(vpcId),
      SubnetIds: pulumi.StringArray{
        pulumi.String("subnet-<redacted>"),
        pulumi.String("subnet-<redacted>"),
        pulumi.String("subnet-<redacted>"),
      },
      ProviderCredentialOpts: &eks.KubeconfigOptionsArgs{
        ProfileName: pulumi.String(awsProfileName),
      },
      EndpointPrivateAccess: pulumi.Bool(true),
      EndpointPublicAccess: pulumi.Bool(false),
      ClusterSecurityGroup: clusterSecurityGroup,
      InstanceProfileName: instanceProfile.Name,
      NodeAssociatePublicIpAddress: pulumi.Bool(false),
    })
    if err != nil {
      return err
    }

_, err = eks.NewNodeGroup(ctx, fmt.Sprintf("%s-%s",stack,"systemNg") , &eks.NodeGroupArgs{
      Cluster: cluster.Core,
      InstanceProfile: instanceProfile,
      DesiredCapacity: pulumi.Int(1),
      MinSize: pulumi.Int(1),
      MaxSize: pulumi.Int(2),
      InstanceType: pulumi.String("t2.medium"),
      Labels: pulumi.StringMap{
        "ondemand": pulumi.String("true"),
        "nodegroup": pulumi.String("system"),
        "zone": pulumi.String("default"),
      },
      NodeSubnetIds: pulumi.StringArray{
        pulumi.String("subnet-<redacted>"), // same subnets as cluster
        pulumi.String("subnet-<redacted>"),
        pulumi.String("subnet-<redacted>"),
      },
    },pulumi.Parent(cluster))

Context (Environment)

It created the cluster succesfully, but failed with the obscure message posted above

Running on Mac Catalina Pulumi version 2.25.1 (Updated to 3.0.0 with the same results)

Iam resources and security groups created using pulumi-aws module

Full Preview and Output of pulumi up

❯ pulumi up
Previewing update (andrew-dev)

View Live: https://app.pulumi.com/andrewhertog/proto-pulumi/andrew-dev/previews/1aa49f04-967c-459d-964e-982b74d926b8

     Type                                   Name                              Plan
 +   pulumi:pulumi:Stack                    proto-pulumi-andrew-dev           create
 +   β”œβ”€ aws:iam:Role                        ec2InstanceRole                   create
 +   β”œβ”€ aws:ec2:SecurityGroup               andrew-dev-clusterSg              create
 +   β”œβ”€ aws:iam:RolePolicyAttachment        ec2InstanceRole-policy-2          create
 +   β”œβ”€ aws:iam:RolePolicyAttachment        ec2InstanceRole-policy-1              create
 +   β”œβ”€ aws:iam:RolePolicyAttachment        ec2InstanceRole-policy-0              create
 +   β”œβ”€ aws:iam:InstanceProfile             andrew-dev-instanceProfile                    create
 +   └─ eks:index:Cluster                   andrew-dev                                    create
 +      β”œβ”€ eks:index:ServiceRole            andrew-dev-instanceRole                       create
 +      β”‚  β”œβ”€ aws:iam:Role                  andrew-dev-instanceRole-role                  create
 +      β”‚  β”œβ”€ aws:iam:RolePolicyAttachment  andrew-dev-instanceRole-03516f97              create
 +      β”‚  β”œβ”€ aws:iam:RolePolicyAttachment  andrew-dev-instanceRole-3eb088f2               create
 +      β”‚  └─ aws:iam:RolePolicyAttachment  andrew-dev-instanceRole-e1b295bd               create
 +      β”œβ”€ eks:index:ServiceRole            andrew-dev-eksRole                                     create
 +      β”‚  β”œβ”€ aws:iam:Role                  andrew-dev-eksRole-role                                create
 +      β”‚  β”œβ”€ aws:iam:RolePolicyAttachment  andrew-dev-eksRole-90eb1c99                            create
 +      β”‚  └─ aws:iam:RolePolicyAttachment  andrew-dev-eksRole-4b490823                            create
 +      β”œβ”€ aws:eks:Cluster                  andrew-dev-eksCluster                                  create
 +   pulumi:pulumi:Stack                    proto-pulumi-andrew-dev                                create
 +      β”œβ”€ pulumi:providers:kubernetes      andrew-dev-provider                                    create
 +      β”œβ”€ eks:index:VpcCni                 andrew-dev-vpc-cni                                     create
 +      β”œβ”€ aws:ec2:SecurityGroup            andrew-dev-nodeSecurityGroup                           create
 +      β”œβ”€ kubernetes:core/v1:ConfigMap     andrew-dev-nodeAccess                                  create
 +      β”œβ”€ aws:ec2:SecurityGroupRule        andrew-dev-eksNodeIngressRule                          create
 +      β”œβ”€ aws:ec2:SecurityGroupRule        andrew-dev-eksNodeClusterIngressRule                   create
 +      β”œβ”€ aws:ec2:SecurityGroupRule        andrew-dev-eksClusterIngressRule                       create
 +      β”œβ”€ aws:ec2:SecurityGroupRule        andrew-dev-eksExtApiServerClusterIngressRule           create
 +      β”œβ”€ aws:ec2:SecurityGroupRule        andrew-dev-eksNodeInternetEgressRule                   create
 +      └─ eks:index:NodeGroup              andrew-dev-systemNg                                    create
 +         β”œβ”€ eks:index:RandomSuffix        andrew-dev-systemNg-cfnStackName                       create
 +         β”œβ”€ aws:ec2:SecurityGroup         andrew-dev-systemNg-nodeSecurityGroup                  create
 +         β”œβ”€ aws:ec2:SecurityGroupRule     andrew-dev-systemNg-eksNodeInternetEgressRule          create
 +         β”œβ”€ aws:ec2:SecurityGroupRule     andrew-dev-systemNg-eksNodeIngressRule                 create
 +         β”œβ”€ aws:ec2:SecurityGroupRule     andrew-dev-systemNg-eksExtApiServerClusterIngressRule  create
 +         β”œβ”€ aws:ec2:SecurityGroupRule     andrew-dev-systemNg-eksNodeClusterIngressRule          create
 +         β”œβ”€ aws:ec2:SecurityGroupRule     andrew-dev-systemNg-eksClusterIngressRule              create
 +         β”œβ”€ aws:ec2:LaunchConfiguration   andrew-dev-systemNg-nodeLaunchConfiguration            create
 +         └─ aws:cloudformation:Stack      andrew-dev-systemNg-nodes                              create

Resources:
    + 38 to create

Do you want to perform this update? yes
Updating (andrew-dev)

View Live: https://app.pulumi.com/andrewhertog/proto-pulumi/andrew-dev/updates/15

     Type                                   Name                              Status       Info
 +   pulumi:pulumi:Stack                    proto-pulumi-andrew-dev           creating..
 +   pulumi:pulumi:Stack                    proto-pulumi-andrew-dev           creating...
 +   pulumi:pulumi:Stack                    proto-pulumi-andrew-dev           creating..
 +   β”œβ”€ aws:iam:RolePolicyAttachment        ec2InstanceRole-policy-0              created
 +   β”œβ”€ aws:iam:InstanceProfile             andrew-dev-instanceProfile                    created
 +   β”œβ”€ aws:iam:RolePolicyAttachment        ec2InstanceRole-policy-2                      created
 +   β”œβ”€ aws:iam:RolePolicyAttachment        ec2InstanceRole-policy-1                      created
 +   └─ eks:index:Cluster                   andrew-dev                                    created
 +      β”œβ”€ eks:index:ServiceRole            andrew-dev-instanceRole                       created
 +      β”‚  β”œβ”€ aws:iam:Role                  andrew-dev-instanceRole-role                  created
 +      β”‚  β”œβ”€ aws:iam:RolePolicyAttachment  andrew-dev-instanceRole-03516f97              created
 +      β”‚  β”œβ”€ aws:iam:RolePolicyAttachment  andrew-dev-instanceRole-3eb088f2              created
 +      β”‚  └─ aws:iam:RolePolicyAttachment  andrew-dev-instanceRole-e1b295bd              created
 +      β”œβ”€ eks:index:ServiceRole            andrew-dev-eksRole                            created
 +      β”‚  β”œβ”€ aws:iam:Role                  andrew-dev-eksRole-role                       created
 +      β”‚  β”œβ”€ aws:iam:RolePolicyAttachment  andrew-dev-eksRole-90eb1c99                   created
 +      β”‚  └─ aws:iam:RolePolicyAttachment  andrew-dev-eksRole-4b490823                   created
 +      β”œβ”€ aws:eks:Cluster                  andrew-dev-eksCluster                         created
 +      β”œβ”€ aws:ec2:SecurityGroup            andrew-dev-nodeSecurityGroup                  created
 +      β”œβ”€ eks:index:VpcCni                 andrew-dev-vpc-cni                            created
 +      β”œβ”€ pulumi:providers:kubernetes      andrew-dev-provider                           created
 +      β”œβ”€ pulumi:providers:kubernetes      andrew-dev-eks-k8s                            created
 +      β”œβ”€ kubernetes:core/v1:ConfigMap     andrew-dev-nodeAccess                         created
 +      β”œβ”€ aws:ec2:SecurityGroupRule        andrew-dev-eksNodeInternetEgressRule          created
 +      β”œβ”€ aws:ec2:SecurityGroupRule        andrew-dev-eksExtApiServerClusterIngressRule  created
 +      β”œβ”€ aws:ec2:SecurityGroupRule        andrew-dev-eksClusterIngressRule              created
 +      β”œβ”€ aws:ec2:SecurityGroupRule        andrew-dev-eksNodeIngressRule                 created
 +      └─ aws:ec2:SecurityGroupRule        andrew-dev-eksNodeClusterIngressRule          created

Diagnostics:
  pulumi:pulumi:Stack (proto-pulumi-andrew-dev):
    error: program failed: marshaling properties: awaiting input property cluster: missing one or more required arguments
    exit status 1

    error: an unhandled error occurred: program exited with non-zero exit code: 1

Resources:
    + 28 created

Duration: 10m48s



Affected feature

Golang eks.NewNodeGroup is suspected to have the issue.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:13 (6 by maintainers)

github_iconTop GitHub Comments

5reactions
justinvpcommented, May 14, 2021

Sorry for the trouble and thanks for your patience, @andrewhertog and @universam1. We’ll take a closer look at this today and let you know.

3reactions
justinvpcommented, May 27, 2021

https://github.com/pulumi/pulumi/pull/7158 fixes the underlying Go marshaling issues. Once that’s merged, we’ll need to regenerate the Go SDK for EKS and release a new version.

That change is sufficient to get managed node groups working (i.e. using eks.NewManagedNodeGroup; see the example here: https://github.com/pulumi/pulumi-eks/issues/577#issuecomment-849879316).

However, using the older eks.NewNodeGroup yields a new error from inside the TypeScript implementation:

    error: Error: 'dependsOn' was passed a value that was not a Resource: 523e1e61a9377aa8
        at /Users/justin/.pulumi/plugins/resource-eks-v0.30.0/node_modules/@pulumi/pulumi/runtime/resource.js:554:27
        at Generator.next (<anonymous>)
        at /Users/justin/.pulumi/plugins/resource-eks-v0.30.0/node_modules/@pulumi/pulumi/runtime/resource.js:21:71
        at new Promise (<anonymous>)
        at __awaiter (/Users/justin/.pulumi/plugins/resource-eks-v0.30.0/node_modules/@pulumi/pulumi/runtime/resource.js:17:12)
        at gatherExplicitDependencies (/Users/justin/.pulumi/plugins/resource-eks-v0.30.0/node_modules/@pulumi/pulumi/runtime/resource.js:532:12)
        at /Users/justin/.pulumi/plugins/resource-eks-v0.30.0/node_modules/@pulumi/pulumi/runtime/resource.js:546:50
        at /Users/justin/.pulumi/plugins/resource-eks-v0.30.0/node_modules/@pulumi/pulumi/output.js:250:35
        at Generator.next (<anonymous>)
        at /Users/justin/.pulumi/plugins/resource-eks-v0.30.0/node_modules/@pulumi/pulumi/output.js:21:71

cluster.Core includes the VpcCni resource, which is marshaled as a resource reference, and is used by the NodeGroup component. The problem is we do not have a resource registration on the TypeScript side for the VpcCni resource, so when the resource reference is deserialized, instead of rehydrating an instance of VpcCni resource, the deserializer falls back to the ID string of the resource, which cannot be used with dependsOn. The fix will involve adding a resource registration for VpcCni.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Resolve node group errors in an EKS cluster - Amazon AWS
I have issues with my managed node group in my Amazon Elastic Kubernetes Service (Amazon EKS) cluster. Short description. You receive an error...
Read more >
EKS Managed Node Groups, the good, the bad and the config
However I'll go into more detail on the Managed Node Group specifics ... for example we had some cryptic error messages from Terraform...
Read more >
PE release notes - Puppet
Resolved issues. Upgrade failed with cryptic errors if agent_version was configured for your infrastructure pe_repo class. If you configured theΒ ...
Read more >
Fields and Anonymous Attributes [Proposal] - Geometry Nodes ...
A sub-set of them could be created, on behalf of high level users, ... Not exposing the right attributes in nodegroups will create...
Read more >
@pulumi/pulumi | Yarn - Package Manager
The Pulumi Node.js SDK lets you write cloud programs in JavaScript. Installation. Using npm: $ npm install --save @pulumi/pulumi. Using yarn:
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found