Skip to content

fix(aws-ecs): export instance drain hook#1392

Closed
cohalz wants to merge 2 commits intoaws:masterfrom
cohalz:fix/instance-drain-hook-does-not-exported
Closed

fix(aws-ecs): export instance drain hook#1392
cohalz wants to merge 2 commits intoaws:masterfrom
cohalz:fix/instance-drain-hook-does-not-exported

Conversation

@cohalz
Copy link
Copy Markdown
Contributor

@cohalz cohalz commented Dec 19, 2018

fix #1391

Pull Request Checklist

Please check all boxes, including N/A items:

Testing

  • Unit test and/or integration test added
  • Toolkit change?: integration tests manually executed (paste output to the PR description)
  • Init template change?: coordinated update of integration tests (currently maintained in a private repo).

Documentation

  • README: README and/or documentation topic updated
  • jsdocs: All public APIs documented

Title and description

  • Change type: Title is prefixed with change type:
    • fix(module): <title> bug fix (patch)
    • feat(module): <title> feature/capability (minor)
    • chore(module): <title> won't appear in changelog
    • build(module): <title> won't appear in changelog
  • Title format: Title uses lower case and doesn't end with a period
  • Breaking change?: Last paragraph of description is: BREAKING CHANGE: <describe exactly what changed and how to achieve similar behavior + link to documentation/gist/issue if more details are required>
  • References: Indicate issues fixed via: Fixes #xxx or Closes #xxx

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license.

@cohalz cohalz requested review from a team and SoManyHs as code owners December 19, 2018 06:27
@eladb
Copy link
Copy Markdown
Contributor

eladb commented Dec 19, 2018

@rix0rrr @SoManyHs was this intentional?

@rix0rrr
Copy link
Copy Markdown
Contributor

rix0rrr commented Dec 27, 2018

Yes. It's not clear to me why it should be exported. @cohalz, what problems is this causing for you?

@cohalz
Copy link
Copy Markdown
Contributor Author

cohalz commented Dec 27, 2018

Even if I create your own without using the ECS construct library I want to use instance drain hook.

@rix0rrr
Copy link
Copy Markdown
Contributor

rix0rrr commented Dec 28, 2018

That brings up my next question: what use cases of yours is the rest of the ECS library not satsifying?

@rix0rrr
Copy link
Copy Markdown
Contributor

rix0rrr commented Dec 28, 2018

Oh I see, spot instances

@cohalz
Copy link
Copy Markdown
Contributor Author

cohalz commented Dec 28, 2018

yes, even when I make ASG or clusters myrself, the functions provided by InstanceDrainHook are essential, so there are cases I want to use.

@rix0rrr
Copy link
Copy Markdown
Contributor

rix0rrr commented Dec 28, 2018

I don't have any experience with spot instances myself, but are you sure the termination hook as coded will even work properly? Seems like spot instances cannot be kept in TERMINATING state for an arbitrary amount of time (as this script will try to do) and the termination notification actually works differently (by polling the instance metadata service).

I've gleaned this from code found at the bottom of this post.

Are you sure the SNS notification hook will be fired?

@cohalz
Copy link
Copy Markdown
Contributor Author

cohalz commented Dec 28, 2018

I don't confirm whether hooks can be used in spot instances, I think that there is no loss by being exported when using ondemand.

@rix0rrr
Copy link
Copy Markdown
Contributor

rix0rrr commented Jan 15, 2019

I'm sorry, I'm going to close this PR. For now the drain hook is an implementation detail that I'd rather not expose, and I don't think it will work for your use case.

If I'm wrong, or a definite use case for it pops up, we can reconsider this.

@rix0rrr rix0rrr closed this Jan 15, 2019
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

Successfully merging this pull request may close these issues.

ECS: instance draining hook does not exported

3 participants