Skip to content

Commit

Permalink
update v4 metadata to return network stats despite missing stats for …
Browse files Browse the repository at this point in the history
…single container (aws#2719)
  • Loading branch information
fierlion authored and fenxiong committed Nov 30, 2020
1 parent 0166ed9 commit 04c281d
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions agent/handlers/v4/task_metadata_handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,12 +65,7 @@ func TaskMetadataHandler(state dockerstate.TaskEngineState, ecsClient api.ECSCli
for _, containerResponse := range taskResponse.Containers {
networks, err := GetContainerNetworkMetadata(containerResponse.ID, state)
if err != nil {
errResponseJSON, err := json.Marshal(err.Error())
if e := utils.WriteResponseIfMarshalError(w, err); e != nil {
return
}
utils.WriteJSONToResponse(w, http.StatusInternalServerError, errResponseJSON, utils.RequestTypeContainerMetadata)
return
seelog.Warnf("Error retrieving network metadata for container %s - %s", containerResponse.ID, err)
}
containerResponse.Networks = networks
responses = append(responses, containerResponse)
Expand Down

0 comments on commit 04c281d

Please sign in to comment.