Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
k3s
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jacklull
k3s
Commits
8ffc3615
Commit
8ffc3615
authored
Aug 02, 2017
by
Jing Xu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
AttachDisk should not call detach inside of Cinder volume provider
This PR fixes #50038 which removes the detach call inside of AttachDisk.
parent
2c624e59
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
5 deletions
+3
-5
openstack_volumes.go
pkg/cloudprovider/providers/openstack/openstack_volumes.go
+3
-5
No files found.
pkg/cloudprovider/providers/openstack/openstack_volumes.go
View file @
8ffc3615
...
@@ -230,11 +230,9 @@ func (os *OpenStack) AttachDisk(instanceID, volumeID string) (string, error) {
...
@@ -230,11 +230,9 @@ func (os *OpenStack) AttachDisk(instanceID, volumeID string) (string, error) {
glog
.
V
(
4
)
.
Infof
(
"Disk %s is already attached to instance %s"
,
volumeID
,
instanceID
)
glog
.
V
(
4
)
.
Infof
(
"Disk %s is already attached to instance %s"
,
volumeID
,
instanceID
)
return
volume
.
ID
,
nil
return
volume
.
ID
,
nil
}
}
glog
.
V
(
2
)
.
Infof
(
"Disk %s is attached to a different instance (%s), detaching"
,
volumeID
,
volume
.
AttachedServerId
)
errmsg
:=
fmt
.
Sprintf
(
"Disk %s is attached to a different instance (%s)"
,
volumeID
,
volume
.
AttachedServerId
)
err
=
os
.
DetachDisk
(
volume
.
AttachedServerId
,
volumeID
)
glog
.
V
(
2
)
.
Infof
(
errmsg
)
if
err
!=
nil
{
return
""
,
errors
.
New
(
errmsg
)
return
""
,
err
}
}
}
startTime
:=
time
.
Now
()
startTime
:=
time
.
Now
()
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment