Skip to content

Commit

Permalink
Bug 1907333: daemon: Revert code to remove rollback
Browse files Browse the repository at this point in the history
See https://bugzilla.redhat.com/1907333

Doing this when the MCD lands on a node the first time means
we compete for I/O with lots of other containers, and on
slow systems that can cause a timeout.  Then a further
problem is that we were fatally erroring out in the MCD
rather than retrying.

But we don't have control loop in the MCD today outside of
trying to apply an update; let's defer this until we add one.
  • Loading branch information
cgwalters committed Dec 14, 2020
1 parent d6b5d19 commit 25a7812
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 18 deletions.
4 changes: 0 additions & 4 deletions pkg/daemon/daemon.go
Original file line number Diff line number Diff line change
Expand Up @@ -1029,10 +1029,6 @@ func (dn *Daemon) checkStateOnFirstRun() error {
return fmt.Errorf("error detecting previous SSH accesses: %v", err)
}

if err := dn.removeRollback(); err != nil {
return errors.Wrapf(err, "Failed to remove rollback")
}

// Bootstrapping state is when we have the node annotations file
if state.bootstrapping {
targetOSImageURL := state.currentConfig.Spec.OSImageURL
Expand Down
14 changes: 0 additions & 14 deletions pkg/daemon/update.go
Original file line number Diff line number Diff line change
Expand Up @@ -692,20 +692,6 @@ func (dn *Daemon) update(oldConfig, newConfig *mcfgv1.MachineConfig) (retErr err
return dn.performPostConfigChangeAction(actions, newConfig.GetName())
}

// removeRollback removes the rpm-ostree rollback deployment. It
// takes up space, and we don't generally expect administrators to
// use this versus e.g. removing broken configuration. We only
// remove the rollback once the MCD pod has landed on a node, so
// we know kubelet is working.
func (dn *Daemon) removeRollback() error {
if !dn.os.IsCoreOSVariant() {
// do not attempt to rollback on non-RHCOS/FCOS machines
return nil
}
_, err := runGetOut("rpm-ostree", "cleanup", "-r")
return err
}

// machineConfigDiff represents an ad-hoc difference between two MachineConfig objects.
// At some point this may change into holding just the files/units that changed
// and the MCO would just operate on that. For now we're just doing this to get
Expand Down

0 comments on commit 25a7812

Please sign in to comment.