weaveworks-guides / weave-net-legacy

Weave Net Old Guides
Apache License 2.0
88 stars 33 forks source link

Could we make the systemd unit files official? #29

Closed Lawouach closed 3 years ago

Lawouach commented 9 years ago

Hi,

I see the CentOS Mesos/Marathon guide provides its own systemd unit files. I find them quite valuable but I'd feel more confident if they were made official somehow. Could they be made part of the main weave repository?

Docker provides similar unit files too: https://github.com/docker/docker/tree/master/contrib/init/systemd

Thanks,

errordeveloper commented 9 years ago

@Lawouach that's a good question! However, I running containers from within systemd is a bit tricky and there is no best way of doing it. I had been trying different approaches and still not convinced which is best to turn into official. Potentially using runc would be a better call, to be very honest.

errordeveloper commented 9 years ago

There is also a question of how should know peers be preserved, see #10.

Lawouach commented 9 years ago

running containers from within systemd is a bit tricky

I wouldn't mind if you could expand on this a bit, out of curiosity.

Potentially using runc would be a better call, to be very honest.

It would be an interesting path indeed. The docker daemon always felt like an unecessary evil to me.

errordeveloper commented 9 years ago

You might want to take a look at the units show in our recent Mesos guide, e.g. weave.service.

errordeveloper commented 9 years ago

running containers from within systemd is a bit tricky

I wouldn't mind if you could expand on this a bit, out of curiosity.

Ok, so the basic issue is that Docker daemon wants to own it's children, and that's technically what systemd desires to do as well. So it's a bit tricky, I've been using docker attach for now, but that doesn't give systemd direct control, as signals would still get proxied to Docker. So you then have to set a stop command, and, in turns, ignore some additional exit codes etc...

Potentially using runc would be a better call, to be very honest.

It would be an interesting path indeed. The docker daemon always felt like an unecessary evil to me.

That's right ;)

Lawouach commented 9 years ago

I see. I think this is why the guys behind Rancher say that using Docker on CoreOS is rather counter-productive.

errordeveloper commented 9 years ago

It's not that bad :smile: