Open jgnagy opened 6 years ago
This looks related to a difference in this code:
https://github.com/openfaas/faas-swarm/blob/master/handlers/replica_reader.go#L19
vs
https://github.com/openfaas-incubator/faas-rancher/blob/master/handlers/replicas.go#L62
Looks like faas-rancher doesn't provide the AvailableReplicas
that the newer gateway version is expecting. I'm not much of a Go developer otherwise I would be tempted to make this work. Other than this (so far, at least), it looks like this is working pretty well with latest gateway version.
Hi @jgnagy, the best person to help with this would be @kenfdev (the maintainer), even if faas-rancher just fakes the readiness by always saying it is ready - that would fix this for you.
The alternative is for you to invoke functions via the CLI or curl.
Rancher 2.0 + K8s is also a very good option for OpenFaaS.
Alex
Thanks, @alexellis, and I agree. We tend to use the CLI/curl/some other consumer to invoke the functions. Just got tired of others asking why they can't test through the Web UI. Figured I'd try to track down the issue.
And yes, just faking readiness would probably solve this.
I'm looking forward to Rancher 2.x, but we at work are waiting for 2.1. That milestone has lots related to migrations and will likely have more of the bugs worked out.
Confirmed... this could probably even be solved through a hack in the UI (not that I'm advocating for that). Just edited the source of the page and removed disabled="disabled"
from the Invoke button and it works flawlessly, so it looks like this reporting of ready containers is the only issue.
@jgnagy Thanks for raising this issue. As mentioned in the following issue, the faas-rancher doesn't support available replicas
yet.
https://github.com/openfaas-incubator/faas-rancher/issues/3
Since this is a bad UX, I'll try and fix this issue. Also, cattle is going to be deprecated in Rancher 2+ so you should definitely give faas-netes or openfaas-operator a try.
@kenfdev what if you just return true / 1 all the time to unblock people for the time being?
Happy to review/merge a PR for that.
Alex
cc @jgnagy
By the way, I have a PR that I believe will take care of this if either of you have time to review #5 .
Nevermind on my PR... go with what's in #7 instead.
It might be something specific to my setup, but I can't identify where. After deploying a function (which works flawlessly), I can invoke it without issue, but I am unable to test in the UI because it always reports that the Status is "Not ready". I'm trying to dig into why, but I'm hoping this may be a known (and solved) issue.