code: func (attacher *gcePersistentDiskAttacher) Attach(spec *volume.Spec, nodeName types.NodeName) (string, error) {
  	volumeSource, readOnly, err := getVolumeSource(spec)
  	if err != nil {
  		return "", err
  	}
  
  	pdName := volumeSource.PDName
  
  	attached, err := attacher.gceDisks.DiskIsAttached(pdName, nodeName)
  	if err != nil {
  		// Log error and continue with attach
  		klog.Errorf(
  			"Error checking if PD (%q) is already attached to current node (%q). Will continue and try attach anyway. err=%v",
  			pdName, nodeName, err)
  	}
  
  	if err == nil && attached {
  		// Volume is already attached to node.
  		klog.Infof("Attach operation is successful. PD %q is already attached to node %q.", pdName, nodeName)
  	} else {
  		if err := attacher.gceDisks.AttachDisk(pdName, nodeName, readOnly, isRegionalPD(spec)); err != nil {
  			klog.Errorf("Error attaching PD %q to node %q: %+v", pdName, nodeName, err)
  			return "", err
  		}
  	}
  
  	return filepath.Join(diskByIDPath, diskGooglePrefix+pdName), nil
  }
docs: // Attach checks with the GCE cloud provider if the specified volume is already
  // attached to the node with the specified Name.
  // If the volume is attached, it succeeds (returns nil).
  // If it is not, Attach issues a call to the GCE cloud provider to attach it.
  // Callers are responsible for retrying on failure.
  // Callers are responsible for thread safety between concurrent attach and
  // detach operations.