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

[Question] How can the spot instance request issue be resolved? #69

Open
mrumpf opened this issue Oct 3, 2023 · 1 comment
Open

[Question] How can the spot instance request issue be resolved? #69

mrumpf opened this issue Oct 3, 2023 · 1 comment

Comments

@mrumpf
Copy link

mrumpf commented Oct 3, 2023

I'm playing around with cdk deploy and cdk destroy to test the DNS name feature I requested in #68

The "cdk destroy" operation takes ages until it finally fails. I'm not 100% sure yet, but it seems as if the spot instance requests issue, you described somewhere in the comments, led to the issue that a second VM has been created, which does not get deleted by the cdk destroy operation and an attempt to delete the whole stack fails because the ENI is still in use by the second spot instance that is running.

aws ec2 describe-spot-instance-requests --query "SpotInstanceRequests[].SpotInstanceRequestId"

The question is whether there is a way to avoid a second VM to be started, becoming somehow detached from the CDK/CFN state?

@mrumpf
Copy link
Author

mrumpf commented Oct 3, 2023

I switched to the following properties:

        interruptionBehavior: SpotInstanceInterruption.TERMINATE,
        requestType: SpotRequestType.ONE_TIME,

and it seems to me that I had no more (or less?) VMs hanging around. There is still the issue with spot instance requests, but at least I could simply "cdk destroy" the whole setup without running into timeouts because of some detached VMs that were not seen by the CDK but blocking the ENI resources so that they could not be deleted.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant