Skip to content

Commit 1de3aa9

Browse files
committed
daemon: Dump systemctl status rpm-ostreed on load failure
This is yet another patch which should help debugging https://bugzilla.redhat.com/show_bug.cgi?id=1958812 like situations in the future. I also have coreos/rpm-ostree#2932 cooking but it's going to take a while to cycle down.
1 parent 98ab043 commit 1de3aa9

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

pkg/daemon/daemon.go

+6
Original file line numberDiff line numberDiff line change
@@ -214,6 +214,12 @@ func New(
214214
if hostos.IsCoreOSVariant() {
215215
osImageURL, osVersion, err = nodeUpdaterClient.GetBootedOSImageURL()
216216
if err != nil {
217+
// If this fails for some reason, let's dump the unit status
218+
// into our logs to aid future debugging.
219+
cmd := exec.Command("systemctl", "status", "rpm-ostreed")
220+
cmd.Stdout = os.Stdout
221+
cmd.Stderr = os.Stderr
222+
_ = cmd.Run()
217223
return nil, fmt.Errorf("error reading osImageURL from rpm-ostree: %v", err)
218224
}
219225
glog.Infof("Booted osImageURL: %s (%s)", osImageURL, osVersion)

0 commit comments

Comments
 (0)