Skip to content
This repository has been archived by the owner on Feb 24, 2020. It is now read-only.

rkt: support socket activated units #106

Closed
philips opened this issue Dec 1, 2014 · 10 comments
Closed

rkt: support socket activated units #106

philips opened this issue Dec 1, 2014 · 10 comments
Assignees
Milestone

Comments

@philips
Copy link
Contributor

philips commented Dec 1, 2014

This should be a straight forward conversion from the ports list to loading in socket units.

@pierreozoux
Copy link

👍

@iaguis
Copy link
Member

iaguis commented Jul 14, 2015

IIUC this is fixed by #214, right?

@alban
Copy link
Member

alban commented Jul 14, 2015

It would be nice to have a test for this :)

@alban
Copy link
Member

alban commented Jul 15, 2015

I would like systemd on the host to listen on a socket for socket activating the container. Then, when an incoming connection triggers the rkt pod to start, the file descriptor would be passed:

  • from systemd on the host to rkt
  • from rkt to stage1's init
  • from init to systemd-nspawn
  • from systemd-nspawn to systemd in the container
  • from systemd in the container to the app

I am not sure #214 does everything and it would be nice to have a test for the complete sequence.

@kneufeld
Copy link

@alban I know this is an ancient bug but I'm trying to get this working. I feel like I'm super close but alas I cannot get it to work.

My question is, can you run your socket accepting daemon directly or do you have to do the systemd-inside-the-container-to-the-app dance?

The docs I've found on this are non-existant or very vague. When trying to pass in a socket what goes in the '--port' parameter of the rkt command line?

Thanks.

@iaguis
Copy link
Member

iaguis commented Apr 21, 2016

Hi!

There's an example in https://github.com/coreos/rkt/blob/master/Documentation/using-rkt-with-systemd.md#socket-activated-service. Have you tried following that?

If after that you still have problems please let us know!

@kneufeld
Copy link

Thanks @iaguis but I did look at that document. I forgot to mention that what I'd like is a container per connection. In other words I want a service named foo@.service.

I did notice the following line on this re-read:

An application needs to be able to accept sockets from systemd's native socket passing interface in order to handle socket activation.

Can rkt not support passing in a socket and attaching it to the apps stdin/stdout? That's how the app currently works and I believe how all inetd started apps work.

@iaguis
Copy link
Member

iaguis commented Apr 21, 2016

Can rkt not support passing in a socket and attaching it to the apps stdin/stdout? That's how the app currently works and I believe how all inetd started apps work.

This is not supported at the moment :(

@kneufeld
Copy link

Well that would explain why I've been unsuccessfully banging my head against the wall. :( indeed.

Thanks for the tech support!

@iaguis
Copy link
Member

iaguis commented Apr 21, 2016

Np. Would you mind filing an issue about it?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

6 participants