Using FDSTORE=1 to store an accepted TCP socket #13570
eriksjolund
started this conversation in
General
Replies: 1 comment 8 replies
-
The function
(see conmon doesn't handle such messages (see conn_sock.c). It looks like passing an accepted TCP socket from a container process to systemd running on the host is not possible with the current podman/conmon implementation. (I would guess that such functionality is not expected by any specification/standard so this is not a bug) |
Beta Was this translation helpful? Give feedback.
8 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Is it possible to use
FDSTORE=1
(seeman sd_notify
) to store an accepted TCP socket from a containerized server?I started to investigate this. Here is a minimal example
https://github.com/eriksjolund/systemd-restart-service-fdstore
where a server stores an accepted TCP socket with
FDSTORE=1
the first time the server is started.The server talks to a client but every nth time it receives a string from the client, the server will call
exit(EXIT_FAILURE)
.systemd notices the failure and starts the server again, but now systemd also passes in the previously stored
accepted TCP socket file descriptor.
The client will not notice the restart because the TCP connection is not closed.
The example server worked when running it directly on the host! The next thing to try out is running the server from a container with Podman. Let's see how that goes. A first test didn't succeed, so some more testing is needed.
Beta Was this translation helpful? Give feedback.
All reactions