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

Commit 0935789

Browse files
committed
Merge branch 'fix-aws-ebs-swallowed-errors' into fix-storageos-swallowed-err
2 parents 6d95e2e + f010ee2 commit 0935789

3 files changed

Lines changed: 12 additions & 2 deletions

File tree

pkg/cloudprovider/providers/openstack/openstack_instances.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,12 @@ func (i *Instances) ExternalID(name types.NodeName) (string, error) {
110110
return srv.ID, nil
111111
}
112112

113+
// InstanceExistsByProviderID returns true if the instance with the given provider id still exists and is running.
114+
// If false is returned with no error, the instance will be immediately deleted by the cloud controller manager.
115+
func (i *Instances) InstanceExistsByProviderID(providerID string) (bool, error) {
116+
return false, errors.New("unimplemented")
117+
}
118+
113119
// InstanceID returns the kubelet's cloud provider ID.
114120
func (os *OpenStack) InstanceID() (string, error) {
115121
if len(os.localInstanceID) == 0 {

pkg/volume/cinder/attacher_test.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -650,6 +650,10 @@ func (instances *instances) InstanceTypeByProviderID(providerID string) (string,
650650
return "", errors.New("Not implemented")
651651
}
652652

653+
func (instances *instances) InstanceExistsByProviderID(providerID string) (bool, error) {
654+
return false, errors.New("unimplemented")
655+
}
656+
653657
func (instances *instances) List(filter string) ([]types.NodeName, error) {
654658
return []types.NodeName{}, errors.New("Not implemented")
655659
}

pkg/volume/cinder/cinder_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ func TestCanSupport(t *testing.T) {
3838
}
3939
defer os.RemoveAll(tmpDir)
4040
plugMgr := volume.VolumePluginMgr{}
41-
plugMgr.InitPlugins(ProbeVolumePlugins(), volumetest.NewFakeVolumeHost(tmpDir, nil, nil))
41+
plugMgr.InitPlugins(ProbeVolumePlugins(), nil /* prober */, volumetest.NewFakeVolumeHost(tmpDir, nil, nil))
4242

4343
plug, err := plugMgr.FindPluginByName("kubernetes.io/cinder")
4444
if err != nil {
@@ -134,7 +134,7 @@ func TestPlugin(t *testing.T) {
134134
}
135135
defer os.RemoveAll(tmpDir)
136136
plugMgr := volume.VolumePluginMgr{}
137-
plugMgr.InitPlugins(ProbeVolumePlugins(), volumetest.NewFakeVolumeHost(tmpDir, nil, nil))
137+
plugMgr.InitPlugins(ProbeVolumePlugins(), nil /* prober */, volumetest.NewFakeVolumeHost(tmpDir, nil, nil))
138138

139139
plug, err := plugMgr.FindPluginByName("kubernetes.io/cinder")
140140
if err != nil {

0 commit comments

Comments
 (0)