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

container: T6702: re-add missing UNIX API socket (backport #4034) #4039

Merged
merged 1 commit into from
Sep 9, 2024

Conversation

mergify[bot]
Copy link
Contributor

@mergify mergify bot commented Sep 9, 2024

Change Summary

During podman upgrade and a build from the original source the UNIX socket definition for systemd got lost in translation.

This commit re-adds the UNIX socket which is started on boot to interact with Podman.

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)

How to test

Example:

curl --unix-socket /run/podman/podman.sock -H 'content-type: application/json' -sf http://localhost/containers/json

yields:

[{'AdjustCPUShares': False,
  'Command': 'sh',
  'Config': None,
  'Created': 1725638554,
  'Id': '816d8d00fdb069219513352bd741b05d547242166951d7044a73c51091fed6ae',
  'Image': 'docker.io/library/busybox:stable',
  'ImageID': 'sha256:87ff76f62d367950186bde563642e39208c0e2b4afc833b4b3b01b8fef60ae9e',
  'Labels': {'PODMAN_SYSTEMD_UNIT': 'vyos-container-c1.service'},
  'Mounts': [],
  'Name': '',
  'Names': ['/c1'],
  'NetworkSettings': {'Networks': {'host': {'Aliases': None,
                                            'DriverOpts': None,
                                            'EndpointID': '',
                                            'Gateway': '',
                                            'GlobalIPv6Address': '',
                                            'GlobalIPv6PrefixLen': 0,
                                            'IPAMConfig': None,
                                            'IPAddress': '',
                                            'IPPrefixLen': 0,
                                            'IPv6Gateway': '',
                                            'Links': None,
                                            'MacAddress': '',
                                            'NetworkID': 'host'}}},
  'NetworkingConfig': None,
  'Platform': None,
  'Ports': [],
  'State': 'running',
  'Status': 'Up Less than a second'}]

Smoketest result

[email protected]:~$ /usr/libexec/vyos/tests/smoke/cli/test_container.py
test_api_socket (__main__.TestContainer.test_api_socket) ... ok
test_basic (__main__.TestContainer.test_basic) ... ok
test_cpu_limit (__main__.TestContainer.test_cpu_limit) ... ok
test_dual_stack_network (__main__.TestContainer.test_dual_stack_network) ... ok
test_ipv4_network (__main__.TestContainer.test_ipv4_network) ... ok
test_ipv6_network (__main__.TestContainer.test_ipv6_network) ... ok
test_uid_gid (__main__.TestContainer.test_uid_gid) ... ok

----------------------------------------------------------------------
Ran 7 tests in 124.777s

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

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

During podman upgrade and a build from the original source the UNIX socket
definition for systemd got lost in translation.

This commit re-adds the UNIX socket which is started on boot to interact with
Podman.

Example:
  curl --unix-socket /run/podman/podman.sock -H 'content-type: application/json' \
    -sf http://localhost/containers/json
(cherry picked from commit f67e217)
@mergify mergify bot requested a review from a team as a code owner September 9, 2024 13:25
@github-actions github-actions bot added the sagitta VyOS 1.4 LTS label Sep 9, 2024
Copy link

github-actions bot commented Sep 9, 2024

👍
No issues in PR Title / Commit Title

@sever-sever sever-sever merged commit 92504ce into sagitta Sep 9, 2024
8 checks passed
@mergify mergify bot deleted the mergify/bp/sagitta/pr-4034 branch September 9, 2024 14:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
sagitta VyOS 1.4 LTS
Development

Successfully merging this pull request may close these issues.

3 participants