mirror of
https://github.com/ceph/ceph-csi.git
synced 2024-11-26 08:10:20 +00:00
cleanup: address wasted assign issues
At places variable is reassigned without being used. Signed-off-by: Yati Padia <ypadia@redhat.com>
This commit is contained in:
parent
bfe64d4aee
commit
0f44c6acb7
@ -587,7 +587,7 @@ func validatePVCClone(totalCount int, sourcePvcPath, sourceAppPath, clonePvcPath
|
|||||||
wgErrs[n] = createPVCAndApp(name, f, &p, &a, deployTimeout)
|
wgErrs[n] = createPVCAndApp(name, f, &p, &a, deployTimeout)
|
||||||
if *pvc.Spec.VolumeMode == v1.PersistentVolumeFilesystem && wgErrs[n] == nil {
|
if *pvc.Spec.VolumeMode == v1.PersistentVolumeFilesystem && wgErrs[n] == nil {
|
||||||
filePath := a.Spec.Containers[0].VolumeMounts[0].MountPath + "/test"
|
filePath := a.Spec.Containers[0].VolumeMounts[0].MountPath + "/test"
|
||||||
checkSumClone := ""
|
var checkSumClone string
|
||||||
e2elog.Logf("Calculating checksum clone for filepath %s", filePath)
|
e2elog.Logf("Calculating checksum clone for filepath %s", filePath)
|
||||||
checkSumClone, chErrs[n] = calculateSHA512sum(f, &a, filePath, &opt)
|
checkSumClone, chErrs[n] = calculateSHA512sum(f, &a, filePath, &opt)
|
||||||
e2elog.Logf("checksum for clone is %s", checkSumClone)
|
e2elog.Logf("checksum for clone is %s", checkSumClone)
|
||||||
@ -779,7 +779,7 @@ func validatePVCSnapshot(totalCount int, pvcPath, appPath, snapshotPath, pvcClon
|
|||||||
wgErrs[n] = createPVCAndApp(name, f, &p, &a, deployTimeout)
|
wgErrs[n] = createPVCAndApp(name, f, &p, &a, deployTimeout)
|
||||||
if wgErrs[n] == nil {
|
if wgErrs[n] == nil {
|
||||||
filePath := a.Spec.Containers[0].VolumeMounts[0].MountPath + "/test"
|
filePath := a.Spec.Containers[0].VolumeMounts[0].MountPath + "/test"
|
||||||
checkSumClone := ""
|
var checkSumClone string
|
||||||
e2elog.Logf("calculating checksum clone for filepath %s", filePath)
|
e2elog.Logf("calculating checksum clone for filepath %s", filePath)
|
||||||
checkSumClone, chErrs[n] = calculateSHA512sum(f, &a, filePath, &opt)
|
checkSumClone, chErrs[n] = calculateSHA512sum(f, &a, filePath, &opt)
|
||||||
e2elog.Logf("checksum value for the clone is %s with pod name %s", checkSumClone, name)
|
e2elog.Logf("checksum value for the clone is %s with pod name %s", checkSumClone, name)
|
||||||
|
@ -794,7 +794,7 @@ func (cs *ControllerServer) CreateSnapshot(ctx context.Context, req *csi.CreateS
|
|||||||
}
|
}
|
||||||
}()
|
}()
|
||||||
|
|
||||||
ready := false
|
var ready bool
|
||||||
var vol = new(rbdVolume)
|
var vol = new(rbdVolume)
|
||||||
|
|
||||||
ready, vol, err = cs.doSnapshotClone(ctx, rbdVol, rbdSnap, cr)
|
ready, vol, err = cs.doSnapshotClone(ctx, rbdVol, rbdSnap, cr)
|
||||||
|
@ -168,7 +168,7 @@ func (vc *vaultConnection) initConnection(config map[string]interface{}) error {
|
|||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
if firstInit || !errors.Is(err, errConfigOptionMissing) {
|
if firstInit || !errors.Is(err, errConfigOptionMissing) {
|
||||||
vaultCAVerify := false
|
var vaultCAVerify bool
|
||||||
vaultCAVerify, err = strconv.ParseBool(verifyCA)
|
vaultCAVerify, err = strconv.ParseBool(verifyCA)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return fmt.Errorf("failed to parse 'vaultCAVerify': %w", err)
|
return fmt.Errorf("failed to parse 'vaultCAVerify': %w", err)
|
||||||
|
Loading…
Reference in New Issue
Block a user