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

MountVolume.SetUp failed for volume "podlogs" of a deployment in vCluster #1745

Open
akusingh-tibco opened this issue May 7, 2024 · 0 comments

Comments

@akusingh-tibco
Copy link

What happened?

I created a new vCluster and deployed a deployment but the pod goes in container creating state with the below error:
Warning FailedMount 22s (x11 over 6m34s) kubelet MountVolume.SetUp failed for volume "plogs" : hostPath type check failed: /tmp/vcluster/v-cluster-only-ic-sync/testt/log/pods is not a directory

I tried changing the type of volume to DirectoryOrCreate, the pod came up in running state but in the fluentbit container no logs are visible, following are the error logs of fluentbit-container:
[2024/05/06 12:51:09] [error] [input:tail:tail.0] read error, check permissions: /var/log/pods/dgdr-6868bbb7-hrxlz_fb217ac7-d1ff-47f7-9af7-abb76a8c707f/*.log [2024/05/06 12:51:09] [ warn] [input:tail:tail.0] error scanning path: /var/log/pods/dgdr-6868bbb7-hrxlz_fb217ac7-d1ff-47f7-9af7-abb76a8c707f/*.log

What did you expect to happen?

Ideally the deployment should create the pod and i should see the logs in the fluent bit container, Also i wanted to know how this path is getting created "/tmp/vcluster/v-cluster-only-ic-sync/testt/log/pods" in vCluster as in my deployment volume is as below
volumes: - name: podlogs hostPath: path: /var/log/pods type: Directory

How can we reproduce it (as minimally and precisely as possible)?

Deploy a K8s Deployment with fluentbit as a side car container which has volumeMounts
volumeMounts: - name: podlogs mountPath: /var/log/pods
and deployment has the volume
volumes: - name: podlogs hostPath: path: /var/log/pods type: Directory
Ideally this deployment should get deployed and we should be able to see logs in the fluentbit side car container

Anything else we need to know?

No response

Host cluster Kubernetes version

$ kubectl version
Client Version: v1.28.8-eks-ae9a62a
Kustomize Version: v5.0.4-0.20230601165947-6ce0bf390ce3
Server Version: v1.28.4

Host cluster Kubernetes distribution

Client Version: v1.28.8-eks-ae9a62a
Kustomize Version: v5.0.4-0.20230601165947-6ce0bf390ce3
Server Version: v1.28.4

vlcuster version

$ vcluster --version
vcluster version 0.20.0-beta.1

Vcluster Kubernetes distribution(k3s(default)), k8s, k0s)

k3s

OS and Arch

OS: Mac
Arch: Intel AMD
@akusingh-tibco akusingh-tibco changed the title MountVolume.SetUp failed for volume "plogs" of a deployment in vCluster MountVolume.SetUp failed for volume "podlogs" of a deployment in vCluster May 7, 2024
@deniseschannon deniseschannon added the bug label May 8, 2024 — with Linear
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants