summaryrefslogtreecommitdiff
path: root/pkg/api/handlers/compat/info.go
diff options
context:
space:
mode:
authorAkihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>2020-07-28 18:17:13 +0900
committerAkihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>2020-07-28 18:17:13 +0900
commitf657e5551e8757039f4b80401b56b2f46006d32f (patch)
tree797360bf047c3bac0c276aeeaea82f478e0b06a4 /pkg/api/handlers/compat/info.go
parent2b7bc9b101887a789a9fc0282d448efad824404f (diff)
downloadpodman-f657e5551e8757039f4b80401b56b2f46006d32f.tar.gz
podman-f657e5551e8757039f4b80401b56b2f46006d32f.tar.bz2
podman-f657e5551e8757039f4b80401b56b2f46006d32f.zip
compat/info.go: TrimPrefix(CGroupsVersion, "v")
For compatibility with Docker: https://github.com/moby/moby/blob/846b7e24ba549a972a2672ffdd88b140da688736/api/swagger.yaml#L4528-L4534 Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
Diffstat (limited to 'pkg/api/handlers/compat/info.go')
-rw-r--r--pkg/api/handlers/compat/info.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/pkg/api/handlers/compat/info.go b/pkg/api/handlers/compat/info.go
index 6c44393cc..c0033eab4 100644
--- a/pkg/api/handlers/compat/info.go
+++ b/pkg/api/handlers/compat/info.go
@@ -119,7 +119,7 @@ func GetInfo(w http.ResponseWriter, r *http.Request) {
BuildahVersion: infoData.Host.BuildahVersion,
CPURealtimePeriod: sysInfo.CPURealtimePeriod,
CPURealtimeRuntime: sysInfo.CPURealtimeRuntime,
- CgroupVersion: infoData.Host.CGroupsVersion,
+ CgroupVersion: strings.TrimPrefix(infoData.Host.CGroupsVersion, "v"),
Rootless: rootless.IsRootless(),
SwapFree: infoData.Host.SwapFree,
SwapTotal: infoData.Host.SwapTotal,