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

sriov-network-config-daemon deployment failed with error: "failed to load kubelet kubeconfig: open /host/etc/kubernetes/kubeconfig: no such file or directory" #48

Closed
vtlrazin opened this issue Jan 18, 2021 · 1 comment · Fixed by #62
Labels
bug Something isn't working

Comments

@vtlrazin
Copy link

vtlrazin commented Jan 18, 2021

Deployment operator failed on sriov-network-config-daemon deployment stage with error:

failed to load kubelet kubeconfig: open /host/etc/kubernetes/kubeconfig: no such file or directory

Setup info:

OS - Ubuntu 18.04
Vanilla K8s - 1.17.5
SRIOV operator - github master

K8s cluster pods:

# kubectl -n sriov-network-operator get pod -o wide
NAME                                      READY   STATUS             RESTARTS   AGE     IP                NODE    NOMINATED NODE   READINESS GATES
sriov-network-config-daemon-5n9rv         0/1     CrashLoopBackOff   6          9m10s   192.168.222.102   node3   <none>           <none>
sriov-network-config-daemon-twvsm         0/1     CrashLoopBackOff   6          9m10s   192.168.222.103   node4   <none>           <none>
sriov-network-operator-56cb9ccd4d-wljvs   1/1     Running            0          9m27s   10.233.90.9       node1   <none>           <none>

Error log:

# kubectl -n sriov-network-operator describe pod sriov-network-config-daemon-twvsm
...
Events:
  Type     Reason     Age               From               Message
  ----     ------     ----              ----               -------
  Normal   Scheduled  82s               default-scheduler  Successfully assigned sriov-network-operator/sriov-network-config-daemon-twvsm to node4
  Normal   Pulling    81s               kubelet, node4     Pulling image "quay.io/openshift/origin-sriov-network-config-daemon@sha256:49a69724cd04d0264e8be94ce12893b1e4ecaf091bf4eaea02879c0e559aabf0"
  Normal   Pulled     49s               kubelet, node4     Successfully pulled image "quay.io/openshift/origin-sriov-network-config-daemon@sha256:49a69724cd04d0264e8be94ce12893b1e4ecaf091bf4eaea02879c0e559aabf0"
  Normal   Created    7s (x4 over 48s)  kubelet, node4     Created container sriov-network-config-daemon
  Normal   Started    7s (x4 over 48s)  kubelet, node4     Started container sriov-network-config-daemon
  Normal   Pulled     7s (x3 over 47s)  kubelet, node4     Container image "quay.io/openshift/origin-sriov-network-config-daemon@sha256:49a69724cd04d0264e8be94ce12893b1e4ecaf091bf4eaea02879c0e559aabf0" already present on machine
  Warning  BackOff    6s (x5 over 46s)  kubelet, node4     Back-off restarting failed container


root@node1:/# kubectl -n sriov-network-operator logs sriov-network-config-daemon-twvsm
E0118 10:48:39.313586    3286 start.go:92] failed to load kubelet kubeconfig: open /host/etc/kubernetes/kubeconfig: no such file or directory
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x40 pc=0x1d6d05a]

goroutine 1 [running]:
main.runStartCmd(0x2ee4640, 0x2f97a08, 0x0, 0x0)
	/go/src/github.com/k8snetworkplumbingwg/sriov-network-operator/cmd/sriov-network-config-daemon/start.go:94 +0xdda
github.com/spf13/cobra.(*Command).execute(0x2ee4640, 0x2f97a08, 0x0, 0x0, 0x2ee4640, 0x2f97a08)
	/go/src/github.com/k8snetworkplumbingwg/sriov-network-operator/vendor/github.com/spf13/cobra/command.go:846 +0x2c2
github.com/spf13/cobra.(*Command).ExecuteC(0x2ee43a0, 0xc000831f78, 0xbb27e5, 0xc0000c0058)
	/go/src/github.com/k8snetworkplumbingwg/sriov-network-operator/vendor/github.com/spf13/cobra/command.go:950 +0x375
github.com/spf13/cobra.(*Command).Execute(...)
	/go/src/github.com/k8snetworkplumbingwg/sriov-network-operator/vendor/github.com/spf13/cobra/command.go:887
main.main()
	/go/src/github.com/k8snetworkplumbingwg/sriov-network-operator/cmd/sriov-network-config-daemon/main.go:27 +0x31
@zshi-redhat
Copy link
Collaborator

The path (/host/etc/kubernetes/kubeconfig) only exists on openshift, looks like you're using openshift images on k8s environment.
Try build the image with Dockerfile.sriov-network-config-daemon and replace the config daemon image.

moshe010 added a commit to moshe010/sriov-network-operator that referenced this issue Jan 27, 2021
PR 51 try to fix it by adding the CLUSTER_TYPE=kubernetes in Makefile
which is wrong. The CLUSTER_TYPE=kubernetes should be exposed in the
sriov-operator and sriov-network-config-daemon Pods so that they will
behave according to the cluster type

This commit fix it by removing the CLUSTER_TYPE=kubernetes from the Makefile
and add it to sriov-operator and .sriov-network-config-daemon Dockerfile.

Fixes: k8snetworkplumbingwg#48
moshe010 added a commit to moshe010/sriov-network-operator that referenced this issue Jan 27, 2021
PR 51 try to fix it by adding the CLUSTER_TYPE=kubernetes in Makefile
which is wrong. The CLUSTER_TYPE=kubernetes should be exposed in the
sriov-operator and sriov-network-config-daemon Pods so that they will
behave according to the cluster type

This commit fix it by removing the CLUSTER_TYPE=kubernetes from the Makefile
and add it to sriov-operator and .sriov-network-config-daemon Dockerfile.

Fixes: k8snetworkplumbingwg#48
Signed-off-by: Moshe Levi <[email protected]>
moshe010 added a commit to moshe010/sriov-network-operator that referenced this issue Jan 28, 2021
PR 51 try to fix it by adding the CLUSTER_TYPE=kubernetes in Makefile
which is wrong. The CLUSTER_TYPE=kubernetes should be exposed in the
sriov-operator and sriov-network-config-daemon Pods so that they will
behave according to the cluster type

This commit fix it by removing the CLUSTER_TYPE=kubernetes from the Makefile
and add it to sriov-operator and .sriov-network-config-daemon Dockerfile.

Fixes: k8snetworkplumbingwg#48
Signed-off-by: Moshe Levi <[email protected]>
@adrianchiris adrianchiris added the bug Something isn't working label Jan 28, 2021
rollandf added a commit to rollandf/sriov-network-operator that referenced this issue Feb 2, 2025
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
3 participants