host: implement VirtualizationWithContext for AIX (WPAR/LPAR)#2042
Open
Dylan-M wants to merge 3 commits intoshirou:masterfrom
Open
host: implement VirtualizationWithContext for AIX (WPAR/LPAR)#2042Dylan-M wants to merge 3 commits intoshirou:masterfrom
Dylan-M wants to merge 3 commits intoshirou:masterfrom
Conversation
0f3bd0c to
78703d9
Compare
There was a problem hiding this comment.
Pull request overview
Implements AIX-specific virtualization detection in host.VirtualizationWithContext, enabling the host package to report WPAR/LPAR guest environments instead of returning ErrNotImplementedError.
Changes:
- Add AIX
VirtualizationWithContextimplementation detecting WPAR (uname -W) and PowerVM LPAR (uname -L), otherwise returning empty values. - Introduce AIX command invoker dependency injection (
testInvoker/getInvoker) and update AIX host functions to use it. - Add/expand AIX unit tests, including virtualization scenarios and additional host function parsing behavior.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
host/host_aix.go |
Implements AIX virtualization detection and routes command execution through an injectable invoker; adds who parsing + timestamp helper for Users. |
host/host_aix_test.go |
Adds mock invoker and unit tests for virtualization (LPAR/WPAR/bare metal) and other AIX host functions. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
5ca1903 to
af4a9c0
Compare
af4a9c0 to
b264455
Compare
b264455 to
30624b8
Compare
30 tasks
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.
Summary
Replaces the
ErrNotImplementedErrorstub forVirtualizationWithContexton AIX with a real implementation that detects:uname -W. Returns("wpar", "guest")if the WPAR ID is non-zero.uname -L. Returns("powervm", "guest")if the LPAR name is not "NULL".("", "")if neither virtualization layer is detected.Includes unit tests covering LPAR, WPAR, bare metal, and live system scenarios.
Only affects AIX — no cross-platform changes.