Remove comments

Signed-off-by: Dimitris Karakasilis <dimitris@karakasilis.me>
This commit is contained in:
Dimitris Karakasilis 2023-09-28 17:34:52 +03:00
parent b68b07f278
commit a2d4df589b
No known key found for this signature in database
GPG Key ID: 286DCAFD2C97DDE3

View File

@ -265,33 +265,6 @@ func NewUpgradeSpec(cfg *Config) (*v1.UpgradeSpec, error) {
State: installState,
}
// source := viper.GetString("upgradeSource")
// recoveryUpgrade := viper.GetBool("upgradeRecovery")
// if source != "" {
// imgSource, err := v1.NewSrcFromURI(source)
// // TODO: Don't hide the error here!
// if err == nil {
// if recoveryUpgrade {
// spec.RecoveryUpgrade = recoveryUpgrade
// spec.Recovery.Source = imgSource
// } else {
// spec.Active.Source = imgSource
// }
// size, err := GetSourceSize(cfg, imgSource)
// if err != nil {
// cfg.Logger.Warnf("Failed to infer size for images: %s", err.Error())
// } else {
// cfg.Logger.Infof("Setting image size to %dMb", size)
// // On upgrade only the active or recovery will be upgraded, so we dont need to override passive
// if recoveryUpgrade {
// spec.Recovery.Size = uint(size)
// } else {
// spec.Active.Size = uint(size)
// }
// }
// }
//}
return spec, nil
}