-
Notifications
You must be signed in to change notification settings - Fork 158
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
Resources deleted for no apparent reason #2593
Comments
Hi @sy-bee - thank you for opening this issue. I agree that this behavior seems very concerning. Would you be able to provide an example program which replicates this issue? It would be helpful to know what operations are being run to cause this issue. Thank you! |
Thanks @kpitzen for taking a look at this. Below is stripped down version of the
|
Hi @kpitzen , let me know if the above information is helpful. Thanks! |
@kpitzen just FYI having bugs like this in the repo with no comments since July is enough to put me off considering Pulumi. |
Hi @mjaggard - understood. I am no longer part of the team responsible for this repository. @mikhailshilkov should be able to assist you further. Apologies for the inconvenience. |
Our production stack today was removed by pulumi with exactly the same log dump as provided by the original author with same conditions. We are unable to understand. Here's our log dump:
After logging |
@mehulmpt can you provide an example program that we can run to attempt to reproduce this? When refresh is run it syncs what exists in AWS to the state file and when So for example, if you had this setup with two buckets being created. from pulumi import automation as auto
from pulumi_aws import s3
def pulumi_program() -> None:
s3.BucketV2("my-bucket1")
s3.BucketV2("my-bucket2")
stack_name = "dev"
project_name = "pulumi-python-app"
stack = auto.create_or_select_stack(stack_name=stack_name,
project_name=project_name,
program=pulumi_program)
stack.workspace.install_plugin("aws", "v6.29.0")
stack.set_config("aws:region", auto.ConfigValue(value="us-east-2"))
stack.refresh(on_output=print)
stack.up(on_output=print) And then I remove one of the buckets, refresh will show that there are no changes (since the bucket exists in AWS and in the state file), but If you program was exactly the same between the previous and current run which deleted the resource then there is definitely something that we need to try and reproduce. |
@corymhall Here's a trimmed-down code of the program @mehulmpt and I were using: https://github.com/rishabhrao/pulumi-issue Additional details:
|
A few more things to add on here:
We are unable to successfully reproduce this issue anymore, but we feel it is a critical bug. All we can figure out so far is it looks like there is no bug on the AWS stack, our code, and the deployment JSON file used by Pulumi at the time of nuking the distribution. |
@rishabhrao / @mehulmpt thanks for the detailed repro!
I think you may be on to something here. I'm not super familiar with the automation api side of things, but it would seem to indicate that somehow the program was empty on the run where the resources were deleted. I'm going to talk with the team to see if anyone has any more ideas. |
@rishabhrao / @mehulmpt after talking with the team, it looks like this issue is related to pulumi/pulumi#15390 which should be fixed in |
Thanks! We're on a 7 month old version right now but the error looks exactly the same as what happened with us. Giving it another shot. |
Assuming this is fixed on latest, please reopen if still having difficulty! Thank you. |
What happened?
We use Pulumi automations API to manage our infrastructure resources, however during one of the updates to resources of the same type of stack, some of the resources were deleted for no apparent reason. A refresh indicated that almost all of the resources match to provisioned resources in AWS, however subsequent update deleted almost half of the resources including VPN tunnels and EC2 instances.
Refresh:
And a subsequent update less than a minute afterwards:
As you can see 8 resources were deleted. This remind me of #1615, however that bug was apparently solved.
Expected Behavior
Update was expected to update EC2 instance (replace it) but it should not have changed anything VPN related. I have other similar refresh / update cycles with our stacks and none experienced this behaviour.
Steps to reproduce
N/A
Output of
pulumi about
Additional info:
pulumi-aws
version being 5.14. During the event above,pulumi-aws
was version 5.31.Additional context
No response
Contributing
Vote on this issue by adding a 👍 reaction.
To contribute a fix for this issue, leave a comment (and link to your pull request, if you've opened one already).
The text was updated successfully, but these errors were encountered: