diff --git a/docs/release-notes.md b/docs/release-notes.md index 342fb1aa3..0dffd97a7 100644 --- a/docs/release-notes.md +++ b/docs/release-notes.md @@ -35,6 +35,7 @@ nav_order: 9 - Fix network race when phoning home on Equinix Metal - Fix Akamai Ignition base64 decoding on padded payloads - Fix Makefile GOARCH for loongarch64 ([#1942](https://github.com/coreos/ignition/pull/1942)) +- Don't log to journal if not available ## Ignition 2.19.0 (2024-06-05) diff --git a/internal/exec/engine.go b/internal/exec/engine.go index 7e400d29c..11e699cc5 100644 --- a/internal/exec/engine.go +++ b/internal/exec/engine.go @@ -179,7 +179,7 @@ func (e *Engine) acquireConfig(stageName string) (cfg types.Config, err error) { cfg, err = e.acquireProviderConfig() // if we've successfully fetched and cached the configs, log about them - if err == nil { + if err == nil && journal.Enabled() { for _, cfgInfo := range e.State.FetchedConfigs { if logerr := logStructuredJournalEntry(cfgInfo); logerr != nil { e.Logger.Info("failed to log systemd journal entry: %v", logerr)