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
fd559ee1
Commit
fd559ee1
authored
Apr 28, 2018
by
Pengfei Ni
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix panic for attaching AzureDisk to vmss nodes
parent
24bc761a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
3 deletions
+9
-3
azure_controller_vmss.go
pkg/cloudprovider/providers/azure/azure_controller_vmss.go
+9
-3
No files found.
pkg/cloudprovider/providers/azure/azure_controller_vmss.go
View file @
fd559ee1
...
@@ -34,7 +34,10 @@ func (ss *scaleSet) AttachDisk(isManagedDisk bool, diskName, diskURI string, nod
...
@@ -34,7 +34,10 @@ func (ss *scaleSet) AttachDisk(isManagedDisk bool, diskName, diskURI string, nod
return
err
return
err
}
}
disks
:=
*
vm
.
StorageProfile
.
DataDisks
disks
:=
[]
compute
.
DataDisk
{}
if
vm
.
StorageProfile
!=
nil
&&
vm
.
StorageProfile
.
DataDisks
!=
nil
{
disks
=
*
vm
.
StorageProfile
.
DataDisks
}
if
isManagedDisk
{
if
isManagedDisk
{
disks
=
append
(
disks
,
disks
=
append
(
disks
,
compute
.
DataDisk
{
compute
.
DataDisk
{
...
@@ -95,7 +98,10 @@ func (ss *scaleSet) DetachDiskByName(diskName, diskURI string, nodeName types.No
...
@@ -95,7 +98,10 @@ func (ss *scaleSet) DetachDiskByName(diskName, diskURI string, nodeName types.No
return
err
return
err
}
}
disks
:=
*
vm
.
StorageProfile
.
DataDisks
disks
:=
[]
compute
.
DataDisk
{}
if
vm
.
StorageProfile
!=
nil
&&
vm
.
StorageProfile
.
DataDisks
!=
nil
{
disks
=
*
vm
.
StorageProfile
.
DataDisks
}
bFoundDisk
:=
false
bFoundDisk
:=
false
for
i
,
disk
:=
range
disks
{
for
i
,
disk
:=
range
disks
{
if
disk
.
Lun
!=
nil
&&
(
disk
.
Name
!=
nil
&&
diskName
!=
""
&&
*
disk
.
Name
==
diskName
)
||
if
disk
.
Lun
!=
nil
&&
(
disk
.
Name
!=
nil
&&
diskName
!=
""
&&
*
disk
.
Name
==
diskName
)
||
...
@@ -144,7 +150,7 @@ func (ss *scaleSet) GetDataDisks(nodeName types.NodeName) ([]compute.DataDisk, e
...
@@ -144,7 +150,7 @@ func (ss *scaleSet) GetDataDisks(nodeName types.NodeName) ([]compute.DataDisk, e
return
nil
,
err
return
nil
,
err
}
}
if
vm
.
StorageProfile
.
DataDisks
==
nil
{
if
vm
.
StorageProfile
==
nil
||
vm
.
StorageProfile
.
DataDisks
==
nil
{
return
nil
,
nil
return
nil
,
nil
}
}
...
...
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