-
Notifications
You must be signed in to change notification settings - Fork 107
Add support for Incus #423
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
Reviewer's guide (collapsed on small PRs)Reviewer's GuideAdds initial plumbing to support Incus containers alongside or similar to existing LXD support in container.fc, leveraging their close compatibility. File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
Summary of ChangesHello @Conan-Kudo, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request integrates support for Incus, a community-maintained fork of LXD, into the SELinux policy. It achieves this by adding comprehensive SELinux rules that mirror existing LXD policies, ensuring that Incus executables, systemd units, data directories, runtime files, and logs are correctly labeled and managed within an SELinux-enforced environment. This change allows Incus to operate securely and seamlessly on systems with SELinux enabled. Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
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.
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.
Code Review
This pull request adds support for Incus by defining the necessary SELinux file contexts. The changes are functionally correct, mirroring the existing setup for LXD. However, I've identified several opportunities to improve code style and maintainability by enforcing consistent alphabetical sorting and alignment of entries. I've provided specific suggestions to address these minor issues.
container.fc
Outdated
| /usr/s?bin/incus-.* -- gen_context(system_u:object_r:container_runtime_exec_t,s0) | ||
| /usr/s?bin/lxc-.* -- gen_context(system_u:object_r:container_runtime_exec_t,s0) | ||
| /usr/s?bin/lxd-.* -- gen_context(system_u:object_r:container_runtime_exec_t,s0) | ||
| /usr/s?bin/incus -- gen_context(system_u:object_r:container_runtime_exec_t,s0) |
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.
| /usr/lib/systemd/system/docker.* -- gen_context(system_u:object_r:container_unit_file_t,s0) | ||
| /usr/lib/systemd/system/incus.* -- gen_context(system_u:object_r:container_unit_file_t,s0) | ||
| /usr/lib/systemd/system/lxd.* -- gen_context(system_u:object_r:container_unit_file_t,s0) | ||
| /usr/lib/systemd/system/containerd.* -- gen_context(system_u:object_r:container_unit_file_t,s0) | ||
| /usr/lib/systemd/system/buildkit.* -- gen_context(system_u:object_r:container_unit_file_t,s0) |
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.
For better maintainability, it's good practice to keep these entries sorted alphabetically. Also, the tab alignment for the new incus entry is inconsistent with the rest of the block. I've suggested a change to fix both.
/usr/lib/systemd/system/buildkit.*\t\t--\tgen_context(system_u:object_r:container_unit_file_t,s0)\n/usr/lib/systemd/system/containerd.*\t\t--\tgen_context(system_u:object_r:container_unit_file_t,s0)\n/usr/lib/systemd/system/docker.*\t\t--\tgen_context(system_u:object_r:container_unit_file_t,s0)\n/usr/lib/systemd/system/incus.*\t\t--\tgen_context(system_u:object_r:container_unit_file_t,s0)\n/usr/lib/systemd/system/lxd.*\t\t--\tgen_context(system_u:object_r:container_unit_file_t,s0)
| /var/lib/registry(/.*)? gen_context(system_u:object_r:container_var_lib_t,s0) | ||
| /var/lib/incus(/.*)? gen_context(system_u:object_r:container_var_lib_t,s0) | ||
| /var/lib/lxc(/.*)? gen_context(system_u:object_r:container_var_lib_t,s0) | ||
| /var/lib/lxd(/.*)? gen_context(system_u:object_r:container_var_lib_t,s0) | ||
| /var/lib/docker(/.*)? gen_context(system_u:object_r:container_var_lib_t,s0) |
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.
For better maintainability, it's good practice to keep these entries sorted alphabetically.
/var/lib/docker(/.*)?\tgen_context(system_u:object_r:container_var_lib_t,s0)\n/var/lib/incus(/.*)?\tgen_context(system_u:object_r:container_var_lib_t,s0)\n/var/lib/lxc(/.*)?\tgen_context(system_u:object_r:container_var_lib_t,s0)\n/var/lib/lxd(/.*)?\tgen_context(system_u:object_r:container_var_lib_t,s0)\n/var/lib/registry(/.*)?\tgen_context(system_u:object_r:container_var_lib_t,s0)
| /var/log/kube-apiserver(/.*)? gen_context(system_u:object_r:container_log_t,s0) | ||
|
|
||
| /var/log/incus(/.*)? gen_context(system_u:object_r:container_log_t,s0) | ||
| /var/log/lxc(/.*)? gen_context(system_u:object_r:container_log_t,s0) | ||
| /var/log/lxd(/.*)? gen_context(system_u:object_r:container_log_t,s0) |
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.
For better maintainability, it's good practice to keep these entries sorted alphabetically.
/var/log/incus(/.*)?\t\tgen_context(system_u:object_r:container_log_t,s0)\n/var/log/kube-apiserver(/.*)?\t\tgen_context(system_u:object_r:container_log_t,s0)\n/var/log/lxc(/.*)?\t\tgen_context(system_u:object_r:container_log_t,s0)\n/var/log/lxd(/.*)?\t\tgen_context(system_u:object_r:container_log_t,s0)
|
/packit retest-failed |
lsm5
left a comment
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.
LGTM
@haircommander @rhatdan PTAL
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: Conan-Kudo, lsm5, sourcery-ai[bot] The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
47635f3 to
ea2140a
Compare
|
Tests failed. @containers/packit-build please check. |
Incus is a community-maintained fork of LXD and largely works the same way as LXD, thus it's straightforward to support. Signed-off-by: Neal Gompa <[email protected]>
ea2140a to
d0a42db
Compare
|
/lgtm |
Incus is a community-maintained fork of LXD and largely works the same way as LXD, thus it's straightforward to support.
Summary by Sourcery
New Features: