Commit Graph

7 Commits

Author SHA1 Message Date
Kirill A. Korinsky 8715d9a33a
Avoid keeping @docker_cli_[UUID] files
Seems that OpenBSD behaves like darwin and requires to unlink all
socket, after it was used.

Tested on OpenBSD 7.4

Signed-off-by: Kirill A. Korinsky <kirill@korins.ky>
(cherry picked from commit 2c214241fa)
Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2024-03-04 11:34:38 +01:00
Laura Brehm 1cbc218c05
tests: add plugin-socket-compatibility tests
Adds a new plugin to the e2e plugins that simulates an older
plugin binary and a test suite to ensure older plugin binaries
keep behaving the same with newer CLI versions.

Signed-off-by: Laura Brehm <laurabrehm@hey.com>
(cherry picked from commit cfa9fef77d)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-02-06 21:31:55 +01:00
Laura Brehm d8e07c9c47
tests: add tests for `cli-plugins/socket`
Signed-off-by: Laura Brehm <laurabrehm@hey.com>
(cherry picked from commit 469bfc05ed)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-02-06 21:31:52 +01:00
Tonis Tiigi 4e097c643d
socket: return from loop after EOF
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
(cherry picked from commit 8cd3b00420)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-01-20 13:45:39 +01:00
Laura Brehm 508346ef61
plugins: fix plugin socket being closed before use
Signed-off-by: Laura Brehm <laurabrehm@hey.com>
2024-01-15 15:48:57 +00:00
Bjorn Neergaard 6d0b329b0d
cli-plugins: use non-abstract socket on darwin
As macOS does not support the abstract socket namespace, use a temporary
socket in $TMPDIR to connect with the plugin. Ensure this socket is
cleaned up even in the case of crash/ungraceful termination by removing
it after the first connection is accepted.

Co-authored-by: Laura Brehm <laurabrehm@hey.com>
Signed-off-by: Bjorn Neergaard <bjorn.neergaard@docker.com>
2024-01-12 12:30:27 -07:00
Bjorn Neergaard dbf992f91f
cli-plugins: move socket code into common package
Signed-off-by: Bjorn Neergaard <bjorn.neergaard@docker.com>
2024-01-12 11:49:25 -07:00