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

CDK deploy stopped updating playbook.zip asset #25873

Closed
cartalla opened this issue Jun 6, 2023 · 6 comments
Closed

CDK deploy stopped updating playbook.zip asset #25873

cartalla opened this issue Jun 6, 2023 · 6 comments
Labels
@aws-cdk/aws-s3 Related to Amazon S3 bug This issue is a bug. effort/medium Medium work item – several days of effort needs-reproduction This issue needs reproduction. p2 response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 7 days.

Comments

@cartalla
Copy link

cartalla commented Jun 6, 2023

Describe the bug

I use an ansible playbook to configure my ec2 instances. I create an s3 asset for the playbook directory which gets put into a zip file. I then download the playbook in my userdata, unzip it, and run it. Until the last day, when I'd update any file in the playbook and deployed the stack, the asset would get updated which would cause a userdata change which would cause the instance to reboot and run the new playbook contents (I have userdata configured to rerun on reboot).

Now, I'm not seeing the userdata change and it keeps downloading the old asset. This has been working for over a year, so why has this suddenly stopped working? This is a complex CDK and I'm not quite sure how to debug this. It seems like core CDK functionality has just ceased to work.

Expected Behavior

New cdk asset gets uploaded to S3 and the asset reference in the userdata changes, instance gets stoppped/started, userdata runs and gets the latest asset.

Current Behavior

Asset doesn't change. Ansible runs with old playbook contents.

Reproduction Steps

Change file in asset directory.
Update stack.

Possible Solution

No response

Additional Information/Context

No response

CDK CLI Version

2.69.0

Framework Version

No response

Node.js Version

16.15.0

OS

Amazon Linux 2

Language

Python

Language Version

3.7.16

Other information

No response

@cartalla cartalla added bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. labels Jun 6, 2023
@github-actions github-actions bot added the @aws-cdk/aws-s3 Related to Amazon S3 label Jun 6, 2023
@pahud
Copy link
Contributor

pahud commented Jun 6, 2023

Thanks for your report. Is there anything we can do to reproduce this in our environment?

@pahud pahud added p2 response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 7 days. effort/medium Medium work item – several days of effort needs-reproduction This issue needs reproduction. and removed needs-triage This issue or PR still needs to be triaged. labels Jun 6, 2023
@cartalla
Copy link
Author

cartalla commented Jun 6, 2023

I'm not sure. I'm doing some debug now. When I look in the cdk.out directory I see the new asset get created with the correct contents. This is reflected in slurmeda_assets.json and slurmeda.template.json. When I update the stack then it says no updates, but the userdata on the instance doesn't match the userdata in slurmeda.template.json. So maybe the problem is with the diff?

@cartalla
Copy link
Author

cartalla commented Jun 6, 2023

I'm an AWS employee, so you can slack me directly if that's more convenient.

@cartalla
Copy link
Author

cartalla commented Jun 6, 2023

Might be a CFN problem, not CDK. I looked at the cdk.out and compared the asset in the deployed CFN template and they matched. But the userdata on the instance itself was still referring to an old asset. The userdata script on the instance didn't match the deployed template.

@cartalla
Copy link
Author

cartalla commented Jun 6, 2023

I think a configuration change on the instance was preventing its metadata script from being update.

Not a cdk problem.

@cartalla cartalla closed this as completed Jun 6, 2023
@github-actions
Copy link

github-actions bot commented Jun 6, 2023

⚠️COMMENT VISIBILITY WARNING⚠️

Comments on closed issues are hard for our team to see.
If you need more assistance, please either tag a team member or open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
@aws-cdk/aws-s3 Related to Amazon S3 bug This issue is a bug. effort/medium Medium work item – several days of effort needs-reproduction This issue needs reproduction. p2 response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 7 days.
Projects
None yet
Development

No branches or pull requests

2 participants