kubecost / features-bugs

A public repository for filing of Kubecost feature requests and bugs. Please read the issue guidelines before filing an issue here.
0 stars 0 forks source link

[Bug] MountVolume.SetUp failed for volume "pv-cost-analyzer" : mount failed: exit status 32... and MountVolume.SetUp failed for volume "pv-prometheus" : mount failed: exit status 32... #70

Closed Govardhan17 closed 3 weeks ago

Govardhan17 commented 6 months ago

Kubecost Helm Chart Version

1.108.0

Kubernetes Version

1.28

Kubernetes Platform

EKS

Description

While mounting the volume to cost analyzer and prometheus pod I'm facing MountVolume.SetUp failed for volume "pv-cost-analyzer" : mount failed: exit status 32... and MountVolume.SetUp failed for volume "pv-prometheus" : mount failed: exit status 32...

MountVolume.SetUp failed for volume "pv-cost-analyzer" : mount failed: exit status 32 Mounting command: mount Mounting arguments: -t nfs :/kubecost/cost-analyzer/ /var/lib/kubelet/pods/6fb3a188-13d2-40de-bebb-e0c10e7e9f3a/volumes/kubernetes.io~nfs/pv-cost-analyzer Output: mount.nfs: Connection timed out MountVolume.SetUp failed for volume "pv-prometheus" : mount failed: exit status 32 Mounting command: mount Mounting arguments: -t nfs :/kubecost/prometheus/ /var/lib/kubelet/pods/ff42ce42-8b07-436a-9f2b-985bd9fc6410/volumes/kubernetes.io~nfs/pv-prometheus Output: mount.nfs: Connection timed out

Steps to reproduce

  1. Installed the helm chart version 1.108.0
  2. created a pv and pvc for both cost analyzer and prometheus pods to use and map it using values files

    Define the PVC manifest

    pvc_manifest = {
        "apiVersion": "v1",
        "kind": "PersistentVolumeClaim",
        "metadata": {"name": "kubecost-cost-analyzer", "namespace": "kubecost"},
        "spec": {
            "storageClassName": "efs-sc",
            "accessModes": ["ReadWriteMany"],
            "resources": {"requests": {"storage": "32Gi"}}
        }
    }
    
    # Define the PV manifest
    pv_manifest = {
            "apiVersion": "v1",
            "kind": "PersistentVolume",
            "metadata": {"name": "pv-cost-analyzer"},
            "spec": {
                "storageClassName": "efs-sc",
                "capacity": {"storage": "32Gi"},
                "accessModes": ["ReadWriteMany"],
                "nfs": {
                    "server": <efs-id>“,
                    "path": "/kubecost/cost-analyzer/"
                },
                "claimRef": {
                    "name": "kubecost-cost-analyzer",
                    "namespace": "kubecost"
                }
            }
        }
    
    pvc = eks.KubernetesManifest(
        self, "PVCManifest-CA",
        cluster=self.cluster,  # Replace 'my_cluster' with your EKS cluster object
        manifest=[pvc_manifest]
    )
    
    # Create a Kubernetes manifest to deploy the PV only if it doesn't exist
    pv = eks.KubernetesManifest(
        self, "PVManifest-CA",
        cluster=self.cluster,  # Replace 'my_cluster' with your EKS cluster object
        manifest=[pv_manifest]
    )
    
    prometheus_pvc_manifest = {
        "apiVersion": "v1",
        "kind": "PersistentVolumeClaim",
        "metadata": {"name": "kubecost-prometheus-server", "namespace": "kubecost"},
        "spec": {
            "storageClassName": "efs-sc",
            "accessModes": ["ReadWriteMany"],
            "resources": {"requests": {"storage": "32Gi"}}
        }
    }
    
    # Define the PV manifest
    prometheus_pv_manifest = {
            "apiVersion": "v1",
            "kind": "PersistentVolume",
            "metadata": {"name": "pv-prometheus"},
            "spec": {
                "storageClassName": "efs-sc",
                "capacity": {"storage": "32Gi"},
                "accessModes": ["ReadWriteMany"],
                "nfs": {
                    "server": “<efs-id>”,
                    "path": "/kubecost/prometheus/"
                },
                "claimRef": {
                    "name": "kubecost-prometheus-server",
                    "namespace": "kubecost"
                }
            }
        }
    prometheus_pvc = eks.KubernetesManifest(
        self, "PVCManifest-Prometheus",
        cluster=self.cluster,  # Replace 'my_cluster' with your EKS cluster object
        manifest=[prometheus_pvc_manifest]
    )
    
    # Create a Kubernetes manifest to deploy the PV only if it doesn't exist
    prometheus_pv = eks.KubernetesManifest(
        self, "PVManifest-Prometheus",
        cluster=self.cluster,  # Replace 'my_cluster' with your EKS cluster object
        manifest=[prometheus_pv_manifest]
    )

persistentVolume: enabled: true StorageClass: efs-sc existingClaim: kubecost-cost-analyzer

prometheus: server: persistentVolume: enabled: true existingClaim: kubecost-prometheus-server

Expected behavior

Expected the volumes to be mounted to the pod

Impact

No response

Screenshots

No response

Logs

MountVolume.SetUp failed for volume "pv-cost-analyzer" : mount failed: exit status 32 Mounting command: mount Mounting arguments: -t nfs <efs-id>:/kubecost/cost-analyzer/ /var/lib/kubelet/pods/6fb3a188-13d2-40de-bebb-e0c10e7e9f3a/volumes/kubernetes.io~nfs/pv-cost-analyzer Output: mount.nfs: Connection timed out
MountVolume.SetUp failed for volume "pv-prometheus" : mount failed: exit status 32 Mounting command: mount Mounting arguments: -t nfs <efs-id>:/kubecost/prometheus/ /var/lib/kubelet/pods/ff42ce42-8b07-436a-9f2b-985bd9fc6410/volumes/kubernetes.io~nfs/pv-prometheus Output: mount.nfs: Connection timed out

Slack discussion

No response

Troubleshooting

chipzoller commented 6 months ago

Does not appear to be an issue with the Helm chart. Transferred to the correct repository.

Can this be reproduced on Kubecost 2.x?

chipzoller commented 3 weeks ago

Hello, in an effort to consolidate our bug and feature request tracking, we are deprecating using GitHub to track tickets. If this issue is still outstanding and you have not done so already, please raise a request at https://support.kubecost.com/.