修复首次安装完成后未启用分区配置管理
This commit is contained in:
1 parent
e29d9480ab
commit
8b6b4ea6dd
4 files changed
+88
-1
No files matched your search
@@ -149,6 +149,10 @@ func PlanLegacyMigration(root string, _ RuntimeValidationOptions) (LegacyMigrati
|
||||
return plan, nil
|
||||
}
|
||||
func MigrateLegacyConfig(root string, options RuntimeValidationOptions) (LegacyMigrationResult, error) {
|
||||
return migrateLegacyConfig(root, options, false)
|
||||
}
|
||||
|
||||
func migrateLegacyConfig(root string, options RuntimeValidationOptions, completeSetup bool) (LegacyMigrationResult, error) {
|
||||
plan, err := PlanLegacyMigration(root, options)
|
||||
if err != nil {
|
||||
return LegacyMigrationResult{}, err
|
||||
@@ -168,6 +172,10 @@ func MigrateLegacyConfig(root string, options RuntimeValidationOptions) (LegacyM
|
||||
if err := json.Unmarshal(legacyData, &legacy); err != nil {
|
||||
return LegacyMigrationResult{}, err
|
||||
}
|
||||
if completeSetup {
|
||||
legacy.SetupState = SetupStateReady
|
||||
legacy.IsInit = true
|
||||
}
|
||||
runtime, manualFields, err := legacyRuntimeConfig(root, legacy)
|
||||
if err != nil {
|
||||
return LegacyMigrationResult{}, err
|
||||
|
||||
Reference in new issue
Block a user