-
Notifications
You must be signed in to change notification settings - Fork 28
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
Enable setting cgroup v2 mode in std edition #114
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -10,3 +10,5 @@ LIMA_INSTALL_LOGROTATE=true | |||||
LIMA_INSTALL_OPENSSH_SFTP_SERVER=true | ||||||
LIMA_INSTALL_SSHFS=true | ||||||
LIMA_INSTALL_TINI=true | ||||||
|
||||||
LIMA_INSTALL_CGROUP_CONF=true | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Instead of 2 variables (
Suggested change
But given that this is the default, this setting should not be made in export LIMA_CGROUP_MODE= Note that I removed the |
Original file line number | Diff line number | Diff line change | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
@@ -293,6 +293,11 @@ if [ "${LIMA_INSTALL_CRI_DOCKERD}" == "true" ]; then | |||||||||||||||||
cp /home/build/cri-dockerd.license "${tmp}/usr/share/doc/cri-dockerd/LICENSE" | ||||||||||||||||||
fi | ||||||||||||||||||
|
||||||||||||||||||
if [ "${LIMA_INSTALL_CGROUP_CONF}" == "true" ]; then | ||||||||||||||||||
mkdir -p "${tmp}/etc/conf.d" | ||||||||||||||||||
echo 'rc_cgroup_mode=${LIMA_ALPINE_CGROUP_MODE:-hybrid}' >> ${tmp}/etc/conf.d/cgroups | ||||||||||||||||||
fi | ||||||||||||||||||
Comment on lines
+296
to
+299
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thank you for your review and suggestion. I apologize for my insufficient explanation. In this PR, the intention is not to specify the cgroup mode at the time of the Alpine image build, but rather to make it possible to set the cgroup mode at the time of lima boot. Specifically, I intended to start the lima machine as env:
LIMA_ALPINE_CGROUP_MODE: unified In other words, this PR creates a file
So that at the time of lima machine startup:
With the above, at machine startup, cgroups can be selected using environment variables in a lima template, eliminating the need to prepare separate Alpine images for each cgroup mode. (I included the string Based on the above intentions, would you say the modification is appropriate? Or is the modification policy inappropriate? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I have uploaded the images, which can be used to test the above behavior, at the following location: https://github.com/na0x2c6/alpine-lima/releases/tag/v0.2.32-std-cgroup-experimental |
||||||||||||||||||
|
||||||||||||||||||
mkdir -p "${tmp}/etc" | ||||||||||||||||||
mkdir -p "${tmp}/proc" | ||||||||||||||||||
mkdir -p "${tmp}/usr" | ||||||||||||||||||
|
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.
This line is not needed; the line above is exporting all
LIMA_*
environment variables into the container automatically. The 3 variables below are exceptions because they are renaming variables that don't start withLIMA_*
on the host.