Coder Social home page Coder Social logo

Comments (7)

Madhan-SWE avatar Madhan-SWE commented on July 25, 2024

Exploring the node plugin.
The NodeStage volume method is called by kublet.
Need to analyse why it is not passing wwn id.

from ibm-powervs-block-csi-driver.

Madhan-SWE avatar Madhan-SWE commented on July 25, 2024

/assign

from ibm-powervs-block-csi-driver.

Madhan-SWE avatar Madhan-SWE commented on July 25, 2024

WWN Key value is empty in req.PublishContext:

I1207 05:04:52.856589       1 node.go:90] NodeStageVolume: called with args {VolumeId:f22eba03-4b9f-4dd2-9d37-d57aa563c39f PublishContext:map[wwn:] StagingTargetPath:/var/lib/kubelet/plugins/kubernetes.io/csi/pv/pvc-9ca714b7-50d5-483c-8685-e9063fca28ac/globalmount VolumeCapability:mount:<fs_type:"xfs" > access_mode:<mode:SINGLE_NODE_WRITER >  Secrets:map[] VolumeContext:map[storage.kubernetes.io/csiProvisionerIdentity:1638852069180-8081-powervs.csi.ibm.com] XXX_NoUnkeyedLiteral:{} XXX_unrecognized:[] XXX_sizecache:0}
I1207 05:04:52.856697       1 node.go:134] NodeStageVolume: wwnkey: wwn, req.PublishContext: map[wwn:]

from ibm-powervs-block-csi-driver.

Madhan-SWE avatar Madhan-SWE commented on July 25, 2024

Volume details from IBM Cloud returning empty string for wwn sometimes and taking time to return the actual wwn.
Adding a temporary wait loop in controllerPublishVolume solves the issue.

         for i:=0;i<10;i++{
               disk, err := d.cloud.GetDiskByID(volumeID)
               klog.V(5).Infof("ControllerPublishVolume: disk details/%s : %+v", volumeID, disk)
               if err != nil {
                     if err == cloud.ErrNotFound {
                             return nil, status.Error(codes.NotFound, "Volume not found")
                     }
                     return nil, status.Errorf(codes.Internal, "Could not get volume with ID %q: %v", volumeID, err)
              }
              
              if disk.WWN == ""{
                 klog.V(5).Infof("ControllerPublishVolume: WWN is empty SLEEP 5s")
                  time.Sleep(5 * time.Second)
              }else{
                  break
              }
         }
 
         disk, err := d.cloud.GetDiskByID(volumeID)
        klog.V(5).Infof("ControllerPublishVolume: disk details/%s : %+v", volumeID, disk)

Need to add a standard wait loop utility method and use it in controller.

from ibm-powervs-block-csi-driver.

mkumatag avatar mkumatag commented on July 25, 2024

Need to add a standard wait loop utility method and use it in controller.

There is a standard wait function present in the k8s here - https://github.com/kubernetes/apimachinery/blob/5f072755815add51938b52f806c555ed8c86a1ce/pkg/util/wait/wait.go#L511, my fav one is PollImmediate, you can use one of them.

from ibm-powervs-block-csi-driver.

mkumatag avatar mkumatag commented on July 25, 2024

and also we need to understand when this happening and see if we can create an issue with PowerVS team for this one.

from ibm-powervs-block-csi-driver.

Madhan-SWE avatar Madhan-SWE commented on July 25, 2024

Wait loop for disk creation is currently not implemented in the cloud library.
The following justifies: #38

from ibm-powervs-block-csi-driver.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.