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

Bootstrap should detect task def changes #82

Open
slpsys opened this issue Feb 25, 2017 · 10 comments
Open

Bootstrap should detect task def changes #82

slpsys opened this issue Feb 25, 2017 · 10 comments

Comments

@slpsys
Copy link
Contributor

slpsys commented Feb 25, 2017

Right now, the bootstrap command detects if there is a most-recent task definition, but only tries register_task_definition if there is nonesuch. In reality, calling register_task_definition creates a new version of the task definition; it'd be likely useful to detect this, because...quite frankly, most people are going to mess things up at least once.

@apurvis
Copy link
Contributor

apurvis commented Feb 26, 2017

not sure what this means exactly? you want to register a new task definition anyways when people bootstrap?

@slpsys
Copy link
Contributor Author

slpsys commented Feb 26, 2017

@apurvis

calling register_task_definition twice on task definition my_def yields task definitions my_def/1 and my_def/2 in ECS. Broadside currently will always check if any my_def/* exists, and if so, never update. It will update the service, just not the task definition. This is suggesting that if you run bootstrap twice, it updates the task definition in some way, or at least detects it.

@apurvis
Copy link
Contributor

apurvis commented Feb 26, 2017

This is suggesting that if you run bootstrap twice, it updates the task definition in some way, or at least detects it.

do you mean "if you run bootstrap twice, it SHOULD update the task definition?"

FWIW any kind of deploy will update the task definition to match the configuration; it's only bootstrap that won't.

@apurvis
Copy link
Contributor

apurvis commented Feb 26, 2017

This is suggesting that if you run bootstrap twice, it updates the task definition in some way, or at least detects it.

i am in favor of the idea that running bootstrap twice will delete the service and make a new one based on what is configured (though maybe it would be a decent idea to add a --force flag to actually do that, and without --force it just warns and says it won't update if it detects any differences between the configured service_config and the actual current service config in AWS)

@slpsys
Copy link
Contributor Author

slpsys commented Feb 27, 2017

do you mean "if you run bootstrap twice, it SHOULD update the task definition?"

Yes. Which, apparently, everything else does?

FWIW any kind of deploy will update the task definition to match the configuration; it's only bootstrap that won't.

I didn't actually notice that when I was poking around, but that actually kind of makes the current bootstrap behavior more annoying. For e.g. ELBs, the Task Definition and the Service need to be in lockstep, and no command other than bootstrap allows you to set up an ELB, since only create_service allows this. If you mess up the Task Definition the first time, broadside will never allow you to correctly set up an ELB/Service without going outside the tool.

@slpsys
Copy link
Contributor Author

slpsys commented Feb 27, 2017

re: your other comment, I haven't thought much about it, but it does seem like --force might be useful.

@matl33t
Copy link
Contributor

matl33t commented Feb 28, 2017

how about this behavior:
if bootstrap fails, deactivate the created task definition
bootstrap will not overwrite a task definition if it exists, and will not overwrite a service
if the force flag is provided, both the task definition and service will be overwritten

@apurvis
Copy link
Contributor

apurvis commented Feb 28, 2017

if bootstrap fails, deactivate the created task definition

presumably you mean "if bootstrap fails to create the service AND already created a task definition"?

@matl33t
Copy link
Contributor

matl33t commented Feb 28, 2017

yea

@apurvis
Copy link
Contributor

apurvis commented Mar 11, 2017

i meant to answer "sounds good to me as long as it sounds good to marc, he seems to have a clearer grasp of the use case

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

3 participants