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 #4034

Merged
merged 1 commit into from
Sep 9, 2024
Merged

Conversation

c-po
Copy link
Member

@c-po c-po commented Sep 6, 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

@c-po
Copy link
Member Author

c-po commented Sep 6, 2024

@Mergifyio backport sagitta circinus

Copy link

github-actions bot commented Sep 6, 2024

👍
No issues in PR Title / Commit Title

Copy link

mergify bot commented Sep 6, 2024

backport sagitta circinus

✅ Backports have been created

Copy link

github-actions bot commented Sep 6, 2024

✅ No issues found in unused-imports check.. Please refer the workflow run

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
@c-po c-po merged commit b9076dd into vyos:current Sep 9, 2024
13 of 15 checks passed
@c-po c-po deleted the podman-api branch September 9, 2024 13:24
c-po added a commit that referenced this pull request Sep 9, 2024
container: T6702: re-add missing UNIX API socket (backport #4034)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

3 participants