Closed alanisaac closed 4 years ago
Please can you use the official installer https://get-arkade.dev for this installation? Launch it from git bash rather than PowerShell for the deployment.
Can you also spend some time in the OpenFaaS docs? There's a troubleshooting guide and a number of steps you can run to debug this error.
I'm going to close as I can't reproduce the error and I think this is more of a support issue. Feel free to keep the discussion going on Slack.
/msg: slack
-- Join Slack to connect with the community https://docs.openfaas.com/community
/set title: Technical support
I appreciate the pointers. Before posting, I did go through the troubleshooting guide, the associated workshop, and tried both arkade and helm -- nothing's worked so far.
I'll try slack. Thanks!
If you went through all of the troubleshooting guide, then you could have pasted the output on the thread.
I'd suggest that you work through this, it should be of help to you with finding your 404 error: https://docs.openfaas.com/deployment/troubleshooting/#troubleshoot-kubernetes
And make sure that you're not executing against port 8080, k3s usually deploys Traefik's dashboard on this port.
@alexellis thank you for the replies!
I worked through those guides -- my apologies for any confusion by not initially posting the outputs of that walkthrough. However, I think I now know what's going on.
--
I haven't had an opportunity to use golang
yet, but I thought I'd dive in and try to debug this issue. I set up debugging for the deploy
command in Visual Studio Code, and found the following:
When a request is created in the following lines: https://github.com/openfaas/faas-cli/blob/f9a4019176bf4ff0c2c3e7e39c8d2c01b3ddb94a/proxy/deploy.go#L147-L148
The resulting request
object has the following property:
request.URL.Path="/\system\functions"
That URL did not look correct. As a test, I used Fiddler to make a request with the same body as I saw in code to POST /system/functions
, and the function was deployed correctly.
I dove deeper and it looks like the root cause is the following line:
If I change that line instead to:
endpoint.Path = endpoint.Path + u.Path
The URL Path is correct, and my function deploys fine. (Note: I realize that's probably not the right go solution here, just my experiment.) Looking back in commit history, I see the following comment from the PR that last changed this line, noting that the path would be different on Windows:
https://github.com/openfaas/faas-cli/commit/f0f57335e6d435f44f36675fb0df43931e2f5969#r38508984
I believe that is the root cause of this issue, and that some functions in the latest version of the CLI could be broken on Windows (unless there's something else environmental on my machine causing this behavior). Running through git bash
, as I've seen recommended, does not change this behavior (I wouldn't expect it to, but just wanted to check).
EDIT: since I see this change is relatively recent, I tried going back one version to faas-cli.exe
version 0.12.2. In that version, deploy commands work correctly on my environment.
@LucasRoesler it seems like join() from filepath was used instead of path was used in the following PR and caused unexpected behaviour on Windows (only):
https://github.com/openfaas/faas-cli/commit/f0f57335e6d435f44f36675fb0df43931e2f5969#r38508984
Would you be able to take a look please? If you need a Windows VM, they can be run via Vagrant, on AWS, or via VirtualBox.
If changing to path.Join still works on Linux/Mac, then we could ask @alanisaac to test the patch if you don't have time to create a VM.
@alanisaac thanks for spending the time to look into this in detail
/set title: Regression with path building on Windows
Please note -- there's a lot to my setup, and I have no idea where the actual issue lies. But after hours searching for various issues among
faas-cli
,faas-netes
,k3s
, andmultipass
, I haven't been able to find anything useful, so I thought I'd start at the top of the stack.Expected Behaviour
I'm trying to deploy a simple
hello-world
python function throughfaas-cli
, and I'd expect the function to be deployed.While my setup has a number of layers, I'm trying my best to follow the simple
hello-world
versions of all of them (how to run k3s on multipass, how to run openfaas on k8s, etc.).Current Behaviour
I'm running OpenFaaS on k3s through a multipass VM on top of Windows. When I navigate to the OpenFaaS UI at
http://<vm-ip>:31112/ui/
, the page loads just fine.However, using the CLI I see the following:
I get the same message for most function-based commands pointed at that gateway, such as
faas-cli list
. However,faas-cli login
works just fine:Here are the services in the
openfaas
namespace in k3s:I deployed OpenFaaS through Helm, steps to walk through my setup are below.
Steps to Reproduce (for bugs)
http://<vm.ip>:31112/
. Note that the UI loads fine.faas-cli
Context
I'm trying to put together a 'quick start' for OpenFaaS that I can run in a local Windows environment through multipass.
Your Environment
faas-cli version
):docker version
): From my local system:Server: Docker Engine - Community Engine: Version: 19.03.8 API version: 1.40 (minimum version 1.12) Go version: go1.12.17 Git commit: afacb8b Built: Wed Mar 11 01:29:16 2020 OS/Arch: linux/amd64 Experimental: false containerd: Version: v1.2.13 GitCommit: 7ad184331fa3e55e52b890ea95e65ba581ae3429 runc: Version: 1.0.0-rc10 GitCommit: dc9208a3303feef5b3839f4323d9beb36df0a9dd docker-init: Version: 0.18.0 GitCommit: fec3683
k3s version v1.17.4+k3s1 (3eee8ac3)
OS Name: Microsoft Windows 10 Enterprise OS Version: 10.0.18362 N/A Build 18362
Description: Ubuntu 18.04.4 LTS Release: 18.04 Codename: bionic