-
Notifications
You must be signed in to change notification settings - Fork 4k
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
(aws-ec2): userDataCausesReplacement timeouts, if resourceSignalTimeout is set #12749
Comments
This could very well be the case. You should be able to determine that from the template, see if the logical ID of the instance and the logical ID in the UserData match. |
Hi, sorry for the long delay. Yes, the logical IDs match - the next assumption would be that perhaps CloudFormation is confused by this, or we are hitting some bug? If someone can share more details I can open a support request to AWS. |
@ilko-rbi , it'a bug.
So, cfn-signal script contains obsolete logicalId without hash part (SomeInstance1236 in this example) and CF will never know that SomeInstance1236HASH is ready. Workaround - create similar call to addOnExitCommand manually but get resourceId via 'instance.node.defaultChild as CfnInstance).logicalId'. It works for me and rendered with full logicalId. |
…ion with `userDataCausesReplacement` (#18726) If both `addSignalOnExitCommand` _and_ `userDataCausesReplacement` are used it results in an invalid logicalId being used in the `cfn-signal` call. This is due to `addSignalOnExitCommand` getting the logicalID from `Stack.getLogicalId` which does not take into consideration logicalId overrides which `userDataCausesReplacement` uses. This updates `addSignalOnExitCommand` to use the `logicalId` of the resource which is evaluated lazily and happens after all overrides. fixes #12749 ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
|
…ion with `userDataCausesReplacement` (aws#18726) If both `addSignalOnExitCommand` _and_ `userDataCausesReplacement` are used it results in an invalid logicalId being used in the `cfn-signal` call. This is due to `addSignalOnExitCommand` getting the logicalID from `Stack.getLogicalId` which does not take into consideration logicalId overrides which `userDataCausesReplacement` uses. This updates `addSignalOnExitCommand` to use the `logicalId` of the resource which is evaluated lazily and happens after all overrides. fixes aws#12749 ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
If userDataCausesReplacement is set to true and additionally resourceSignalTimeout is set the CF stack timeouts in the creation of the new EC2 instance due to not able to receive the cfn-signal from the newly created EC2
Reproduction Steps
The following stack works:
If we add to the ec2.Instance additionally custom timeout for the cfn-signal, a CreationPolicy is generated in the stack and the creation / update of the stack timeouts after the set timeout:
adds:
However the update (even the initial creation) fails:
What did you expect to happen?
Creation / update must work with this setup also
What actually happened?
CF doesn't receive the cfn-signal sent from the newly created EC2 instance, perhaps this relates to the "manipulated" logical IDs generated in this case?
Environment
Other
n.a.
This is 🐛 Bug Report
The text was updated successfully, but these errors were encountered: