-
Notifications
You must be signed in to change notification settings - Fork 4.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixed docker diskio bug due to reseting of map. #5582
Conversation
Can one of the admins verify this patch? |
apiContainer.Stats.Read = time.Now() | ||
apiContainer.Container = containers | ||
apiContainer.Stats.BlkioStats.IOServicedRecursive = append(apiContainer.Stats.BlkioStats.IOServicedRecursive, metrics) | ||
dockerStats := make([]docker.Stat, 0) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can probably use "var dockerStats []docker.Stat" instead
apiContainer2.Stats.Read = time.Now() | ||
apiContainer2.Container = containers[1] | ||
apiContainer2.Stats.BlkioStats.IOServicedRecursive = append(apiContainer2.Stats.BlkioStats.IOServicedRecursive, metrics) | ||
dockerStats := make([]docker.Stat, 0) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can probably use "var dockerStats []docker.Stat" instead
apiContainer.Stats.Read = time.Now() | ||
apiContainer.Container = containers | ||
apiContainer.Stats.BlkioStats.IOServicedRecursive = append(apiContainer.Stats.BlkioStats.IOServicedRecursive, metrics) | ||
dockerStats := make([]docker.Stat, 0) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can probably use "var dockerStats []docker.Stat" instead
apiContainer2.Stats.Read = time.Now() | ||
apiContainer2.Container = containers[1] | ||
apiContainer2.Stats.BlkioStats.IOServicedRecursive = append(apiContainer2.Stats.BlkioStats.IOServicedRecursive, metrics) | ||
dockerStats := make([]docker.Stat, 0) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can probably use "var dockerStats []docker.Stat" instead
Not sure whats causing the failed test in travis-ci?
Might have just been an issue on the pipeline side having no networking temporarily? |
@kwojcicki The above issue was caused by a change in |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cloud you add a Changelog entry?
Also have a look at the houndci bot comments.
) | ||
|
||
var blkioService BLkioService | ||
var oldBlkioRaw = make([]BlkioRaw, 3) | ||
var newBlkioRaw = make([]BlkioRaw, 3) | ||
|
||
func TestDeltaMultipleContainers(t *testing.T) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for adding these tests
dockerStats = append(dockerStats, apiContainer1) | ||
dockerStats = append(dockerStats, apiContainer2) | ||
stats := blkioService.getBlkioStatsList(dockerStats) | ||
totals := make([]float64, 2, 2) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No need to specify a capacity because the capacity of the slice is equal to its length if unspecified.
@ruflin added changelog entry, addressed houndci comments and I attempted to rebase not sure I did it correctly? (sorry not super great with git) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. @andrewkroh Could you also have a look again?
Specify `len` and `cap` is redundant.
jenkins, test it |
I was thinking of back porting this to 6.0 and maybe 5.6 any objections to that? |
SGTM BTW we have a script at |
* Fixed docker diskio bug due to reseting of map. Fixes elastic#5568
* Fixed docker diskio bug due to reseting of map. Fixes elastic#5568
…ic#5698) * Fixed docker diskio bug due to reseting of map. Fixes elastic#5568
Issue explaining this bug #5568 general idea is if 2+ containers the map is overwritten every time and no delta metrics are pushed