Skip to content

Commit

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

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

See issue Azure#6728

## Azure IoT Edge PR checklist:
  • Loading branch information
mtrensch authored and nlcamp committed Nov 1, 2022
1 parent c2b48c6 commit 5c0bdd3
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 5c0bdd3

Please sign in to comment.