You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We have identified an issue with dependencies and startup order.
ISSUE:
One of our EC2 instances requires that a Container in ECS is fully available at the time of its startup/provisioning stage. From my understanding, the execution order is hardcoded in /lib/cfn_manage/cf_start_stop_environment.rb by "resource_start_priorities". Currently, EC2 instances start first, and THEN ECS instances... I suspect this is because the ECS startup will fail if the respective EC2 servers hosting Containers are not available first..? Regardless, this is causing issues for us since we must have one of our EC2 instances spin up only AFTER a specific ECS Container is fully available.
PROPOSED CHANGE:
Could you please consider traversing the Cloudformation Stack to compile a map of dependencies based on any "DependsOn" parameters of resources. Then, you could modify the execution order based on this mapping. This will ensure that any specified dependencies in the Stack are honoured, instead of following a fixed execution order based on service type.
TEMP WORKAROUND UNTIL FIXED:
Currently, we are using a temp workaround of invoking EC2 API commands after the cfn_manage execution to terminate the instances which have a dependency on ECS containers. Then, the ASG will spin up new instances shortly after this termination, thus having those instances with dependencies be created AFTER ECS is finished starting up.
Thank you for the open-source resource!
The text was updated successfully, but these errors were encountered:
We have identified an issue with dependencies and startup order.
ISSUE:
One of our EC2 instances requires that a Container in ECS is fully available at the time of its startup/provisioning stage. From my understanding, the execution order is hardcoded in /lib/cfn_manage/cf_start_stop_environment.rb by "resource_start_priorities". Currently, EC2 instances start first, and THEN ECS instances... I suspect this is because the ECS startup will fail if the respective EC2 servers hosting Containers are not available first..? Regardless, this is causing issues for us since we must have one of our EC2 instances spin up only AFTER a specific ECS Container is fully available.
PROPOSED CHANGE:
Could you please consider traversing the Cloudformation Stack to compile a map of dependencies based on any "DependsOn" parameters of resources. Then, you could modify the execution order based on this mapping. This will ensure that any specified dependencies in the Stack are honoured, instead of following a fixed execution order based on service type.
TEMP WORKAROUND UNTIL FIXED:
Currently, we are using a temp workaround of invoking EC2 API commands after the cfn_manage execution to terminate the instances which have a dependency on ECS containers. Then, the ASG will spin up new instances shortly after this termination, thus having those instances with dependencies be created AFTER ECS is finished starting up.
Thank you for the open-source resource!
The text was updated successfully, but these errors were encountered: