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

Allow order of execution to be determined by "DependsOn" param of CloudfFormation #42

Open
Viza-Productions opened this issue Dec 12, 2018 · 0 comments

Comments

@Viza-Productions
Copy link

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!

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

No branches or pull requests

2 participants