Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using cortex inside a docker #1325

Closed
javithe7 opened this issue Sep 3, 2020 · 5 comments · Fixed by #1370
Closed

Using cortex inside a docker #1325

javithe7 opened this issue Sep 3, 2020 · 5 comments · Fixed by #1370
Assignees
Labels
bug Something isn't working
Milestone

Comments

@javithe7
Copy link

javithe7 commented Sep 3, 2020

Hi everyone
We have installed cortex into an alpine docker using RUN bash -c "$(curl -sS https://raw.githubusercontent.com/cortexlabs/cortex/0.18/get-cli.sh)"and its installed well, but when we try to connect to our pre-existing cluster using "cortex cluster info --config my_cluster.yaml -env aws" it gives this error:

foqum-read-cortex-api_1  | fetching cluster status ...
foqum-read-cortex-api_1  | 
foqum-read-cortex-api_1  | panic: runtime error: invalid memory address or nil pointer dereference [recovered]
foqum-read-cortex-api_1  |      panic: runtime error: invalid memory address or nil pointer dereference
foqum-read-cortex-api_1  | [signal SIGSEGV: segmentation violation code=0x1 addr=0x8 pc=0x13793f2]
foqum-read-cortex-api_1  | 
foqum-read-cortex-api_1  | goroutine 1 [running]:
foqum-read-cortex-api_1  | github.com/cortexlabs/cortex/pkg/lib/exit.Panic(0x299c940, 0xc000845b40, 0x0, 0x0, 0x0)
foqum-read-cortex-api_1  |      /home/circleci/project/pkg/lib/exit/exit.go:60 +0x1c0
foqum-read-cortex-api_1  | github.com/cortexlabs/cortex/pkg/lib/exit.RecoverAndExit(0x0, 0x0, 0x0)
foqum-read-cortex-api_1  |      /home/circleci/project/pkg/lib/exit/exit.go:66 +0x9d
foqum-read-cortex-api_1  | panic(0x21a2080, 0x3d3e440)
foqum-read-cortex-api_1  |      /usr/local/go/src/runtime/panic.go:969 +0x166
foqum-read-cortex-api_1  | github.com/cortexlabs/cortex/pkg/types/clusterconfig.(*Config).UserTable(0xc00036c390, 0x0, 0x0, 0x0)
foqum-read-cortex-api_1  |      /home/circleci/project/pkg/types/clusterconfig/clusterconfig.go:1032 +0xe2
foqum-read-cortex-api_1  | github.com/cortexlabs/cortex/pkg/types/clusterconfig.(*InternalConfig).UserTable(0xc00036c390, 0x0, 0x0, 0x0)
foqum-read-cortex-api_1  |      /home/circleci/project/pkg/types/clusterconfig/clusterconfig.go:1020 +0xc9
foqum-read-cortex-api_1  | github.com/cortexlabs/cortex/cli/cmd.printInfoClusterConfig(0xc00036c380)
foqum-read-cortex-api_1  |      /home/circleci/project/cli/cmd/cluster.go:501 +0xc6
foqum-read-cortex-api_1  | github.com/cortexlabs/cortex/cli/cmd.printInfoOperatorResponse(0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
foqum-read-cortex-api_1  |      /home/circleci/project/cli/cmd/cluster.go:491 +0x220
foqum-read-cortex-api_1  | github.com/cortexlabs/cortex/cli/cmd.cmdInfo(0xc0005659a0, 0x14, 0xc00030fe00, 0x28, 0xc00055e040, 0x14, 0xc00030fe30, 0x28, 0xc00009c140, 0xc00055e000)
foqum-read-cortex-api_1  |      /home/circleci/project/cli/cmd/cluster.go:441 +0x415
foqum-read-cortex-api_1  | github.com/cortexlabs/cortex/cli/cmd.glob..func3(0x3d558e0, 0xc00011d100, 0x0, 0x4)
foqum-read-cortex-api_1  |      /home/circleci/project/cli/cmd/cluster.go:272 +0x1df
foqum-read-cortex-api_1  | github.com/spf13/cobra.(*Command).execute(0x3d558e0, 0xc00011d080, 0x4, 0x4, 0x3d558e0, 0xc00011d080)
foqum-read-cortex-api_1  |      /home/circleci/go/pkg/mod/github.com/spf13/cobra@v1.0.0/command.go:846 +0x29d
foqum-read-cortex-api_1  | github.com/spf13/cobra.(*Command).ExecuteC(0x3d56600, 0xc00069ff40, 0x1, 0x1)
foqum-read-cortex-api_1  |      /home/circleci/go/pkg/mod/github.com/spf13/cobra@v1.0.0/command.go:950 +0x349
foqum-read-cortex-api_1  | github.com/spf13/cobra.(*Command).Execute(...)
foqum-read-cortex-api_1  |      /home/circleci/go/pkg/mod/github.com/spf13/cobra@v1.0.0/command.go:887
foqum-read-cortex-api_1  | github.com/cortexlabs/cortex/cli/cmd.Execute()
foqum-read-cortex-api_1  |      /home/circleci/project/cli/cmd/root.go:152 +0x300
foqum-read-cortex-api_1  | main.main()
foqum-read-cortex-api_1  |      /home/circleci/project/cli/main.go:24 +0x20 

We have solved this error by mapping our host /root/.cortex to the /root/.cortex of our docker, inside the docker-compose file.
The thing is, we don't want to have to need to do that mapping . We want to know why after installing the cortex cli using the command mentioned at the beginning of this text, the .cortex folder is not created directly within our docker root folder.
To sum up, when we install the cortex client, the .cortex folder is not created

Thanks for advance

@javithe7 javithe7 added the question Further information is requested label Sep 3, 2020
@deliahu
Copy link
Member

deliahu commented Sep 3, 2020

@javithe7 I will see if I can reproduce this, thank you for creating the issue.

In the meantime, one thing you can try (although I have not tried this so I don't know for sure that it will work), is that you can run cortex env configure if you have access to all of the necessary information. You can either let it prompt you for the information it needs, or you can pass it in as flags, e.g.

cortex env configure aws --provider aws --operator-endpoint <> --aws-access-key-id <> --aws-secret-access-key <>

@deliahu
Copy link
Member

deliahu commented Sep 4, 2020

@javithe7 I was not able to reproduce the error, do you mind replying with my_cluster.yaml (with any sensitive information hidden), a minimal version of your Dockerfile that will reproduce the error, the command that you are using to run your Docker image, and anything else that might be helpful as I try to reproduce it? Also, how many clusters are running on your AWS account when you run the cortex cluster info command?

@deliahu
Copy link
Member

deliahu commented Sep 15, 2020

@javithe7 I just wanted to follow up on this; were you able to resolve your issue?

@deliahu
Copy link
Member

deliahu commented Sep 17, 2020

@javithe7 We think we've identified the cause of this issue, and are working on fixing it in time for our next release

@deliahu deliahu added bug Something isn't working v0.20 and removed question Further information is requested labels Sep 17, 2020
@deliahu deliahu self-assigned this Sep 17, 2020
@deliahu
Copy link
Member

deliahu commented Sep 30, 2020

This has now been released in v0.20

@deliahu deliahu added this to the v0.20 milestone Nov 26, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants