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

[WARNING FileExisting-crictl]: crictl not found in system path #613

Closed
KeithTt opened this issue Dec 25, 2017 · 22 comments · Fixed by kubernetes/kubernetes#58883
Closed
Assignees
Labels
Milestone

Comments

@KeithTt
Copy link

KeithTt commented Dec 25, 2017

kube version: 1.9.0

How to resolve this pre-flight check, what does this warning mean?

@luxas
Copy link
Member

luxas commented Dec 25, 2017

It's just a warning, not an error. You should be able to proceed just fine without it.
If you want to get rid of the warning, just install https://github.com/kubernetes-incubator/cri-tools/tree/master/cmd/crictl

Thank you and have a good day!

@luxas luxas closed this as completed Dec 25, 2017
@KeithTt
Copy link
Author

KeithTt commented Dec 25, 2017

@luxas Thanks a lot!

@xenophenes
Copy link

I've installed it, both through the "go get" method and by placing it directly in my PATH. The warning is still coming up. Is there some reason why it wouldn't be finding it?

@timothysc
Copy link
Member

I'll add a breadcrumb to the warning.

@timothysc
Copy link
Member

go get github.com/kubernetes-incubator/cri-tools/cmd/crictl resolves

@timothysc
Copy link
Member

@chuckha

@RandyAbernethy
Copy link

RandyAbernethy commented Jan 11, 2018

If kubeadm wants this cli tool it should install it if not present rather than warning. I suspect a very scarce minority of users will have crictl pre-installed!!

@errordeveloper
Copy link
Member

errordeveloper commented Jan 22, 2018

Do we ship crictl in the official deb/rpm packages?

@timothysc
Copy link
Member

@errordeveloper nope, but we could.

@timothysc timothysc added this to the v1.10 milestone Jan 26, 2018
k8s-github-robot pushed a commit to kubernetes/kubernetes that referenced this issue Jan 26, 2018
Automatic merge from submit-queue (batch tested with PRs 57500, 58840, 58883). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Adds breadcrumb to crictl warning

Signed-off-by: Chuck Ha <ha.chuck@gmail.com>



**What this PR does / why we need it**:
This PR adds a breadcrumb to a `kubeadm` preflight check.

**Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*:
Fixes kubernetes/kubeadm#613

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
@brentpearson
Copy link

brentpearson commented Feb 2, 2018

Why is nothing mentioned about this in https://kubernetes.io/docs/setup/independent/install-kubeadm??

Should include something along the lines of what I had to do:
Install this go thing so you can build this other thing that kubeadm needs:

yum install go

Update it because nothing ever works without requiring more googling, so of course the version installed is too old:

rpm --import https://mirror.go-repo.io/centos/RPM-GPG-KEY-GO-REPO
curl -s https://mirror.go-repo.io/centos/go-repo.repo | tee /etc/yum.repos.d/go-repo.repo
vi /etc/yum.repos.d/go-repo.repo

Replace "$releasever" with "7" and "$basearch" with "x86_64", because, duh, those vars aren't gonna exist.

yum update golang

Build the thing:

go get github.com/kubernetes-incubator/cri-tools/cmd/crictl

Now try kubeadm init and deal with the other undocumented errors.

@crankbird
Copy link

likewise on Ubuntu 16.4 .. the helpful suggestion of using "go get ..." was there, but that required an

sudo apt-get install golang-go

then you run the go-get command, and then it errors out because GOPATH isnt set, which I fixed, but then it complained because I used a relative path, which I fixed, but then it complained because

package context: unrecognized import path "context" (import path does not begin with hostname)

which turns out is because the latest version of golang that you can install using apt-get is 1.6, and the context fix is in 1.7 and above .. which requires a complete purge and reinstall using the friendly instructions here . which is nice even though they got the environment variable settings wrong .. (sigh) .. then I realise that 1.7 is really quite ancient, so I go back to the official instructions here .. though I'm still glad I have the wget instructions for downloading the tarball from the first helpful location .. which I modified to this

wget https://storage.googleapis.com/golang/go1.10.1.linux-amd64.tar.gz

just in case anyone else stumbles on this ...

I know this sounds like I'm whingeing (because I am which is because I'm a little annoyed) .. but I thought it was worth pointing out that its not as simple as just adding in an instruction to run

go get github.com/kubernetes-incubator/cri-tools/cmd/crictl

and believe that it will resolve the issue easily ... this kind of stuff probably shouldn't be pushed to the end users.

@heyi-arm
Copy link

heyi-arm commented May 8, 2018

Provide what I met with this warning:

kubeadm version: &version.Info{Major:"1", Minor:"10", GitVersion:"v1.10.2", GitCommit:"81753b10df112992bf51bbc2c2f85208aad78335", GitTreeState:"clean", BuildDate:"2018-04-27T09:10:24Z", GoVersion:"go1.9.3", Compiler:"gc", Platform:"linux/amd64"}

  1. --ignore-preflight-errors cannot mitigate this warning, I tried varies formats:
    --ignore-preflight-errors="cri" or --ignore-preflight-errors=cri or
    --ignore-preflight-errors "cri" or --ignore-preflight-errors cri

  2. install the package cannot mitigate this warning either

    go get github.com/kubernetes-incubator/cri-tools/cmd/crictl

    will install the binary in $HOME/go/bin, and I added it into $PATH
    and I installed the binary both as normal user and root (so it appears in both home directories).
    still kubeadm reports warning and cannot find it.

