Skip to content

Commit

Permalink
update.go: only set BFQ scheduler for masters
Browse files Browse the repository at this point in the history
In #2243
we made it so that we switch to BFQ during updates, but unintentially
made it also apply to workers. This does not work on RHEL7 since it
breaks on both trying to set the scheduler as well as finding the root
device.

Change the behaviour back to master only, which also implies that only
CoreOS variants will do this.

Signed-off-by: Yu Qi Zhang <jerzhang@redhat.com>
  • Loading branch information
yuqi-zhang authored and openshift-cherrypick-robot committed Jan 11, 2021
1 parent eab9c35 commit 65170e0
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions pkg/daemon/update.go
Original file line number Diff line number Diff line change
Expand Up @@ -330,9 +330,17 @@ func (dn *Daemon) applyOSChanges(oldConfig, newConfig *mcfgv1.MachineConfig) (re
if mcDiff.osUpdate || mcDiff.extensions || mcDiff.kernelType {
// When we're going to apply an OS update, switch the block
// scheduler to BFQ to apply more fairness between etcd
// and the OS update.
if err := setRootDeviceSchedulerBFQ(); err != nil {
return err
// and the OS update. Only do this on masters since etcd
// only operates on masters, and RHEL compute nodes can't
// do this.
// Add nil check since firstboot also goes through this path,
// which doesn't have a node object yet.
if dn.node != nil {
if _, isControlPlane := dn.node.Labels[ctrlcommon.MasterLabel]; isControlPlane {
if err := setRootDeviceSchedulerBFQ(); err != nil {
return err
}
}
}
// We emitted this event before, so keep it
if dn.recorder != nil {
Expand Down

0 comments on commit 65170e0

Please sign in to comment.