Skip to content

Commit bc0ec15

Browse files
committed
fix: tune vsock dial for buildkite hosts
Signed-off-by: Austin Vazquez <[email protected]>
1 parent 76ca002 commit bc0ec15

File tree

5 files changed

+5
-24
lines changed

5 files changed

+5
-24
lines changed

.buildkite/pipeline.yml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -88,10 +88,6 @@ steps:
8888
command:
8989
- make -C runtime integ-test FICD_DM_POOL=build_${BUILDKITE_BUILD_NUMBER}_runtime
9090

91-
- wait
92-
93-
# Let's isolate the remote snapshotter integration tests.
94-
# See https://github.com/firecracker-microvm/firecracker-containerd/issues/673
9591
- label: ":running: snapshotter isolated tests"
9692
agents:
9793
queue: "${BUILDKITE_AGENT_META_DATA_QUEUE:-default}"
@@ -108,8 +104,6 @@ steps:
108104
- make -C snapshotter integ-test FICD_DM_POOL=build_${BUILDKITE_BUILD_NUMBER}_snapshotter
109105
timeout_in_minutes: 10
110106

111-
- wait
112-
113107
- label: ":weight_lifter: stress tests"
114108
concurrency_group: stress
115109
concurrency: 1

snapshotter/app/service.go

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -177,9 +177,12 @@ func initSnapshotter(ctx context.Context, config config.Config, cache cache.Cach
177177
return nil, err
178178
}
179179

180-
ackMsgTimeout := time.Duration(config.Snapshotter.Dialer.AckMsgTimeoutInSeconds) * time.Second
180+
// TODO: https://github.com/firecracker-microvm/firecracker-containerd/issues/689
181181
snapshotterDialer := func(ctx context.Context, namespace string) (net.Conn, error) {
182-
return vsock.DialContext(ctx, host, uint32(port), vsock.WithLogger(log.G(ctx)), vsock.WithAckMsgTimeout(ackMsgTimeout))
182+
return vsock.DialContext(ctx, host, uint32(port), vsock.WithLogger(log.G(ctx)),
183+
vsock.WithAckMsgTimeout(2*time.Second),
184+
vsock.WithRetryInterval(200*time.Millisecond),
185+
)
183186
}
184187

185188
var metricsProxy *metrics.Proxy

snapshotter/config/config.go

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ type Config struct {
3232

3333
type snapshotter struct {
3434
Listener listener `toml:"listener"`
35-
Dialer dialer `toml:"dialer"`
3635
Proxy proxy `toml:"proxy"`
3736
Metrics metrics `toml:"metrics"`
3837
}
@@ -42,10 +41,6 @@ type listener struct {
4241
Address string `toml:"address" default:"/var/lib/demux-snapshotter/snapshotter.sock"`
4342
}
4443

45-
type dialer struct {
46-
AckMsgTimeoutInSeconds int `toml:"ack_msg_timeout_in_seconds" default:"1"`
47-
}
48-
4944
type proxy struct {
5045
Address address `toml:"address"`
5146
}

snapshotter/config/config_test.go

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -62,9 +62,6 @@ func defaultConfig() error {
6262
Network: "unix",
6363
Address: "/var/lib/demux-snapshotter/snapshotter.sock",
6464
},
65-
Dialer: dialer{
66-
AckMsgTimeoutInSeconds: 1,
67-
},
6865
Metrics: metrics{
6966
Enable: false,
7067
},
@@ -82,8 +79,6 @@ func parseExampleConfig() error {
8279
[snapshotter.listener]
8380
network = "unix"
8481
address = "/var/lib/demux-snapshotter/non-default-snapshotter.vsock"
85-
[snapshotter.dialer]
86-
ack_msg_timeout_in_seconds = 4
8782
[snapshotter.proxy.address.resolver]
8883
type = "http"
8984
address = "localhost:10001"
@@ -101,9 +96,6 @@ func parseExampleConfig() error {
10196
Network: "unix",
10297
Address: "/var/lib/demux-snapshotter/non-default-snapshotter.vsock",
10398
},
104-
Dialer: dialer{
105-
AckMsgTimeoutInSeconds: 4,
106-
},
10799
Proxy: proxy{
108100
Address: address{
109101
Resolver: resolver{

tools/docker/entrypoint.sh

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,6 @@ EOF
4242

4343
mkdir -p /etc/demux-snapshotter /var/lib/demux-snapshotter
4444
cat > /etc/demux-snapshotter/config.toml <<EOF
45-
[snapshotter.dialer]
46-
ack_msg_timeout_in_seconds = 2
47-
4845
[snapshotter.proxy.address.resolver]
4946
type = "http"
5047
address = "http://127.0.0.1:10001"

0 commit comments

Comments
 (0)