@kad
Copy link
Member

kad commented May 8, 2018

@heyi-arm --ignore-preflight-errors will convert error to warning, but warnings will still be shown.

@mrlesmithjr
Copy link

Just chiming in here as well as I just ran into this when trying to provision a multi-master setup using Ansible.

TASK [ansible-k8s : join_cluster | Joining Additional Nodes To K8s Cluster] ******************************************************************************************************
fatal: [node1]: FAILED! => {"changed": true, "cmd": ["kubeadm", "join", "--token", "8gsm4e.uv0bve5j7ec2i0qk", "--discovery-token-unsafe-skip-ca-verification", "--ignore-preflight-errors", "192.168.250.10:6443"], "delta": "0:00:00.176311", "end": "2018-05-10 19:57:28.117885", "msg": "non-zero return code", "rc": 2, "start": "2018-05-10 19:57:27.941574", "stderr": "\t[WARNING FileExisting-crictl]: crictl not found in system path\nSuggestion: go get github.com/kubernetes-incubator/cri-tools/cmd/crictl\n[preflight] Some fatal errors occurred:\n\t[ERROR FileAvailable--etc-kubernetes-pki-ca.crt]: /etc/kubernetes/pki/ca.crt already exists\n[preflight] If you know what you are doing, you can make a check non-fatal with `--ignore-preflight-errors=...`", "stderr_lines": ["\t[WARNING FileExisting-crictl]: crictl not found in system path", "Suggestion: go get github.com/kubernetes-incubator/cri-tools/cmd/crictl", "[preflight] Some fatal errors occurred:", "\t[ERROR FileAvailable--etc-kubernetes-pki-ca.crt]: /etc/kubernetes/pki/ca.crt already exists", "[preflight] If you know what you are doing, you can make a check non-fatal with `--ignore-preflight-errors=...`"], "stdout": "[preflight] Running pre-flight checks.", "stdout_lines": ["[preflight] Running pre-flight checks."]}
fatal: [node2]: FAILED! => {"changed": true, "cmd": ["kubeadm", "join", "--token", "8gsm4e.uv0bve5j7ec2i0qk", "--discovery-token-unsafe-skip-ca-verification", "--ignore-preflight-errors", "192.168.250.10:6443"], "delta": "0:00:00.183138", "end": "2018-05-10 19:57:28.171885", "msg": "non-zero return code", "rc": 2, "start": "2018-05-10 19:57:27.988747", "stderr": "\t[WARNING FileExisting-crictl]: crictl not found in system path\nSuggestion: go get github.com/kubernetes-incubator/cri-tools/cmd/crictl\n[preflight] Some fatal errors occurred:\n\t[ERROR FileAvailable--etc-kubernetes-pki-ca.crt]: /etc/kubernetes/pki/ca.crt already exists\n[preflight] If you know what you are doing, you can make a check non-fatal with `--ignore-preflight-errors=...`", "stderr_lines": ["\t[WARNING FileExisting-crictl]: crictl not found in system path", "Suggestion: go get github.com/kubernetes-incubator/cri-tools/cmd/crictl", "[preflight] Some fatal errors occurred:", "\t[ERROR FileAvailable--etc-kubernetes-pki-ca.crt]: /etc/kubernetes/pki/ca.crt already exists", "[preflight] If you know what you are doing, you can make a check non-fatal with `--ignore-preflight-errors=...`"], "stdout": "[preflight] Running pre-flight checks.", "stdout_lines": ["[preflight] Running pre-flight checks."]}

@kad
Copy link
Member

kad commented May 11, 2018

@mrlesmithjr you have another issue, unrelated: [ERROR FileAvailable--etc-kubernetes-pki-ca.crt]: /etc/kubernetes/pki/ca.crt already exists. Please check your ansible playbook, and open new issue with details, if needed.

@mrlesmithjr
Copy link

That is where I copied from the master the PKI folder. Still trying to sort all of it out. But will definitely do.

@chuckha
Copy link

chuckha commented May 11, 2018

This is great feedback. I'll bring it up in sig-cluster-lifecycle. This should absolutely be ignorable at the very least.

@Petrox
Copy link

Petrox commented Jun 3, 2018

And it should be .deb distributed if kubeadm depends on it. If not then it's just some optional utility - that should be packaged still.

@Routhinator
Copy link

If this is going to be required for install, then it needs to be shipped with the packages. Go build tools do not belong on production container hosts.

@bart0sh
Copy link

bart0sh commented Jun 13, 2018

In my opinion it shouldn't be required unless user wants to use CRI instead of docker. It can be done either explicitly by introducing new command line option (--use-cri ?) or implicitly like in this PR when user specifies CRI socket using --cri-socket option.

@ghost
Copy link

ghost commented Jul 15, 2018

@luxas for me this presents as an error. Is this a bug? If yes, then it should be fixed quickly, because as illustrated above, installing crictl isn't so easy on some configurations (and requires go build tools on the production host).

@bart0sh
Copy link

bart0sh commented Jul 16, 2018

I think this should be fixed by this PR

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

Successfully merging a pull request may close this issue.