Conversation
Member
Author
|
This branch also adds a new test vagrant VM (setup for mac only at the moment) for local testing. This passes built tests and bats tests for mock cases. |
Member
Author
|
What to do if the library to inject is not on the container already? (i.e. nothing to replace) Works on target Catch hook log with wrapper: ENV injection is here: Mount dir logic is here: |
Member
Author
|
Note: currently we pass new libs via LD_LIBRARY_PATH, it could be done via an ld cache refresh, but it would require to update the ldcache hook to enter the container namespace before start (instead of manipulating the bundle as it currently does), as otherwise, the new envs and mounts are not available to the hook (as it runs in host) |
Member
Author
CXI config works :) |
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.
Precreate hook that plans library injection from the container rootfs and rewrites the OCI config
to add bind mounts to inject host libs.
Architecture Overview
This hook is architected as a small compiler for OCI specs.
Its lifecycle in main.rs is a five-stage pipeline:
The core data model is:
LD_LIBRARY_PATHadditions, extra mounts, extra env, and warningsFor each input library, the planning layer makes one decision: overwrite an existing container library path, or inject through a directory and extend
LD_LIBRARY_PATHAlways deciding replacement if ABI mayor is respected, otherwise it does directory placement.
Enabling this type of hook injection config: