Uploaded image for project: 'OpenShift Bugs'
  1. OpenShift Bugs
  2. OCPBUGS-59146

[OCP 4.16] smb shares doesn't reconnect automatically if IP of the server changes (maintaining dns resolution)

XMLWordPrintable

    • Quality / Stability / Reliability
    • False
    • Hide

      None

      Show
      None
    • None
    • None
    • None
    • None
    • None
    • Ready to Pick
    • 1
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      Description of problem:

      SMB CSI PV statically created were working fine until the ip of the server was changed while maintaining the hostname and its resolution:
      ```
      2025-06-13T07:26:10.664226842Z I0613 07:26:10.664173       1 utils.go:76] GRPC call: /csi.v1.Node/NodeUnpublishVolume
      2025-06-13T07:26:10.669171436Z I0613 07:26:10.664193       1 utils.go:77] GRPC request: {"target_path":"/var/lib/kubelet/pods/f1702a64-021f-430e-a6c0-80419ca4a7b9/volumes/kubernetes.io~csi/smb-data-mfsshared-volume-08ab0f/mount","volume_id":"smb-data-mfsshared-volume-08ab0f"}
      2025-06-13T07:26:10.669178448Z I0613 07:26:10.669170       1 nodeserver.go:101] NodeUnpublishVolume: unmounting volume smb-data-mfsshared-volume-08ab0f on /var/lib/kubelet/pods/f1702a64-021f-430e-a6c0-80419ca4a7b9/volumes/kubernetes.io~csi/smb-data-mfsshared-volume-08ab0f/mount
      2025-06-13T07:26:10.670967804Z I0613 07:26:10.670955       1 mount_helper_common.go:93] unmounting "/var/lib/kubelet/pods/f1702a64-021f-430e-a6c0-80419ca4a7b9/volumes/kubernetes.io~csi/smb-data-mfsshared-volume-08ab0f/mount" (corruptedMount: false, mounterCanSkipMountPointChecks: true)
      2025-06-13T07:26:10.671410333Z I0613 07:26:10.671403       1 mount_linux.go:362] Unmounting /var/lib/kubelet/pods/f1702a64-021f-430e-a6c0-80419ca4a7b9/volumes/kubernetes.io~csi/smb-data-mfsshared-volume-08ab0f/mount
      2025-06-13T07:26:10.683423494Z I0613 07:26:10.683409       1 mount_helper_common.go:150] Warning: deleting path "/var/lib/kubelet/pods/f1702a64-021f-430e-a6c0-80419ca4a7b9/volumes/kubernetes.io~csi/smb-data-mfsshared-volume-08ab0f/mount"
      2025-06-13T07:26:10.683701013Z I0613 07:26:10.683693       1 nodeserver.go:106] NodeUnpublishVolume: unmount volume smb-data-mfsshared-volume-08ab0f on /var/lib/kubelet/pods/f1702a64-021f-430e-a6c0-80419ca4a7b9/volumes/kubernetes.io~csi/smb-data-mfsshared-volume-08ab0f/mount successfully
      2025-06-13T07:26:10.683715118Z I0613 07:26:10.683699       1 utils.go:83] GRPC response: {}
      2025-07-05T07:12:01.719814030Z E0705 07:12:01.716658       1 utils.go:81] GRPC error: rpc error: code = Internal desc = failed to stat file /var/lib/kubelet/pods/ffd70dca-408f-4938-9c78-b8767313dade/volumes/kubernetes.io~csi/smb-data-mfsshared-volume-08ab0f/mount: lstat /var/lib/kubelet/pods/ffd70dca-408f-4938-9c78-b8767313dade/volumes/kubernetes.io~csi/smb-data-mfsshared-volume-08ab0f/mount: host is down
      2025-07-05T07:13:52.306602004Z E0705 07:13:52.306545       1 utils.go:81] GRPC error: rpc error: code = Internal desc = failed to stat file /var/lib/kubelet/pods/ffd70dca-408f-4938-9c78-b8767313dade/volumes/kubernetes.io~csi/smb-data-mfsshared-volume-08ab0f/mount: lstat /var/lib/kubelet/pods/ffd70dca-408f-4938-9c78-b8767313dade/volumes/kubernetes.io~csi/smb-data-mfsshared-volume-08ab0f/mount: host is down
      ```

      Version-Release number of selected component (if applicable):

      Openshift 4.16.38

      How reproducible:

      N/A (not tested on a reproducer)

      Steps to Reproduce:

          1. Setup environment for SMB/CSI to work
          2. Change IP of the SMB server but maintain dns resolution
          3.
          

      Actual results:

      The PVs need to be remounted (deleting the pod)

      Expected results:

      Ideally the change should be transparent as all the references are with the dns hostname and smb should support automatic reconnection with dns resolution at kernel level

      Additional info:

      PV example:
      ```
      spec:
        accessModes:
        - ReadWriteMany
        capacity:
          storage: 1Mi
        claimRef:
          apiVersion: v1
          kind: PersistentVolumeClaim
          name: xxxxx
          namespace: xxxxx
          resourceVersion: "81089758"
          uid: 1ea3fa80-9bf2-44f7-b754-364905e5f119
        csi:
          driver: smb.csi.k8s.io
          nodeStageSecretRef:
            name: xxxxx
            namespace: xxxx
          volumeAttributes:
            source: //xxxx/xxxx/xxxx/xxxx/xxxx/xxxx/xxxx/xxxx
          volumeHandle: xxxx-c50fc8
        mountOptions:
        - dir_mode=0775
        - file_mode=0664
        - vers=3.0
        - rw
        persistentVolumeReclaimPolicy: Retain
        volumeMode: Filesystem
      status:
        phase: Bound
       ```
      
      How mounts are reflected on the host:
      ```
      $ mount
      ...
      //xxxx/xxxx/xxxx/xxxx/xxxx/xxxx/xxxx on /var/lib/kubelet/plugins/kubernetes.io/csi/smb.csi.k8s.io/xxxx/xxxx type cifs (rw,relatime,vers=3.0,cache=strict,username=xxxx,uid=0,noforceuid,gid=100xxxxxx,noforcegid,addr=10.xx.xx.xx,file_mode=0664,dir_mode=0775,soft,nounix,serverino,mapposix,rsize=65536,wsize=65536,bsize=1048576,echo_interval=60,actimeo=1,closetimeo=1)
      ```

       

       

       

              Unassigned Unassigned
              rhn-support-mabajodu Mario Abajo Duran
              None
              None
              Penghao Wang Penghao Wang
              None
              Votes:
              0 Vote for this issue
              Watchers:
              10 Start watching this issue

                Created:
                Updated: