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 sparse instance indexes #2247

Closed
gcapizzi opened this issue Apr 26, 2021 · 3 comments
Closed

Allow sparse instance indexes #2247

gcapizzi opened this issue Apr 26, 2021 · 3 comments

Comments

@gcapizzi
Copy link
Contributor

gcapizzi commented Apr 26, 2021

Issue

The Eirini team is planning to support Kubernetes Deployments in addition to StatefulSets for workloads. In order to do so, some assumptions about instance indexes would have to be removed from the Cloud Controller.

Context

This change would lead to relaxing our guarantees on instance indexes: instead of forming a 0..n sequence, indexes would be sparse in a quite wide range (from 1 to 60,466,177 😅 ). Instances would still be uniquely identifiable but indexes wouldn't be stable (they would change every time an instance is recreated for any reason), ordered or contiguous.

While investigating this, we could only find one place where this assumption is made, in app/actions/process_terminate.rb:

raise InstanceNotFound unless @index < @process.instances && @index >= 0
  • What do you think about removing this check and letting Cloud Controller fail only for instance that don't actually exist?
  • Can you think of other places in CC where our change could cause problems?

For more context, see cloudfoundry/eirini-release#207.

Thanks!
/cc @cloudfoundry/eirini

@tcdowney
Copy link
Member

Here's at least one other place where this kind of check is done:

@sethboyles
Copy link
Member

What would these checks be replaced with?

@gcapizzi
Copy link
Contributor Author

gcapizzi commented May 3, 2021

What would these checks be replaced with?

@sethboyles We would have to actually assess that the index exists instead of just checking that the index is in range, potentially storing the indexes explicitly. This is an issue we would have to solve for alphanumeric indexes too.

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

4 participants