Upgrade vminitd API to use grpc-swift-2. (#578)#669
Open
jglogan wants to merge 1 commit intoapple:mainfrom
Open
Upgrade vminitd API to use grpc-swift-2. (#578)#669jglogan wants to merge 1 commit intoapple:mainfrom
jglogan wants to merge 1 commit intoapple:mainfrom
Conversation
- No real notable API changes. The largest change code-wise is in Vminitd. The connection loop is set up immediately in the new API by calling runConnections() on the client, and this blocks until either the task it's running on is cancelled or beginGracefulShutdown is called. Because of this, either we'd have to modify our API to have VirtualMachineAgent implementations call some run() method, or we just put runConnections in an internal task on Vminitd. This change uses the latter approach as it's simpler. - Updated dependencies to pick up latest protobuf and grpc-swift-2 fixes. - ClientBootstrap.withConnectedSocket(fd).wait() registers the vsock fd with epoll/kqueue immediately. vminitd sends its HTTP/2 SETTINGS frame right away upon accepting the connection, so those bytes can arrive on the fd — and be read by NIO — before the gRPC pipeline is installed. With a bare pipeline, NIO has nowhere to send the bytes and discards them. - Buffer until ClientConnectionHandler is in the pipeline so it can process the SETTINGS frame and fire .ready, then schedule delivery of the buffered data with assumeIsolatedUnsafeUnchecked().execute. - To help produce more accurate merged logs, defines a `StderrLogHandler` in the vminitd Application.swift that writes timestamps to the boot log with millisecond precision and format identical to that of the log files created using the `--log-root` arg on `container`. - Updates hawkeye to latest version (v6.5.1). --------- Co-authored-by: Danny Canter <danny_canter@apple.com>
1 task
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
StderrLogHandlerin the vminitd Application.swift that writes timestamps to the boot log with millisecond precision and format identical to that of the log files created using the--log-rootarg oncontainer.