kubeflow / kfctl

kfctl is a CLI for deploying and managing Kubeflow
Apache License 2.0
181 stars 137 forks source link

kfctl v1.1 darwin binary is failed #447

Closed kuzm1ch closed 4 years ago

kuzm1ch commented 4 years ago

OS: macOS Cataline 10.15.17 kfctl version: kfctl v1.1.0-0-g9a3621e

Error:

kfctl exited with error: failed to build kfApp from URI kfctl_aws.yaml: couldn't generate KfApp: (kubeflow.error): Code 500 with message: coordinator Generate failed for aws: (kubeflow.error): Code 400 with message: Could not authenticate aws client: InvalidEndpointURL: invalid endpoint uri
caused by: parse "https://sts.eu-central-1\t.amazonaws.com/": net/url: invalid control character in URL, Please make sure you set up AWS credentials and region

In the same time, Linux binary is working as expected. The root may be related to "\t" in AWS URL.

Jeffwan commented 4 years ago

/cc @PatrickXYS

PatrickXYS commented 4 years ago

@kuzm1ch There's no difference between Linux / macOS in kfctl code.

The only difference is

CGO_ENABLED=0 GOOS=darwin GOARCH=amd64 ${GO} build -gcflags '-N -l' -ldflags "-X main.VERSION=${TAG}" -o bin/darwin/kfctl cmd/kfctl/main.go
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 ${GO} build -gcflags '-N -l' -ldflags "-X main.VERSION=$(TAG)" -o bin/linux/kfctl cmd/kfctl/main.go
CGO_ENABLED=0 GOOS=linux GOARCH=arm64 ${GO} build -gcflags '-N -l' -ldflags "-X main.VERSION=$(TAG)" -o bin/arm64/kfctl cmd/kfctl/main.go

It's weird that linux binary works but macOS failed, I'm still guessing it's AWS credential configuration issue. Can you confirm that linux and macOS are running in the same environment by using env to check the env variable diff.

kuzm1ch commented 4 years ago

I've lost quite a lot of time to find the root cause(hope this reply will help somebody else). @PatrickXYS you're right, it was AWS credential configuration issue.

~ vim ~/.aws/config
region = eu-central-1<tab>

:syntax on
:set syntax=whitespace

it was a tricky tab in the config file, but aws cli works without any issues. Anyway, eu-central-1\t this error message should point me into the right direction.