Skip to content

Commit

Permalink
Fix: stale env config (#825)
Browse files Browse the repository at this point in the history
* fix: do not read env config from exited containers
  • Loading branch information
yyuuttaaoo authored May 4, 2023
1 parent b0e659c commit 126497d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,6 @@ your changes, such as:

## Example

- [public] [both] [updated] add a new feature
- [public] [both] [fix] do not read env config from exited containers

## [Unreleased]
2 changes: 1 addition & 1 deletion helper/envconfig/aliyun_log_config_define.go
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ var dockerEnvConfigInfoList = []*helper.DockerInfoDetail{}

// dockerInfoEnvConfigProcessFunc process all docker info, get all config spec list
func dockerInfoEnvConfigProcessFunc(dockerInfo *helper.DockerInfoDetail) {
if len(dockerInfo.EnvConfigInfoMap) > 0 {
if dockerInfo.Status() == helper.ContainerStatusRunning && len(dockerInfo.EnvConfigInfoMap) > 0 {
dockerEnvConfigInfoList = append(dockerEnvConfigInfoList, dockerInfo)
}
}
Expand Down

0 comments on commit 126497d

Please sign in to comment.