Skip to content
This repository has been archived by the owner on Mar 18, 2021. It is now read-only.

Mandatory update needed for availableReplicas #33

Closed
alexellis opened this issue Mar 3, 2018 · 4 comments
Closed

Mandatory update needed for availableReplicas #33

alexellis opened this issue Mar 3, 2018 · 4 comments
Assignees

Comments

@alexellis
Copy link
Contributor

alexellis commented Mar 3, 2018

(Thanks for reporting an issue! Please make sure you click the link above to view the issue guidelines, then fill out the blanks below.)

Hi Nic,

A mandatory update is needed for OpenFaaS providers to work with the newest changes proposed in the OpenFaaS UI.

A new field: availableReplicas will need to be populated in the endpoint /system/function/<name>

I found the code here:

func MakeReplicationWriter(client nomad.Job, logger hclog.Logger, stats metrics.StatsD) http.HandlerFunc {

Now the purpose of this field is to indicate which functions (containers) have a replica ready for a HTTP request - often when pulling a large image the function is not ready until several minutes in. That's the purpose of this change - to provide that information to the UI or new endpoint.

You may need to vendor the latest release of faas-provider, which adds a healthcheck endpoint also.

https://github.com/openfaas/faas-provider/releases

The easiest way to maintain compatibility will be to set the availableReplicas count to be the same as replicas - this will mean the UI continues to work as planned. Down the road updating availableReplicas to its true meaning would be best.

Let me know if you have questions or if I can help.

Alex

What are the steps to reproduce this issue?

n/a

What happens?

Invoke button will be permanently disabled

What were you expecting to happen?

Button to be enabled.

Any logs, error output, etc?

(If it’s long, please paste to https://ghostbin.com/ and insert the link here.)

N/a

Any other comments?

As above

What versions of software are you using?

Operating System:

OpenFaaS Version:

0.7.5 and higher.

Nomad Version:

n/a

@nicholasjackson
Copy link
Contributor

Just need to finish debugging the failing tests but this is pretty much good to go

@alexellis
Copy link
Contributor Author

Thanks, I know you don't actively maintain this project so if you can get to it when you can that would help other potential nomad users.

@alexellis
Copy link
Contributor Author

Bump

@nicholasjackson
Copy link
Contributor

This has been all merged with pull request #34

Cheers,

Nic

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

No branches or pull requests

2 participants