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

T6358: Container config option to enable host pid #3472

Merged
merged 2 commits into from
May 17, 2024
Merged

Conversation

nvollmar
Copy link
Contributor

@nvollmar nvollmar commented May 17, 2024

Change Summary

Container config option allow-host-pid to enable host pid

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/T6358

Component(s) name

container

How to test

Create a container with option allow-host-pid which should add --pid host to the run commands.

set container name c02 allow-host-networks
set container name c02 allow-host-pid
set container name c02 image 'busybox:stable'

Smoketest result

vyos@vyos:~$ /usr/libexec/vyos/tests/smoke/cli/test_container.py
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 165.785s

OK

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

@sever-sever sever-sever requested review from a team, dmbaturin, sarthurdev, zdc, jestabro and c-po and removed request for a team May 17, 2024 09:02
@c-po
Copy link
Member

c-po commented May 17, 2024

@Mergifyio backport sagitta

@c-po c-po merged commit e53dd75 into vyos:current May 17, 2024
7 of 8 checks passed
Copy link
Contributor

mergify bot commented May 17, 2024

backport sagitta

✅ Backports have been created

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.

3 participants