Skip to content

Commit e375977

Browse files
committed
Add more debugging
1 parent 115071c commit e375977

2 files changed

Lines changed: 6 additions & 1 deletion

File tree

Sources/ContainerCommands/System/SystemStart.swift

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,6 @@ extension Application {
104104
// Now ping our friendly daemon. Fail if we don't get a response.
105105
do {
106106
print("Verifying apiserver is running...")
107-
try await Task.sleep(for: .seconds(3))
108107
_ = try await ClientHealthCheck.ping(timeout: .seconds(10))
109108
} catch {
110109
throw ContainerizationError(

Sources/Services/ContainerAPIService/Server/Networks/NetworksService.swift

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,23 +146,29 @@ public actor NetworksService {
146146
}
147147

148148
// Create and start the network.
149+
log.info("DEBUG: register starting")
149150
try await registerService(configuration: configuration)
151+
log.info("DEBUG: register register completed")
150152
let client = NetworkClient(id: configuration.id)
151153

152154
// Ensure the network is running, and set up the persistent network state
153155
// using our configuration data, as the one from the helper doesn't include
154156
// metadata.
157+
log.info("DEBUG: checking state")
155158
guard case .running(_, let status) = try await client.state() else {
156159
throw ContainerizationError(.invalidState, message: "network \(configuration.id) failed to start")
157160
}
161+
log.info("DEBUG: network running")
158162
let networkState: NetworkState = .running(configuration, status)
159163
networkStates[configuration.id] = networkState
160164

161165
// Persist the configuration data.
162166
do {
167+
log.info("DEBUG: saving entity")
163168
try await store.create(configuration)
164169
return networkState
165170
} catch {
171+
log.info("DEBUG: entity save failed")
166172
networkStates.removeValue(forKey: configuration.id)
167173
do {
168174
try pluginLoader.deregisterWithLaunchd(plugin: networkPlugin, instanceId: configuration.id)

0 commit comments

Comments
 (0)