https://pulumi.com logo
Title
v

victorious-dusk-75271

09/06/2022, 8:20 PM
how do i remove this pending sate. i tried to find this pending state in exported stack but nothing there
-   │     │  ├─ aws:ec2:LaunchConfiguration                 primary-eks-ng-nodeLaunchConfiguration                     deleting..     completing deletion from previous update
l

little-cartoon-10569

09/06/2022, 9:16 PM
pulumi refresh
will get rid of most (all?) pending updates.
v

victorious-dusk-75271

09/06/2022, 9:17 PM
i refreshed a lot of time, did not help
l

little-cartoon-10569

09/06/2022, 9:17 PM
Are you using an old version of the CLI? It's removed pending deletion updates for a long time...
v

victorious-dusk-75271

09/06/2022, 9:18 PM
i am running v3.39.1
l

little-cartoon-10569

09/06/2022, 9:19 PM
Anyway, the workaround is to export the state (
pulumi stack export --file _stack_,json
), remove the pending operations from the bottom of the file, then re-import it.
v

victorious-dusk-75271

09/06/2022, 9:19 PM
i dont see any pending operations in exports
l

little-cartoon-10569

09/06/2022, 9:20 PM
It's the last object in the file. If you're not seeing any pending operations, then that implies the stack you're upping isn't the stack you're exporting. Which would also explain why
pulumi refresh
isn't working.
v

victorious-dusk-75271

09/06/2022, 9:21 PM
I have confirmed and i am sure i am on the right stack
m

miniature-musician-31262

09/06/2022, 9:23 PM
What happens when you let
pulumi up
run to completion?
v

victorious-dusk-75271

09/06/2022, 9:24 PM
its fails with error
m

miniature-musician-31262

09/06/2022, 9:24 PM
What’s the error?
v

victorious-dusk-75271

09/06/2022, 9:24 PM
dependency related error
m

miniature-musician-31262

09/06/2022, 9:25 PM
Like it can’t delete your
aws:ec2:LaunchConfiguration
because something else depends on it? Does it tell you what?
v

victorious-dusk-75271

09/06/2022, 9:26 PM
i can let it run for about 10 minutes and get back to you
m

miniature-musician-31262

09/06/2022, 9:26 PM
Ok sounds good
v

victorious-dusk-75271

09/06/2022, 9:35 PM
Type                            Name                                         Status                  Info
     pulumi:pulumi:Stack             allrites-infrastructure-production           **failed**              1 error
 -   ├─ aws:ec2:LaunchConfiguration  primary-eks-spot-ng-nodeLaunchConfiguration  **deleting failed**     1 error
 -   └─ aws:ec2:LaunchConfiguration  primary-eks-ng-nodeLaunchConfiguration       **deleting failed**     1 error

Diagnostics:
  aws:ec2:LaunchConfiguration (primary-eks-spot-ng-nodeLaunchConfiguration):
    error: deleting urn:pulumi:production::allrites-infrastructure::custom:resource:eks$eks:index:Cluster$eks:index:NodeGroup$aws:ec2/launchConfiguration:LaunchConfiguration::primary-eks-spot-ng-nodeLaunchConfiguration: 1 error occurred:
        * deleting Auto Scaling Launch Configuration (primary-eks-spot-ng-nodeLaunchConfiguration-53006be): ResourceInUse: Cannot delete launch configuration primary-eks-spot-ng-nodeLaunchConfiguration-53006be because it is attached to AutoScalingGroup primary-eks
-spot-ng-9605b88f-NodeGroup-1IOM4QBQ1FA64
        status code: 400, request id: cb251332-1cba-4ef2-94fa-24fd794a5896

  pulumi:pulumi:Stack (allrites-infrastructure-production):
    error: update failed

  aws:ec2:LaunchConfiguration (primary-eks-ng-nodeLaunchConfiguration):
    error: deleting urn:pulumi:production::allrites-infrastructure::custom:resource:eks$eks:index:Cluster$eks:index:NodeGroup$aws:ec2/launchConfiguration:LaunchConfiguration::primary-eks-ng-nodeLaunchConfiguration: 1 error occurred:
        * deleting Auto Scaling Launch Configuration (primary-eks-ng-nodeLaunchConfiguration-0a6e40c): ResourceInUse: Cannot delete launch configuration primary-eks-ng-nodeLaunchConfiguration-0a6e40c because it is attached to AutoScalingGroup primary-eks-ng-87a9fb
f1-NodeGroup-1XNKMJOHW71JQ
        status code: 400, request id: df6a095f-97b5-4ee7-9fb2-abd4431507bd

Resources:

Duration: 2m15s
here is the error
i see the pending operations are not in a different group anymore. they are just marked as
"delete": true
l

little-cartoon-10569

09/06/2022, 9:41 PM
Looks like you need to delete an ASG.
👍 1
m

miniature-musician-31262

09/06/2022, 9:42 PM
☝️ was just arriving at the same conclusion yeah
👍 1
v

victorious-dusk-75271

09/06/2022, 9:42 PM
Thank you, I have managed to resolve the issue by removing the pending operations. I think i have missed this new changes to pulumi where it does not separate the pending operation
l

little-cartoon-10569

09/06/2022, 9:43 PM
I wasn't aware of it either.
m

miniature-musician-31262

09/06/2022, 9:45 PM
Nor was I. 🤔 When the update completes, are all of the resources you expected to be deleted actually deleted from AWS?
v

victorious-dusk-75271

09/06/2022, 9:46 PM
no, i do not want to delete them, it randomly happened due to other issue. probably a bug in my code
m

miniature-musician-31262

09/07/2022, 5:31 PM
Glad you’re unblocked, and thanks for calling this out @victorious-dusk-75271 — we’re updating our troubleshooting docs now to change that
pending_operations
reference to align with the new behavior of
pulumi refresh
(https://www.pulumi.com/blog/repairing-state-with-pulumi-refresh/)
🙌 1