Skip to content

Commit

Permalink
Merge pull request openshift#495 from cgwalters/no-rpm-ostree-on-classic
Browse files Browse the repository at this point in the history
daemon: Only print status if os == RHCOS
  • Loading branch information
openshift-merge-robot authored Feb 26, 2019
2 parents 875f25e + 023f810 commit 9133b43
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
6 changes: 0 additions & 6 deletions cmd/machine-config-daemon/start.go
Original file line number Diff line number Diff line change
Expand Up @@ -154,12 +154,6 @@ func runStartCmd(cmd *cobra.Command, args []string) {
}

if startOpts.onceFrom == "" {
status, err := dn.NodeUpdaterClient.GetStatus()
if err != nil {
glog.Fatalf("unable to get rpm-ostree status: %s", err)
}
glog.Info(status)

err = dn.CheckStateOnBoot()
if err != nil {
dn.EnterDegradedState(errors.Wrapf(err, "Checking initial state"))
Expand Down
9 changes: 9 additions & 0 deletions pkg/daemon/daemon.go
Original file line number Diff line number Diff line change
Expand Up @@ -560,6 +560,15 @@ func (dn *Daemon) getPendingConfig() (string, error) {
//
// Some more background in this PR: https://github.com/openshift/machine-config-operator/pull/245
func (dn *Daemon) CheckStateOnBoot() error {
// Print status if available
if dn.OperatingSystem == machineConfigDaemonOSRHCOS {
status, err := dn.NodeUpdaterClient.GetStatus()
if err != nil {
glog.Fatalf("unable to get rpm-ostree status: %s", err)
}
glog.Info(status)
}

pendingConfigName, err := dn.getPendingConfig()
if err != nil {
return err
Expand Down

0 comments on commit 9133b43

Please sign in to comment.