Skip to content

Commit

Permalink
Fix containerd config toml
Browse files Browse the repository at this point in the history
Previously we were writing `"discard_blocks":  "true"` with `true` as a
string. In recent containerds they are being more strict on type, so
now we set it as a bool.

Also I accidentally messed up the path, and did some weird things with other
vars. Now the containerd config file is written to
`/etc/containerd/config-e2e.toml`
not `/etc/containerd/config-e2e.toml/config-e2e.toml`.
  • Loading branch information
Callisto13 committed Feb 23, 2022
1 parent 8032d3f commit 65c3b9d
Showing 1 changed file with 12 additions and 13 deletions.
25 changes: 12 additions & 13 deletions test/e2e/utils/runner.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,17 +23,16 @@ import (
)

const (
containerdBin = "containerd"
flintlockCmdDir = "github.com/weaveworks/flintlock/cmd/flintlockd"
containerdSocket = "/run/containerd-e2e/containerd.sock"
containerdCfgDir = "/etc/containerd/config-e2e.toml"
containerdCfg = containerdCfgDir + "/config-e2e.toml"
containerdRootDir = "/var/lib/containerd-e2e"
containerdStateDir = "/run/containerd-e2e"
grpcDialTarget = "127.0.0.1:9090"
loopDeviceTag = "e2e"
containerdGrpcAddress = containerdStateDir + "/containerd.sock"
devMapperRoot = containerdRootDir + "/snapshotter/devmapper"
containerdBin = "containerd"
flintlockCmdDir = "github.com/weaveworks/flintlock/cmd/flintlockd"
containerdCfgDir = "/etc/containerd"
containerdRootDir = "/var/lib/containerd-e2e"
containerdStateDir = "/run/containerd-e2e"
containerdCfg = containerdCfgDir + "/config-e2e.toml"
containerdSocket = containerdStateDir + "/containerd.sock"
devMapperRoot = containerdRootDir + "/snapshotter/devmapper"
grpcDialTarget = "127.0.0.1:9090"
loopDeviceTag = "e2e"
)

// Runner holds test runner configuration.
Expand Down Expand Up @@ -156,7 +155,7 @@ func (r *Runner) writeContainerdConfig() {
"pool_name": r.params.ThinpoolName,
"root_path": devMapperRoot,
"base_image_size": "10GB",
"discard_blocks": "true",
"discard_blocks": true,
}
pluginTree, err := toml.TreeFromMap(dmplug)
gm.Expect(err).NotTo(gm.HaveOccurred())
Expand All @@ -166,7 +165,7 @@ func (r *Runner) writeContainerdConfig() {
Root: containerdRootDir,
State: containerdStateDir,
GRPC: ccfg.GRPCConfig{
Address: containerdGrpcAddress,
Address: containerdSocket,
},
Metrics: ccfg.MetricsConfig{
Address: "127.0.0.1:1338",
Expand Down

0 comments on commit 65c3b9d

Please sign in to comment.