File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -49,7 +49,7 @@ extension ImageStore {
4949
5050 private func save( _ state: State ) throws {
5151 let statePath = self . path. appendingPathComponent ( " state.json " )
52- try JSONEncoder ( ) . encode ( state) . write ( to: statePath)
52+ try JSONEncoder ( ) . encode ( state) . write ( to: statePath, options : . atomic )
5353 }
5454
5555 public func delete( reference: String ) throws {
Original file line number Diff line number Diff line change @@ -641,8 +641,8 @@ extension LinuxContainer {
641641 let vm = try await self . vmm. create ( config: creationConfig)
642642 let relayManager = UnixSocketRelayManager ( vm: vm, log: self . logger)
643643
644- try await vm. start ( )
645644 do {
645+ try await vm. start ( )
646646 let mountsForAgent = containerMounts
647647 try await vm. withAgent { agent in
648648 try await agent. standardSetup ( )
@@ -1356,6 +1356,7 @@ extension LinuxContainer {
13561356
13571357 try await withThrowingTaskGroup ( of: Void . self) { group in
13581358 group. addTask {
1359+ defer { metadataCont. finish ( ) }
13591360 try await state. vm. withAgent { agent in
13601361 guard let vminitd = agent as? Vminitd else {
13611362 throw ContainerizationError ( . unsupported, message: " copyOut requires Vminitd agent " )
Original file line number Diff line number Diff line change @@ -125,14 +125,8 @@ public final class LinuxProcess: Sendable {
125125
126126extension LinuxProcess {
127127 func setupIO( listeners: [ VsockListener ? ] ) async throws -> [ FileHandle ? ] {
128- // Nested virtualization (x86_64 CI) is dramatically slower to bring the
129- // guest vsock listeners up than native arm64 virt, so allow a longer
130- // window there while keeping the arm64 path tight.
131- #if arch(x86_64)
132128 let ioTimeout : UInt32 = 30
133- #else
134- let ioTimeout : UInt32 = 3
135- #endif
129+
136130 let handles = try await Timeout . run ( seconds: ioTimeout) {
137131 try await withThrowingTaskGroup ( of: ( Int, FileHandle? ) . self) { group in
138132 var results = [ FileHandle? ] ( repeating: nil , count: 3 )
You can’t perform that action at this time.
0 commit comments