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

Provider scaler should only check if a provider exists when matching scale requirements #106

Closed
thomastaylor312 opened this issue May 2, 2023 · 6 comments · Fixed by #119
Labels
help wanted Extra attention is needed

Comments

@thomastaylor312
Copy link
Contributor

There are going to be many times where a capability provider is "shared" between different applications (think something like the httpserver provider). Right now if one is already running, then every single reconcile will trigger a command that fails if some other application is running the provider.

To solve this I think the solution should be that the provider scaler should NOT match on annotations and only check if a provider with the correct linkname is running on hosts that match its spread requirements. It should also run a reconcile anytime it sees a provider stopped event. This is correct behavior because all that this is checking for is that a host has that capability, it doesn't matter what is running it. If for some reason that provider is deleted (by a user or by another application that has been deleted), then the scaler should make sure it is running again for the application

Please note that this isn't perfect. In the future I'd like to avoid the, albeit short, downtime of a provider stopping and then starting again, but that will require some sort of shared state between all of the different scalers

@thomastaylor312 thomastaylor312 added the help wanted Extra attention is needed label May 2, 2023
@andar1an
Copy link
Contributor

andar1an commented May 2, 2023

I can grab this if time is not a constraint

@thomastaylor312
Copy link
Contributor Author

Sure thing! Just let us know if you start working on it and I'll mark it as reserved

@andar1an
Copy link
Contributor

andar1an commented May 4, 2023

Starting on Monday, I feel Monday is a clean start.

@andar1an
Copy link
Contributor

andar1an commented May 9, 2023

No longer going to be able to get to this one. Will be moving on to some other work and no longer have time.

thomastaylor312 added a commit to thomastaylor312/wadm that referenced this issue May 31, 2023
This PR contains a couple small changes I discovered while manually testing,
but the large change is around the scaler algorithm for providers. Now a
provider scaler will consider its job done if _any_ provider matching what
it is expecting to be running.

Closes wasmCloud#106

Signed-off-by: Taylor Thomas <taylor@cosmonic.com>
thomastaylor312 added a commit to thomastaylor312/wadm that referenced this issue May 31, 2023
This PR contains a couple small changes I discovered while manually testing,
but the large change is around the scaler algorithm for providers. Now a
provider scaler will consider its job done if _any_ provider matching what
it is expecting to be running.

Closes wasmCloud#106

Signed-off-by: Taylor Thomas <taylor@cosmonic.com>
thomastaylor312 added a commit to thomastaylor312/wadm that referenced this issue May 31, 2023
This PR contains a couple small changes I discovered while manually testing,
but the large change is around the scaler algorithm for providers. Now a
provider scaler will consider its job done if _any_ provider matching what
it is expecting to be running.

Closes wasmCloud#106

Signed-off-by: Taylor Thomas <taylor@cosmonic.com>
@brooksmtownsend
Copy link
Member

Reopening this one as it seems to still be an issue, but possibly only for newly created scalers. I've noticed that if I create an app that deploys a provider, say HTTPserver with link default, and then another app with the same provider, it can occasionally not recognize the other provider and continually try to start HTTPserver again. More investigation needed.

@brooksmtownsend
Copy link
Member

Closed by #167

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
No open projects
Development

Successfully merging a pull request may close this issue.

3 participants