-
Notifications
You must be signed in to change notification settings - Fork 275
Adding support for WCOW UVM log forward service #2524
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
@microsoft-github-policy-service agree company="Microsoft" |
a0a0dcd to
e4214fd
Compare
Signed-off-by: Manish Ranjan Mahanta <[email protected]>
abd7351 to
1b6c554
Compare
Signed-off-by: Manish Ranjan Mahanta <[email protected]>
| // | ||
| // "io.microsoft.virtualmachine.wcow.logsources" = | ||
| // "eyJsb2dDb25maWciOnsic291cmNlcyI6W3sidHlwZSI6IkVUVyIsInByb3ZpZGVycyI6W3sicHJvdmlkZXJHdWlkIjoiODBDRTUwREUtRDI2NC00NTgxLTk1MEQtQUJBREVFRTBEMzQwIiwicHJvdmlkZXJOYW1lIjoiTWljcm9zb2Z0LldpbmRvd3MuSHlwZXJWLkNvbXB1dGUiLCJsZXZlbCI6IkluZm9ybWF0aW9uIn1dfV19fQ==" | ||
| LogSources = "io.microsoft.virtualmachine.wcow.logsources" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We have some annoyances from poor choices using .lcow. in annotations for C-LCOW. Maybe we should not use .wcow. here so that the day we can do this for linux we don't end up with two annotations, two lots of consuming code etc etc.
Adding support to manage control plane operations and receive the log data from the Log Forward Service in the Utility VM.
Control Plane: Based on annotations passed for WCOW pod creation
HcsShimsends commands via the bridge to the GCS which relays this by calling appropriate RPCs of the Log Forward Service.Data Plane:
HcsShimcreates a HvSocket listener to receive the logs from the Log Forward Service, parses them and re-logs it to the RunHCS ETW providerControl Plane
During protocol negotiation, inbox GCS shall exhibit a new GcsCapabilities called
ModifyServiceSettingsSupportedindicating GCS supports ModifyServiceSettings. Also,GuestDefinedCapabilitesfor WCOW shall mentionLogForwardingSupportedindicating Log Forward Service is presentFor Control Plane ops, a new message category
ComputeServiceand message typeModifyServiceSettingsis added (following pattern of HCS ModifyServiceSettings). TheSettingsproperty of theModifyServiceSettingsshall mention the name of service (Log Forward Service for our case), with details of the operation to be called for it (e.g. Modify, Start, Stop). Existing hex interpreting logic to determine type of message had to be modified as they were hardcoded to only expectComputeSystemcategory of messages.Annotations for WCOW UVM Create are added
io.microsoft.virtualmachine.wcow.logsourcesio.microsoft.virtualmachine.wcow.forwardlogsBy default,
ForwardLogswould betruefor WCOW andfalsefor C-WCOW, unless specifiedData Plane
HcsShim creates the HvSocket Listener to listen for connections from the Log Forward Service. This is created irrespectively, as we plan to allow Log Forward Service to connect after UVM creation is done as well, by (later in a different PR) introduce support for enabling the ForwardLogs as part of Update call.
The HvSocket is also created to limit only one concurrent connection at a time, and allow for reconnection (and not close the listener on accept)
On accepting the connection, the output is handled by
ParseLogruswhich has been modified to expect the message to be inmessageorMessagewhich is typical in Windows ETW events