-
Notifications
You must be signed in to change notification settings - Fork 250
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
lxcfs: per instance configuration #638
Open
mihalicyn
wants to merge
17
commits into
lxc:main
Choose a base branch
from
mihalicyn:lxcfs_per_inst_config
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains 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
mihalicyn
force-pushed
the
lxcfs_per_inst_config
branch
from
April 29, 2024 12:51
5fb27e4
to
791cd14
Compare
mihalicyn
force-pushed
the
lxcfs_per_inst_config
branch
4 times, most recently
from
May 8, 2024 12:31
ab6ec5e
to
7d47c99
Compare
mihalicyn
force-pushed
the
lxcfs_per_inst_config
branch
2 times, most recently
from
June 10, 2024 14:36
df815c2
to
e2b98ef
Compare
Let's reduce code duplication by using macro for this. Signed-off-by: Alexander Mikhalitsyn <aleksandr.mikhalitsyn@canonical.com>
Let's allocate pidns_hash_table memory dynamically and hold pointers to it from a new lxcfs_data structure. Previously, pidns_hash_table was a statically allocated in liblxcfs, which means that it won't survive across liblxcfs reloads. Let's introduce a versionized lxcfs_data structure to keep persistent data that should survive reloads. Signed-off-by: Alexander Mikhalitsyn <aleksandr.mikhalitsyn@canonical.com>
It's necessary as we want to be able to easily extend it and use live reloads update mechanism. This change does not break compatibility, because struct pidns_store lifetime is limited to liblxcfs lifetime. But we'll make pidns_store lifetime bigger that's why we need to start versionizing it. Signed-off-by: Alexander Mikhalitsyn <aleksandr.mikhalitsyn@canonical.com>
Let's add keep_on_reload field to struct pidns_store. The idea behind it is that if this flag is set to true, then pidns_store entry won't be considered as a cache item which can be dropped. But instead, it will be kept across liblxcfs reloads and droped only if a pid namespace it refers die. Signed-off-by: Alexander Mikhalitsyn <aleksandr.mikhalitsyn@canonical.com>
Signed-off-by: Alexander Mikhalitsyn <aleksandr.mikhalitsyn@canonical.com>
…pear Signed-off-by: Alexander Mikhalitsyn <aleksandr.mikhalitsyn@canonical.com>
Signed-off-by: Alexander Mikhalitsyn <aleksandr.mikhalitsyn@canonical.com>
Signed-off-by: Alexander Mikhalitsyn <aleksandr.mikhalitsyn@canonical.com>
Signed-off-by: Alexander Mikhalitsyn <aleksandr.mikhalitsyn@canonical.com>
This bitmask can be used to represent a per-instance (technically, per pid namespace) features configuration (toggle-like). Signed-off-by: Alexander Mikhalitsyn <aleksandr.mikhalitsyn@canonical.com>
Signed-off-by: Alexander Mikhalitsyn <aleksandr.mikhalitsyn@canonical.com>
Signed-off-by: Alexander Mikhalitsyn <aleksandr.mikhalitsyn@canonical.com>
Signed-off-by: Alexander Mikhalitsyn <aleksandr.mikhalitsyn@canonical.com>
Like we have "cgroup", "sys", "proc" subtrees, let's introduce the "lxcfs" subtree which will contain LXCFS filesystem-related data and will be used as an interface to interact and configure LXCFS in runtime. Signed-off-by: Alexander Mikhalitsyn <aleksandr.mikhalitsyn@canonical.com>
Signed-off-by: Alexander Mikhalitsyn <aleksandr.mikhalitsyn@canonical.com>
Signed-off-by: Alexander Mikhalitsyn <aleksandr.mikhalitsyn@canonical.com>
Signed-off-by: Alexander Mikhalitsyn <aleksandr.mikhalitsyn@canonical.com>
mihalicyn
force-pushed
the
lxcfs_per_inst_config
branch
from
June 10, 2024 16:27
e2b98ef
to
78f2fd3
Compare
I did a first pass on this, basically looking at the various commits and what's being modified. For now, a few things I think that should be done:
|
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.
This adds ability to set per-container configuration parameters (boolean).
This can be very useful in some workloads if system administrator (or container administrator) want's to have some specific LXCFS configuration in some instances, while having defaults on the other ones.
Change is forward compatible and LXCFS can be updated with live reload. Nothing will crash. Obviously, to make new configuration sub-tree accessible full daemon reload is required.