Skip to content

Commit

Permalink
feat: update containerd to 1.5.0, runc to 1.0.0-rc94
Browse files Browse the repository at this point in the history
Fixes #3538

See also siderolabs/pkgs#276

As new containerd is now Go module-based, it pulls many more
dependencies if simply imported in `go.mod`, so I had to replace the
reference to the constant in `pkg/machinery/` to `containerd` volume
with simple value to avoid pulling Kubernetes dependencies into
`pkg/machinery`.

Also updates the kernel to include PR siderolabs/pkgs#275 for AES-NI
support.

Signed-off-by: Andrey Smirnov <smirnov.andrey@gmail.com>
  • Loading branch information
smira authored and talos-bot committed May 11, 2021
1 parent db9c35b commit 95c656f
Show file tree
Hide file tree
Showing 15 changed files with 212 additions and 287 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ NAME = Talos

ARTIFACTS := _out
TOOLS ?= ghcr.io/talos-systems/tools:v0.5.0
PKGS ?= v0.5.0-5-g350aa6f
PKGS ?= v0.6.0-alpha.0
EXTRAS ?= v0.3.0
GO_VERSION ?= 1.16
GOFUMPT_VERSION ?= v0.1.0
Expand Down
13 changes: 3 additions & 10 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,11 @@ replace (
require (
github.com/AlekSi/pointer v1.1.0
github.com/BurntSushi/toml v0.3.1
github.com/Microsoft/hcsshim v0.8.10 // indirect
github.com/Microsoft/hcsshim/test v0.0.0-20201124231931-de74fe8b94ae // indirect
github.com/beevik/ntp v0.3.0
github.com/containerd/cgroups v0.0.0-20201119153540-4cbc285b3327
github.com/containerd/containerd v1.4.4
github.com/containerd/continuity v0.0.0-20200928162600-f2cc35102c2a // indirect
github.com/containerd/cgroups v1.0.1
github.com/containerd/containerd v1.5.0
github.com/containerd/cri v1.19.0
github.com/containerd/go-cni v1.0.2
github.com/containerd/ttrpc v1.0.2 // indirect
github.com/containerd/typeurl v1.0.2
github.com/containernetworking/cni v0.8.1
github.com/containernetworking/plugins v0.9.1
Expand All @@ -46,7 +42,6 @@ require (
github.com/fullsailor/pkcs7 v0.0.0-20190404230743-d7302db945fa
github.com/gdamore/tcell/v2 v2.2.1
github.com/gizak/termui/v3 v3.1.0
github.com/gogo/googleapis v1.4.0 // indirect
github.com/golang/protobuf v1.5.2
github.com/google/go-cmp v0.5.5
github.com/google/uuid v1.2.0
Expand All @@ -60,9 +55,7 @@ require (
github.com/mdlayher/genetlink v1.0.0
github.com/mdlayher/netlink v1.4.0
github.com/morikuni/aec v1.0.0 // indirect
github.com/opencontainers/image-spec v1.0.1 // indirect
github.com/opencontainers/runc v1.0.0-rc92 // indirect
github.com/opencontainers/runtime-spec v1.0.3-0.20200728170252-4d89ac9fbff6
github.com/opencontainers/runtime-spec v1.0.3-0.20200929063507-e6143ca7d51d
github.com/pin/tftp v2.1.0+incompatible
github.com/plunder-app/kube-vip v0.3.3
github.com/prometheus/procfs v0.6.0
Expand Down
425 changes: 177 additions & 248 deletions go.sum

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -1182,7 +1182,7 @@ func getContainerInspector(ctx context.Context, namespace string, driver common.

return cri.NewInspector(ctx)
case common.ContainerDriver_CONTAINERD:
addr := constants.ContainerdAddress
addr := constants.CRIContainerdAddress
if namespace == constants.SystemContainerdNamespace {
addr = constants.SystemContainerdAddress
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1235,7 +1235,7 @@ func stopAndRemoveAllPods(stopAction cri.StopAction) runtime.TaskExecutionFunc {
return err
}

client, err := cri.NewClient("unix://"+constants.ContainerdAddress, 10*time.Second)
client, err := cri.NewClient("unix://"+constants.CRIContainerdAddress, 10*time.Second)
if err != nil {
return err
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ func NewImporter(namespace string, options ...ImporterOption) *Importer {
importer := &Importer{
namespace: namespace,
options: importerOptions{
containerdAddress: constants.ContainerdAddress,
containerdAddress: constants.CRIContainerdAddress,
},
}

Expand Down
2 changes: 1 addition & 1 deletion internal/app/machined/pkg/system/runner/runner.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ func DefaultOptions() *Options {
Env: []string{},
Namespace: constants.SystemContainerdNamespace,
GracefulShutdownTimeout: 10 * time.Second,
ContainerdAddress: constants.ContainerdAddress,
ContainerdAddress: constants.CRIContainerdAddress,
Stdin: nil,
}
}
Expand Down
4 changes: 2 additions & 2 deletions internal/app/machined/pkg/system/services/cri.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ func (c *CRI) Runner(r runtime.Runtime) (runner.Runner, error) {
ProcessArgs: []string{
"/bin/containerd",
"--address",
constants.ContainerdAddress,
constants.CRIContainerdAddress,
"--config",
constants.CRIContainerdConfig,
},
Expand All @@ -84,7 +84,7 @@ func (c *CRI) Runner(r runtime.Runtime) (runner.Runner, error) {
// HealthFunc implements the HealthcheckedService interface.
func (c *CRI) HealthFunc(runtime.Runtime) health.Check {
return func(ctx context.Context) error {
client, err := containerd.New(constants.ContainerdAddress)
client, err := containerd.New(constants.CRIContainerdAddress)
if err != nil {
return err
}
Expand Down
2 changes: 1 addition & 1 deletion internal/app/machined/pkg/system/services/etcd.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ func (e *Etcd) PreFunc(ctx context.Context, r runtime.Runtime) (err error) {
return fmt.Errorf("failed to generate etcd PKI: %w", err)
}

client, err := containerdapi.New(constants.ContainerdAddress)
client, err := containerdapi.New(constants.CRIContainerdAddress)
if err != nil {
return err
}
Expand Down
4 changes: 2 additions & 2 deletions internal/app/machined/pkg/system/services/kubelet.go
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ func (k *Kubelet) PreFunc(ctx context.Context, r runtime.Runtime) error {
return err
}

client, err := containerdapi.New(constants.ContainerdAddress)
client, err := containerdapi.New(constants.CRIContainerdAddress)
if err != nil {
return err
}
Expand Down Expand Up @@ -278,7 +278,7 @@ func (k *Kubelet) args(r runtime.Runtime) ([]string, error) {
"bootstrap-kubeconfig": constants.KubeletBootstrapKubeconfig,
"kubeconfig": constants.KubeletKubeconfig,
"container-runtime": "remote",
"container-runtime-endpoint": "unix://" + constants.ContainerdAddress,
"container-runtime-endpoint": "unix://" + constants.CRIContainerdAddress,
"config": "/etc/kubernetes/kubelet.yaml",
"dynamic-config-dir": "/etc/kubernetes/kubelet",

Expand Down
2 changes: 1 addition & 1 deletion internal/pkg/containers/containerd/containerd.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ func NewInspector(ctx context.Context, namespace string, options ...Option) (ctr
var err error

opt := inspectorOptions{
containerdAddress: constants.ContainerdAddress,
containerdAddress: constants.CRIContainerdAddress,
}

for _, o := range options {
Expand Down
2 changes: 1 addition & 1 deletion internal/pkg/containers/cri/cri.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ func NewInspector(ctx context.Context, options ...Option) (ctrs.Inspector, error
var err error

opt := inspectorOptions{
criEndpoint: "unix:" + constants.ContainerdAddress,
criEndpoint: "unix:" + constants.CRIContainerdAddress,
}

for _, o := range options {
Expand Down
11 changes: 4 additions & 7 deletions pkg/machinery/constants/constants.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ package constants
import (
"time"

"github.com/containerd/containerd/defaults"
cni "github.com/containerd/go-cni"
"github.com/talos-systems/crypto/x509"
)
Expand Down Expand Up @@ -295,14 +294,17 @@ const (
TrustdPort = 50001

// DefaultContainerdVersion is the default container runtime version.
DefaultContainerdVersion = "1.4.4"
DefaultContainerdVersion = "1.5.0"

// SystemContainerdNamespace is the Containerd namespace for Talos services.
SystemContainerdNamespace = "system"

// SystemContainerdAddress is the path to the system containerd socket.
SystemContainerdAddress = SystemRunPath + "/containerd/containerd.sock"

// CRIContainerdAddress is the path to the CRI containerd socket address.
CRIContainerdAddress = "/run/containerd/containerd.sock"

// CRIContainerdConfig is the path to the config for the containerd instance that provides the CRI.
CRIContainerdConfig = "/etc/cri/containerd.toml"

Expand Down Expand Up @@ -429,8 +431,3 @@ const (
//nolint:golint
SYSLOG_ACTION_READ_ALL = 3
)

// Containerd.
const (
ContainerdAddress = defaults.DefaultAddress
)
7 changes: 5 additions & 2 deletions pkg/machinery/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -9,26 +9,29 @@ replace gopkg.in/yaml.v3 => github.com/unix4ever/yaml v0.0.0-20210315173758-8fb3
require (
github.com/AlekSi/pointer v1.1.0
github.com/asaskevich/govalidator v0.0.0-20200907205600-7a23bdc65eef
github.com/containerd/containerd v1.4.4
github.com/containerd/go-cni v1.0.2
github.com/containernetworking/cni v0.8.1 // indirect
github.com/cosi-project/runtime v0.0.0-20210409233936-10d6103c19ab
github.com/dustin/go-humanize v1.0.0
github.com/evanphx/json-patch v4.9.0+incompatible
github.com/ghodss/yaml v1.0.0
github.com/golang/protobuf v1.5.2
github.com/hashicorp/go-multierror v1.1.1
github.com/onsi/ginkgo v1.15.0 // indirect
github.com/opencontainers/runtime-spec v1.0.3-0.20200520003142-237cc4f519e2
github.com/onsi/gomega v1.10.3 // indirect
github.com/opencontainers/runtime-spec v1.0.3-0.20200929063507-e6143ca7d51d
github.com/stretchr/objx v0.3.0 // indirect
github.com/stretchr/testify v1.7.0
github.com/talos-systems/crypto v0.2.1-0.20210427105118-4f80b976b640
github.com/talos-systems/go-blockdevice v0.2.1-0.20210510233948-1292574643e0
github.com/talos-systems/net v0.2.1-0.20210212213224-05190541b0fa
golang.org/x/net v0.0.0-20210226172049-e18ecbb05110 // indirect
golang.org/x/sys v0.0.0-20210324051608-47abb6519492 // indirect
golang.org/x/text v0.3.5 // indirect
google.golang.org/genproto v0.0.0-20210302174412-5ede27ff9881
google.golang.org/grpc v1.37.0
google.golang.org/protobuf v1.26.0
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b
)
19 changes: 11 additions & 8 deletions pkg/machinery/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,11 @@ github.com/cenkalti/backoff/v4 v4.1.0/go.mod h1:scbssz8iZGpm3xbr14ovlUdkxfGXNInq
github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU=
github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw=
github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk=
github.com/containerd/containerd v1.4.4 h1:rtRG4N6Ct7GNssATwgpvMGfnjnwfjnu/Zs9W3Ikzq+M=
github.com/containerd/containerd v1.4.4/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMXFTttgp+kVtyUA=
github.com/containerd/go-cni v1.0.2 h1:YbJAhpTevL2v6u8JC1NhCYRwf+3Vzxcc5vGnYoJ7VeE=
github.com/containerd/go-cni v1.0.2/go.mod h1:nrNABBHzu0ZwCug9Ije8hL2xBCYh/pjfMb1aZGrrohk=
github.com/containernetworking/cni v0.8.0 h1:BT9lpgGoH4jw3lFC7Odz2prU5ruiYKcgAjMCbgybcKI=
github.com/containernetworking/cni v0.8.0/go.mod h1:LGwApLUm2FpoOfxTDEeq8T9ipbpZ61X79hmU3w8FmsY=
github.com/containernetworking/cni v0.8.1 h1:7zpDnQ3T3s4ucOuJ/ZCLrYBxzkg0AELFfII3Epo9TmI=
github.com/containernetworking/cni v0.8.1/go.mod h1:LGwApLUm2FpoOfxTDEeq8T9ipbpZ61X79hmU3w8FmsY=
github.com/cosi-project/runtime v0.0.0-20210409233936-10d6103c19ab h1:u8p7SXdsdYV89RnXtPExlvIKDrXLeGhAUo66LmOtYV4=
github.com/cosi-project/runtime v0.0.0-20210409233936-10d6103c19ab/go.mod h1:ebaL1B5YO0vy0YuhHS59QrRfZEYPNB9U3bzdLrlUfzo=
github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E=
Expand Down Expand Up @@ -84,10 +83,11 @@ github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108
github.com/onsi/ginkgo v1.15.0 h1:1V1NfVQR87RtWAgp1lv9JZJ5Jap+XFGKPi00andXGi4=
github.com/onsi/ginkgo v1.15.0/go.mod h1:hF8qUzuuC8DJGygJH3726JnCZX4MYbRB8yFfISqnKUg=
github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY=
github.com/onsi/gomega v1.10.1 h1:o0+MgICZLuZ7xjH7Vx6zS/zcu93/BEp1VwkIW1mEXCE=
github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo=
github.com/opencontainers/runtime-spec v1.0.3-0.20200520003142-237cc4f519e2 h1:9mv9SC7GWmRWE0J/+oD8w3GsN2KYGKtg6uwLN7hfP5E=
github.com/opencontainers/runtime-spec v1.0.3-0.20200520003142-237cc4f519e2/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0=
github.com/onsi/gomega v1.10.3 h1:gph6h/qe9GSUw1NhH1gp+qb+h8rXD8Cy60Z32Qw3ELA=
github.com/onsi/gomega v1.10.3/go.mod h1:V9xEwhxec5O8UDM77eCW8vLymOMltsqPVYWrpDsH8xc=
github.com/opencontainers/runtime-spec v1.0.3-0.20200929063507-e6143ca7d51d h1:pNa8metDkwZjb9g4T8s+krQ+HRgZAkqnXml+wNir/+s=
github.com/opencontainers/runtime-spec v1.0.3-0.20200929063507-e6143ca7d51d/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0=
github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
Expand Down Expand Up @@ -134,6 +134,7 @@ golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn
golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/net v0.0.0-20200520004742-59133d7f0dd7/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A=
golang.org/x/net v0.0.0-20201006153459-a7d1128ccaa0/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
golang.org/x/net v0.0.0-20210226172049-e18ecbb05110 h1:qWPm9rbaAMKs8Bq/9LRpbMqxWRVUAQwMI9fVrssnTfw=
golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
Expand All @@ -155,8 +156,9 @@ golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7w
golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20201130171929-760e229fe7c5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210112080510-489259a85091 h1:DMyOG0U+gKfu8JZzg2UQe9MeaC1X+xQWlAKcRnjxjCw=
golang.org/x/sys v0.0.0-20210112080510-489259a85091/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210324051608-47abb6519492 h1:Paq34FxTluEPvVyayQqMPgHm+vTOrIifmcYxFBx9TLg=
golang.org/x/sys v0.0.0-20210324051608-47abb6519492/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
Expand Down Expand Up @@ -214,7 +216,8 @@ gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkep
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw=
gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
gopkg.in/yaml.v2 v2.3.0 h1:clyUAQHOM3G0M3f5vQj7LuJrETvjVot3Z5el9nffUtU=
gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY=
gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ=
honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=

0 comments on commit 95c656f

Please sign in to comment.