mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-11 13:02:14 +00:00
Merge pull request #49707 from jianglingxia/jlx72717
Automatic merge from submit-queue (batch tested with PRs 49651, 49707, 49662, 47019, 49747) remove the redundant err define **What this PR does / why we need it**: some place has define err ,like class, err := volutil.GetClassForVolume(d.plugin.host.GetKubeClient(), d.spec) so delete the err define! **Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes # **Special notes for your reviewer**: **Release note**: ```release-note NONE ```
This commit is contained in:
commit
2e519c73ff
@ -542,13 +542,12 @@ func (plugin *glusterfsPlugin) collectGids(className string, gidTable *MinMaxAll
|
||||
// - Adapt the range of the table to the current range of the SC.
|
||||
//
|
||||
func (plugin *glusterfsPlugin) getGidTable(className string, min int, max int) (*MinMaxAllocator, error) {
|
||||
var err error
|
||||
plugin.gidTableLock.Lock()
|
||||
gidTable, ok := plugin.gidTable[className]
|
||||
plugin.gidTableLock.Unlock()
|
||||
|
||||
if ok {
|
||||
err = gidTable.SetRange(min, max)
|
||||
err := gidTable.SetRange(min, max)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@ -607,7 +606,6 @@ func (d *glusterfsVolumeDeleter) getGid() (int, bool, error) {
|
||||
}
|
||||
|
||||
func (d *glusterfsVolumeDeleter) Delete() error {
|
||||
var err error
|
||||
glog.V(2).Infof("glusterfs: delete volume: %s ", d.glusterfsMounter.path)
|
||||
volumeName := d.glusterfsMounter.path
|
||||
volumeID := dstrings.TrimPrefix(volumeName, volPrefix)
|
||||
@ -681,7 +679,6 @@ func (p *glusterfsVolumeProvisioner) Provision() (*v1.PersistentVolume, error) {
|
||||
return nil, fmt.Errorf("invalid AccessModes %v: only AccessModes %v are supported", p.options.PVC.Spec.AccessModes, p.plugin.GetAccessModes())
|
||||
}
|
||||
|
||||
var err error
|
||||
if p.options.PVC.Spec.Selector != nil {
|
||||
glog.V(4).Infof("glusterfs: not able to parse your claim Selector")
|
||||
return nil, fmt.Errorf("glusterfs: not able to parse your claim Selector")
|
||||
@ -921,7 +918,6 @@ func getClusterNodes(cli *gcli.Client, cluster string) (dynamicHostIps []string,
|
||||
func parseClassParameters(params map[string]string, kubeClient clientset.Interface) (*provisionerConfig, error) {
|
||||
var cfg provisionerConfig
|
||||
var err error
|
||||
|
||||
cfg.gidMin = defaultGidMin
|
||||
cfg.gidMax = defaultGidMax
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user