daemon: Dump systemctl status rpm-ostreed on load failure
This is yet another patch which should help debugging
like situations in the future.
I also have
cooking but it's going to take a while to cycle down.
@@ -214,6 +214,12 @@ func New(
if hostos.IsCoreOSVariant() {
osImageURL, osVersion, err = nodeUpdaterClient.GetBootedOSImageURL()
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 nil, fmt.Errorf("error reading osImageURL from rpm-ostree: %v", err)
}
glog.Infof("Booted osImageURL: %s (%s)", osImageURL, osVersion)
