Skip to content
This repository was archived by the owner on Mar 22, 2018. It is now read-only.

Commit ccbe7f7

Browse files
author
mtanino
committed
WaitForAttach refactoring for iSCSI attacher/detacher
This change is prerequisite for implementing iSCSI attacher and detacher. In order to use chap authentication at iSCSI plugin after implementing attacher and detacher, secret is needed at AttachDisk() which is called from WaitForAttach(). To obtain secret, pod information is required, but WaitForAttach() doesn't pass pod information inside. This patch adds 'pod' as an argument of WaitForAttach() and adds changes to drivers who implements WaitForAttach(). Fixes #48953
1 parent cc34681 commit ccbe7f7

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

pkg/volume/cinder/attacher.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ import (
2424
"time"
2525

2626
"github.com/golang/glog"
27+
"k8s.io/api/core/v1"
2728
"k8s.io/apimachinery/pkg/types"
2829
"k8s.io/apimachinery/pkg/util/wait"
2930
"k8s.io/kubernetes/pkg/cloudprovider"
@@ -220,7 +221,7 @@ func (attacher *cinderDiskAttacher) VolumesAreAttached(specs []*volume.Spec, nod
220221
return volumesAttachedCheck, nil
221222
}
222223

223-
func (attacher *cinderDiskAttacher) WaitForAttach(spec *volume.Spec, devicePath string, timeout time.Duration) (string, error) {
224+
func (attacher *cinderDiskAttacher) WaitForAttach(spec *volume.Spec, devicePath string, _ *v1.Pod, timeout time.Duration) (string, error) {
224225
// NOTE: devicePath is is path as reported by Cinder, which may be incorrect and should not be used. See Issue #33128
225226
volumeSource, _, err := getVolumeSource(spec)
226227
if err != nil {

0 commit comments

Comments
 (0)