Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
2
229660230
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Summer2022
229660230
Commits
837f40a3
Commit
837f40a3
authored
2 years ago
by
ioito
Browse files
Options
Downloads
Patches
Plain Diff
fix(region): aliyun disk external id
parent
fce049d2
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
pkg/compute/guestdrivers/managedvirtual.go
+3
-4
3 additions, 4 deletions
pkg/compute/guestdrivers/managedvirtual.go
with
3 additions
and
4 deletions
pkg/compute/guestdrivers/managedvirtual.go
+
3
−
4
View file @
837f40a3
...
...
@@ -994,11 +994,10 @@ func (self *SManagedVirtualizedGuestDriver) OnGuestDeployTaskDataReceived(ctx co
disks
,
_
:=
guest
.
GetGuestDisks
()
if
len
(
disks
)
!=
len
(
diskInfo
)
{
msg
:=
fmt
.
Sprintf
(
"inconsistent disk number: guest have %d disks, data contains %d disks"
,
len
(
disks
),
len
(
diskInfo
))
log
.
Errorf
(
msg
)
return
fmt
.
Errorf
(
msg
)
// 公有云镜像可能包含数据盘, 若忽略设置磁盘的external id, 会导致部分磁盘状态异常
log
.
Warningf
(
"inconsistent disk number: guest have %d disks, data contains %d disks"
,
len
(
disks
),
len
(
diskInfo
))
}
for
i
:=
0
;
i
<
len
(
diskInfo
);
i
+=
1
{
for
i
:=
0
;
i
<
len
(
diskInfo
)
&&
i
<
len
(
disks
)
;
i
+=
1
{
disk
:=
disks
[
i
]
.
GetDisk
()
_
,
err
=
db
.
Update
(
disk
,
func
()
error
{
disk
.
DiskSize
=
diskInfo
[
i
]
.
Size
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment