Skip to content

Commit

Permalink
Fix regression
Browse files Browse the repository at this point in the history
Signed-off-by: Andrea Mazzotti <andrea.mazzotti@suse.com>
  • Loading branch information
anmazzotti committed Feb 29, 2024
1 parent 935cbcd commit b9a3b61
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions pkg/action/upgrade-recovery.go
Original file line number Diff line number Diff line change
Expand Up @@ -131,15 +131,8 @@ func (u *UpgradeRecoveryAction) upgradeInstallStateYaml() error {
u.spec.State.Partitions[constants.RecoveryPartName] = recoveryPart
}

// Hack to ensure we are not using / or /.snapshots mountpoints. Btrfs based deployments
// mount state partition into multiple locations
statePath := filepath.Join(u.spec.Partitions.State.MountPoint, constants.InstallStateFile)
if u.spec.Partitions.State.MountPoint == "/" || u.spec.Partitions.State.MountPoint == "/.snapshots" {
statePath = filepath.Join(constants.RunningStateDir, constants.InstallStateFile)
}

return u.cfg.WriteInstallState(
u.spec.State, statePath,
u.spec.State, filepath.Join(u.spec.Partitions.State.MountPoint, constants.InstallStateFile),
filepath.Join(u.spec.Partitions.Recovery.MountPoint, constants.InstallStateFile),
)
}
Expand Down

0 comments on commit b9a3b61

Please sign in to comment.