Skip to content

Commit

Permalink
discovery/lxd: Filter out stopped containers
Browse files Browse the repository at this point in the history
  • Loading branch information
jtopjian committed Apr 16, 2017
1 parent 10f60bc commit 4414864
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/discovery/lxd.go
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,11 @@ func lxdFetch(cfg config.DiscoveryConfig) (*[]core.Backend, error) {
backends := []core.Backend{}

for _, container := range containers {
/* Ignore containers that aren't running */
if container.Status != "Running" {
continue
}

containerConfig := container.Config
if v, ok := containerConfig[labelKey]; ok {
labelValue := v
Expand Down

0 comments on commit 4414864

Please sign in to comment.