Skip to content
This repository has been archived by the owner on Feb 4, 2020. It is now read-only.

Gateway UI Reports Status as "Not ready" #2

Open
jgnagy opened this issue Jul 24, 2018 · 9 comments
Open

Gateway UI Reports Status as "Not ready" #2

jgnagy opened this issue Jul 24, 2018 · 9 comments

Comments

@jgnagy
Copy link

jgnagy commented Jul 24, 2018

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.

@jgnagy
Copy link
Author

jgnagy commented Jul 27, 2018

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.

@alexellis
Copy link
Member

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

@jgnagy
Copy link
Author

jgnagy commented Jul 27, 2018

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.

@jgnagy
Copy link
Author

jgnagy commented Jul 27, 2018

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.

@kenfdev
Copy link
Member

kenfdev commented Jul 30, 2018

@jgnagy Thanks for raising this issue. As mentioned in the following issue, the faas-rancher doesn't support available replicas yet.

#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.

@alexellis
Copy link
Member

@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

@alexellis
Copy link
Member

cc @jgnagy

@jgnagy
Copy link
Author

jgnagy commented Jan 10, 2019

By the way, I have a PR that I believe will take care of this if either of you have time to review #5 .

@jgnagy
Copy link
Author

jgnagy commented Jan 25, 2019

Nevermind on my PR... go with what's in #7 instead.

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

No branches or pull requests

3 participants