Skip to content

Commit ae55815

Browse files
committed
fix: capture stderr in execCapture and let iptables MSS failures propagate
1 parent fe8e691 commit ae55815

2 files changed

Lines changed: 4 additions & 3 deletions

File tree

Sources/ContainerK8s/K8sHelper.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@ struct K8sHelper {
199199
executable: executable, arguments: arguments, environment: [], terminal: false)
200200
let proc = try await client.createProcess(
201201
containerId: containerId, processId: UUID().uuidString.lowercased(),
202-
configuration: config, stdio: [nil, pipe.fileHandleForWriting, nil])
202+
configuration: config, stdio: [nil, pipe.fileHandleForWriting, pipe.fileHandleForWriting])
203203
try await proc.start()
204204
pipe.fileHandleForWriting.closeFile()
205205
let data = pipe.fileHandleForReading.readDataToEndOfFile()
@@ -291,8 +291,8 @@ struct K8sHelper {
291291
sysctl -w net.bridge.bridge-nf-call-ip6tables=1 2>/dev/null || true
292292
systemctl restart containerd
293293
ctr -n k8s.io images tag registry.k8s.io/pause:3.10 registry.k8s.io/pause:3.10.1 2>/dev/null || true
294-
/usr/sbin/iptables-nft -t mangle -A OUTPUT -p tcp --tcp-flags SYN,RST SYN -j TCPMSS --set-mss 1220 2>/dev/null || true
295-
/usr/sbin/iptables-nft -t mangle -A FORWARD -p tcp --tcp-flags SYN,RST SYN -j TCPMSS --set-mss 1220 2>/dev/null || true
294+
/usr/sbin/iptables-nft -t mangle -A OUTPUT -p tcp --tcp-flags SYN,RST SYN -j TCPMSS --set-mss 1220
295+
/usr/sbin/iptables-nft -t mangle -A FORWARD -p tcp --tcp-flags SYN,RST SYN -j TCPMSS --set-mss 1220
296296
"""
297297
}()
298298

Sources/Plugins/K8s/K8sCommand.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
//===----------------------------------------------------------------------===//
1616

1717
import ArgumentParser
18+
import ContainerK8s
1819
import ContainerVersion
1920

2021
public struct K8sCommand: AsyncParsableCommand {

0 commit comments

Comments
 (0)