Skip to content

Commit

Permalink
Make iotedge check respect journald as valid log rotation setting. (#…
Browse files Browse the repository at this point in the history
…6734)

This PR will make iotedge check respect docker's journald logdriver as a valid log rotation setting.

See issue #6728

## Azure IoT Edge PR checklist:
  • Loading branch information
mtrensch authored Oct 31, 2022
1 parent f9b8799 commit d796a36
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,10 @@ impl ContainerEngineLogrotate {
.context(MESSAGE)?;
self.daemon_config = Some(daemon_config.clone());

if daemon_config.log_driver.is_none() {
return Ok(CheckResult::Warning(anyhow!(MESSAGE)));
match daemon_config.log_driver.as_deref() {
Some("journald") => return Ok(CheckResult::Ok),
None => return Ok(CheckResult::Warning(anyhow!(MESSAGE))),
_ => (),
}

if let Some(log_opts) = &daemon_config.log_opts {
Expand Down

0 comments on commit d796a36

Please sign in to comment.