Skip to content

info: add warnings about missing blkio cgroup support#41083

Merged
cpuguy83 merged 1 commit into
moby:masterfrom
thaJeztah:more_warnings
Jul 9, 2020
Merged

info: add warnings about missing blkio cgroup support#41083
cpuguy83 merged 1 commit into
moby:masterfrom
thaJeztah:more_warnings

Conversation

@thaJeztah

Copy link
Copy Markdown
Member

These warnings were only logged, and could therefore be overlooked by users. This patch makes these more visible by returning them as warnings in the API response.

We should probably consider adding "boolean" (?) fields for these as well, so that they can be consumed in other ways. In addition, some of these warnings could potentially be grouped to reduce the number of warnings that are printed.

- Description for the changelog

- A picture of a cute animal (not mandatory but encouraged)

These warnings were only logged, and could therefore be overlooked
by users. This patch makes these more visible by returning them as
warnings in the API response.

We should probably consider adding "boolean" (?) fields for these
as well, so that they can be consumed in other ways. In addition,
some of these warnings could potentially be grouped to reduce the
number of warnings that are printed.

Signed-off-by: Sebastiaan van Stijn <[email protected]>
Comment thread daemon/info_unix.go
Comment on lines +134 to +145
if !sysInfo.BlkioReadBpsDevice {
v.Warnings = append(v.Warnings, "WARNING: No blkio throttle.read_bps_device support")
}
if !sysInfo.BlkioWriteBpsDevice {
v.Warnings = append(v.Warnings, "WARNING: No blkio throttle.write_bps_device support")
}
if !sysInfo.BlkioReadIOpsDevice {
v.Warnings = append(v.Warnings, "WARNING: No blkio throttle.read_iops_device support")
}
if !sysInfo.BlkioWriteIOpsDevice {
v.Warnings = append(v.Warnings, "WARNING: No blkio throttle.write_iops_device support")
}

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We currently log these separately (and also this creates separate warnings for each), but I'm wondering if (in reality) its possible that (e.g.) throttle.read_bps_device is supported but throttle.write_bps_device is not supported (and vice-versa). Similar to iops ? Would it in practice be "all" or "none"?? If so, we could print a single warning instead of separate ones.

/cc @AkihiroSuda @kolyshkin

@thaJeztah thaJeztah added this to the 20.03.0 milestone Jul 9, 2020

@cpuguy83 cpuguy83 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@cpuguy83
cpuguy83 merged commit 1022c66 into moby:master Jul 9, 2020
@thaJeztah
thaJeztah deleted the more_warnings branch July 9, 2020 19:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants