Skip to content
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

T6219: Add support for container sysctl parameter (backport #3614) #3630

Merged
merged 2 commits into from
Jun 11, 2024

Conversation

mergify[bot]
Copy link
Contributor

@mergify mergify bot commented Jun 11, 2024

I can't append to #3288, so I took the liberty to build upon it.
Aligned configuration with system sysctl and added completion with allowed sysctl values for container

Change Summary

Allow setting sysctl settings for containers

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Code style update (formatting, renaming)
  • Refactoring (no functional changes)
  • Migration from an old Vyatta component to vyos-1x, please link to related PR inside obsoleted component
  • Other (please describe):

Related Task(s)

https://vyos.dev/T6219

Related PR(s)

#3288

Component(s) name

container

Proposed changes

Adds support for configuring a container with the sysctl option:

container {
    name c1 {
        allow-host-networks
        image "busybox:stable"
        sysctl {
            parameter kernel.msgmax {
                value "8192"
            }
        }
    }
}

How to test

set container name c1 image busybox:stable
set container name c1 allow-host-networks
set container name c1 sysctl parameter kernel.msgmax value 8192

Smoketest result

test_basic (__main__.TestContainer.test_basic) ... ok
test_dual_stack_network (__main__.TestContainer.test_dual_stack_network) ... 
IP address "192.0.2.1" can not be used for a container, reserved for the
container engine!

ok
test_ipv4_network (__main__.TestContainer.test_ipv4_network) ... 
IP address "192.0.2.1" can not be used for a container, reserved for the
container engine!

ok
test_ipv6_network (__main__.TestContainer.test_ipv6_network) ... 
IP address "2001:db8::1" can not be used for a container, reserved for
the container engine!

ok
test_uid_gid (__main__.TestContainer.test_uid_gid) ... 
Cannot set "gid" without "uid" for container

ok

----------------------------------------------------------------------
Ran 5 tests in 146.650s

Checklist:

  • I have read the CONTRIBUTING document
  • I have linked this PR to one or more Phabricator Task(s)
  • I have run the components SMOKETESTS if applicable
  • My commit headlines contain a valid Task id
  • My change requires a change to the documentation
  • I have updated the documentation accordingly

This is an automatic backport of pull request #3614 done by [Mergify](https://mergify.com).

@mergify mergify bot requested a review from a team as a code owner June 11, 2024 07:41
@mergify mergify bot requested review from dmbaturin, sarthurdev, zdc, jestabro, sever-sever and c-po and removed request for a team June 11, 2024 07:41
@c-po c-po merged commit 730bb8a into circinus-stream Jun 11, 2024
2 checks passed
@mergify mergify bot deleted the mergify/bp/circinus-stream/pr-3614 branch June 11, 2024 08:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

Successfully merging this pull request may close these issues.

4 participants