From 3192b36ab90f35dbd51918b72d0ecbe7b7c46a1b Mon Sep 17 00:00:00 2001 From: Wei Chen Date: Sat, 30 Sep 2017 14:31:45 +0800 Subject: [PATCH] ctr: Add variant to ARM's DefaultSpec string The variant is required for platform match while pulling images for ARM platforms. Currently, the cpuVariant only would be assigned on linux/arm|arm64 platforms. Other platforms this variable would be empty. So we can use this cpuVariant to initialize the Variant field. Change-Id: Ic065be9b502f1e662445daa61a0973bf56385b37 Signed-off-by: Wei Chen Signed-off-by: Penny Zheng --- platforms/defaults.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/platforms/defaults.go b/platforms/defaults.go index 2b57b4979..ed493ab2c 100644 --- a/platforms/defaults.go +++ b/platforms/defaults.go @@ -16,6 +16,7 @@ func DefaultSpec() specs.Platform { return specs.Platform{ OS: runtime.GOOS, Architecture: runtime.GOARCH, - // TODO(stevvooe): Need to resolve GOARM for arm hosts. + // The Variant field will be empty if arch != ARM. + Variant: cpuVariant, } }