Merge pull request #7425 from ioito/automated-cherry-pick-of-#7417-upstream-release-2.13

Automated cherry pick of #7417: fix: avoid lost backend params
This commit is contained in:
Zexi Li
2020-07-31 18:08:21 +08:00
committed by GitHub

View File

@@ -492,7 +492,9 @@ func (manager *SDiskManager) ValidateCreateData(ctx context.Context, userCred mc
input.Hypervisor,
)
} else {
diskConfig.Backend = api.STORAGE_LOCAL
if len(diskConfig.Backend) == 0 {
diskConfig.Backend = api.STORAGE_LOCAL
}
serverInput, err := ValidateScheduleCreateData(ctx, userCred, input.ToServerCreateInput(), input.Hypervisor)
if err != nil {
return nil, err