From 0bcb4d205d7343436ffdc482f8ede73bc429552a Mon Sep 17 00:00:00 2001 From: Colin Walters Date: Thu, 7 Jul 2022 14:56:34 -0400 Subject: [PATCH] daemon: Drop workarounds for rpm-ostree bugs In 4.12 (master) we'll be shipping with at least RHEL8.6's rpm-ostree 2022.2 which ships the fixes for the two bugs we were hacking around here. --- pkg/daemon/rpm-ostree.go | 33 +-------------------------------- 1 file changed, 1 insertion(+), 32 deletions(-) diff --git a/pkg/daemon/rpm-ostree.go b/pkg/daemon/rpm-ostree.go index 023e1286c5..1c1d3b1305 100644 --- a/pkg/daemon/rpm-ostree.go +++ b/pkg/daemon/rpm-ostree.go @@ -100,38 +100,7 @@ func (r *RpmOstreeClient) loadStatus() (*rpmOstreeState, error) { } func (r *RpmOstreeClient) Initialize() error { - // This replicates https://github.com/coreos/rpm-ostree/pull/2945 - // and can be removed when we have a new enough rpm-ostree with - // that PR. - err := runCmdSync("systemctl", "start", "rpm-ostreed") - if err != nil { - // If this fails for some reason, let's dump the unit status - // into our logs to aid future debugging. - cmd := exec.Command("systemctl", "status", "rpm-ostreed") - cmd.Stdout = os.Stdout - cmd.Stderr = os.Stderr - _ = cmd.Run() - return err - } - - status, err := r.loadStatus() - if err != nil { - return err - } - - // If there's an active transaction when the MCD starts up, - // it's possible that we hit - // https://bugzilla.redhat.com/show_bug.cgi?id=1982389 - // This is fixed upstream, but we need a newer RHEL for that, - // so let's just restart the service as a workaround. - if status.Transaction != nil { - glog.Warningf("Detected active transaction during daemon startup, restarting to clear it") - err := runCmdSync("systemctl", "restart", "rpm-ostreed") - if err != nil { - return err - } - } - + // This used to have some workarounds for rpm-ostree bugs, but we no longer need those. return nil }