Re: [systemd-devel] ip forwarding

2015-11-05 Thread Peter Paule
Hi Johannes, I had the same problem, I even wrote an article about that (https://www.fedux.org/articles/2015/09/09/having-no-fun-with-rubygems-systemd-docker-and-networking.html). I think, you use `systemd-networkd`. Correct? The behaviour is documented in "systemd.network-manual". Note: unles

Re: [systemd-devel] Delete stale *.journal-files from containers

2015-10-29 Thread Peter Paule
Hi Mantas, journald doesn't know all possible ways other machines' journals might appear here – the directory might belong to a *running* container, it might be written to over NFS by a thin client (where the client's journald might have different policies), it might be imported by journal-remot

[systemd-devel] Delete stale *.journal-files from containers

2015-10-28 Thread Peter Paule
delete` to get rid of stale old `journal`.files? I tried `MaxRetentionSec=1day` and `MaxTimeSec=1day`, but none of this made `systemd-journald` to delete the `system.journal`-files. Thanks a lot. Cheers, Peter Paule ___ systemd-devel mailing li

Re: [systemd-devel] systemd-nspawn --setenv=SOMETHING=other: What is that for?

2015-10-25 Thread Peter Paule
ster/TODO#L60. Please ping me, if you opened the FR/PR. Cheers, Peter Paule ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel

Re: [systemd-devel] Pass environment variables down to systemd-service in container

2015-06-18 Thread Peter Paule
Excerpts from Lennart Poettering's message of 2015-06-18 20:07:50 +0200: > On Tue, 16.06.15 17:49, Peter Paule (systemd-de...@fedux.org) wrote: > > I'd be willing to add a setting called PassEnvironment= that takes a > list of env vars to import from PID1's env

Re: [systemd-devel] Pass environment variables down to systemd-service in container

2015-06-16 Thread Peter Paule
Excerpts from Lennart Poettering's message of 2015-06-15 00:32:09 +0200: > > Nope, we deliberately clean up the env block we pass to services. > Mmmh, would it possible to add some kind of a whitelist for environment variables to the systemd- and/or service.unit-configuration for variables which

[systemd-devel] Pass environment variables down to systemd-service in container

2015-06-12 Thread Peter Paule
Hi there, is there a chance to pass (the given) environment variables down to `unicorn` and `delayed_job-worker`? systemd (host) | - docker-app.service Environment="RAILS_ENV=production" Environment="DATABASE_URL=postgresql://localhost/app_development"

Re: [systemd-devel] Shutting down service using systemd-nspawn

2015-06-12 Thread Peter Paule
> Not sure I follow: why do this indirectly by killing nspawn? > Why not send this to the container init directly? > > Note that if you know the nspawn PID, you can derive the external PID > of the init process easily by reading > /proc/$PID/task/$PID/children. It will only container one PID, and

Re: [systemd-devel] Shutting down service using systemd-nspawn

2015-05-06 Thread Peter Paule
> I implemented this now: > > http://cgit.freedesktop.org/systemd/systemd/commit/?id=c6c8f6e218995852350e5e35c080dec788c42c3f Thanks a lot. Sorry, have seen your mail to late - I'm trying out a new mua (sup) and I'm not that familiar with it yet. Do you think it makes sense to add something lik

Re: [systemd-devel] Shutting down service using systemd-nspawn

2015-05-06 Thread Peter Paule
Sorry for the late reply. Thanks for the explanation. > I'd be willing to take a patch that adds --kill-signal= that allows > changing the kill signal from SIGRTMIN+3 to anything else. With that > you could use --kill-signal=SIGTERM to get the behaviour you want... Hopefully someone else can help

Re: [systemd-devel] [systemd-nspawn] nginx: [emerg] open() "/dev/stderr" failed (6: No such device or address)

2015-04-29 Thread Peter Paule
> What precisely is the setting you picked? I used this setting: error_log /dev/stderr warn But I must admit, I thought that this is the default of the Arch Linux package. But they use this setting in their nginx-package: error_log stderr Here's their service-unit [Unit] Description=A

Re: [systemd-devel] [systemd-nspawn] nginx: [emerg] open() "/dev/stderr" failed (6: No such device or address)

2015-04-27 Thread Peter Paule
> Hmm, but that already lists a native config keyword for "stderr"? > Yes, I saw that too late. I copied the default configuration of the Arch Linux nginx package and used that. ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://l

Re: [systemd-devel] [systemd-nspawn] nginx: [emerg] open() "/dev/stderr" failed (6: No such device or address)

2015-04-27 Thread Peter Paule
> I'm guessing from the error message that it's not a shell script but nginx > itself configured to use "/dev/stderr" as its log file, so there's no >& > that could be used... Correct - see http://nginx.org/en/docs/ngx_core_module.html Syntax: error_log file | stderr | syslog:

Re: [systemd-devel] [systemd-nspawn] nginx: [emerg] open() "/dev/stderr" failed (6: No such device or address)

2015-04-26 Thread Peter Paule
Maybe syslog will do the trick? BTW: Do I need a syslog daemon to receive messages on UDP 514, or is/will be systemd-journal-remote able to handle this? Didn't found a clue about that in the man-page. ___ systemd-devel mailing list systemd-devel@lists.

Re: [systemd-devel] [systemd-nspawn] nginx: [emerg] open() "/dev/stderr" failed (6: No such device or address)

2015-04-26 Thread Peter Paule
Excerpts from Lennart Poettering's message of 2015-04-24 16:40:07 +0200: > > Hmm, I'm pretty sure the default StandardOutput=journal means stdout > > will be a socket connection to journald, doesn't it? > > Ah, true! > > > (And since it's a process-specific thing, "echo "asdf" > /dev/stdout" > >

Re: [systemd-devel] [systemd-nspawn] nginx: [emerg] open() "/dev/stderr" failed (6: No such device or address)

2015-04-26 Thread Peter Paule
> What happens if you use "dd" to write to /dev/stdout? Does that work, > too? (i think that bash handles /dev/stderr specially when you use it > with redirection, that's why I am asking). I modified the unit file to use dd instead of nginx. I can reproduce the issue. By mistake I forgot to add th

[systemd-devel] importd assumes mkfs.btrfs is installed

2015-04-25 Thread Peter Paule
Hi Lennart, I prepared a virtual machine to investigate the nginx-issue. This virtual machine is very very basic and had no mkfs.btrfs installed and no native btrfs-fs available. When I tried to download a new dkr-image machine, I got the following error. This error disappear after I installed th

[systemd-devel] [systemd-nspawn] nginx: [emerg] open() "/dev/stderr" failed (6: No such device or address)

2015-04-24 Thread Peter Paule
Hi, I run nginx in a CentOS 7.0 container via systemd-nspawn. nginx logs to stderr/stdout via configuration to capture logs via journald. nginx.conf error_log /dev/stderr warn; If I use systemd 219-1 (-1 is the package number of Arch Linux) which seems to be a non-patched systemd 219,

Re: [systemd-devel] Check if systems is container in "systemd-remount-fs.service"

2015-04-16 Thread Peter Paule
Excerpts from Lennart Poettering's message of 2015-04-08 23:55:31 +0200: > On Tue, 17.03.15 10:54, Peter Paule (systemd-de...@fedux.org) wrote: > > > Hi, > > > > does it make sense to check if the system is started as a container in > > "systemd-remount-f

Re: [systemd-devel] machinectl login : Failed to get machine PTY: Unit container-getty@0.service failed to load: No such file or directory.

2015-03-20 Thread Peter Paule
Thanks a lot. I will try out the new image with the getty-service unit inside. Quoting David Herrmann : Hi On Fri, Mar 20, 2015 at 11:11 AM, Peter Paule wrote: Quoting David Herrmann : Gnah! If I had any idea how the automake magic with unit-files works, I could help you. Just to

Re: [systemd-devel] machinectl login : Failed to get machine PTY: Unit container-getty@0.service failed to load: No such file or directory.

2015-03-20 Thread Peter Paule
Quoting David Herrmann : Gnah! If I had any idea how the automake magic with unit-files works, I could help you. Just to clarify the setup. :-) Host: Arch Linux with systemd from git Container: CentOS 7 with "stock" systemd The getty-service file is available on the Arch Linux-host, but is

[systemd-devel] machinectl login : Failed to get machine PTY: Unit container-getty@0.service failed to load: No such file or directory.

2015-03-17 Thread Peter Paule
Hi, starting a container works fine. I'm running now systemd from git. Last commit is 1b41981d9a62443d566df6bcabc1b5024e9f5e4a which changes things with "container-getty". $ sudo machinectl start test-server $ sudo machinectl status test-server test-server Since: Tue 201

Re: [systemd-devel] Failed to register machine: Unit machine-test\x2dserver.scope already exists.

2015-03-17 Thread Peter Paule
-server Spawning container test-server on /var/lib/machines/.#test-serverd200e7948d69f51e. Press ^] three times within 1s to kill container. Failed to register machine: Unit machine-test\x2dserver.scope already exists. In some cases the error does not occure. /pp Quoting Peter Paule : Hi

[systemd-devel] Failed to register machine: Unit machine-test\x2dserver.scope already exists.

2015-03-17 Thread Peter Paule
Hi, after killing a container started via "systemd-nspawn" I get the following error message: Failed to register machine: Unit machine-test\x2dserver.scope already exists. Using google I found the following bug report: https://bugs.freedesktop.org/show_bug.cgi?id=68370 I'm running A

[systemd-devel] Check if systems is container in "systemd-remount-fs.service"

2015-03-17 Thread Peter Paule
Hi, does it make sense to check if the system is started as a container in "systemd-remount-fs.service" and only start the service if the system is NOT a container? [Unit] Description=Remount Root and Kernel File Systems Documentation=man:systemd-remount-fs.service(8) Documentation=http://www

Re: [systemd-devel] Unable to remove images using machinectl

2015-03-11 Thread Peter Paule
Excerpts from Lennart Poettering's message of 2015-03-03 11:40:54 +0100: > On Tue, 03.03.15 07:11, Peter Paule (systemd-de...@fedux.org) wrote: > > > Excerpts from Erik Johnson's message of 2015-03-02 14:10:06 -0700: > > > Thanks. I applied the patch, re

Re: [systemd-devel] Linking containers

2015-03-11 Thread Peter Paule
Excerpts from Peter Paule's message of 2015-03-02 18:49:42 +0100: > > I am not sure I want to talk a TCP/TLS based protocol just to add a > > interface to a local switch. > > > > To integrate this stuff closely they should either provide a C > > library, or a bus API or something similar, but hav

Re: [systemd-devel] Unable to remove images using machinectl

2015-03-02 Thread Peter Paule
Excerpts from Erik Johnson's message of 2015-03-02 14:10:06 -0700: > Thanks. I applied the patch, restarted dbus, and now I get the > following after a 20-30 second pause: @Erik Did you use the aur package or did you compile systemd and install it using make? Do you have experience rolling back to

Re: [systemd-devel] Errors using machinectl pull-tar and machinectl pull-dkr

2015-03-02 Thread Peter Paule
Quoting Lennart Poettering : I am not really sure, it sounds slightly problematic regarding security since it would not be clear anymore what you get if you ask for a specific name. Mmmh... I see it more like another source of images. In yum I can add as much repositories as I like. I think

Re: [systemd-devel] Errors using machinectl pull-tar and machinectl pull-dkr

2015-03-02 Thread Peter Paule
Quoting Lennart Poettering : I wonder if we can use --trustdb-name /dev/null I think, no. I got a weird error using /dev/null % strace -e file -o /tmp/blub1 gpg --no-options --no-default-keyring --no-auto-key-locate --no-auto-check-trustdb --batch --trust-model=always --keyring=/usr/lib/sy

Re: [systemd-devel] Errors using machinectl pull-tar and machinectl pull-dkr

2015-03-02 Thread Peter Paule
Quoting Lennart Poettering : Thanks for clarifying this. :-) Any ETA for this? I'm looking for better integrated solution "into" systemd than docker and I really like the idea of having a systemd-daemon managing the containers. This is actually in place now in git. The first time you invoke on

Re: [systemd-devel] Errors using machinectl pull-tar and machinectl pull-dkr

2015-03-01 Thread Peter Paule
Hi, is it ok for you to have a configuration file for machined? It would be wonderful if one could add the dkr index url to that file because for me it's always the same. And maybe you could also support multiple values for the url to support private and public registries at the same time: 1. Lo

[systemd-devel] Remote api for systemd via separate daemon

2015-02-28 Thread Peter Paule
While reading the news about dkr swarm and seeing what's going on at CoreOS' fleet, a mail to the ML from 2013 came into my mind. There was someone asking for some network API for systemd, if I remember correctly. I think the answer was no, because you don't want systemd to be exposed to the "oute

Re: [systemd-devel] Linking containers

2015-02-26 Thread Peter Paule
Excerpts from Lennart Poettering's message of 2015-02-25 19:57:10 +0100: > dhcp client you mean? Yes. > In general, I am not really keen on doing IP configuration in > nspawn. We have one solution for doing IP configuration already in > systemd, and that's networkd, and it's a ton more powerful t

[systemd-devel] Logroate + Pass signal to executable in container (nspawn)

2015-02-23 Thread Peter Paule
Hi, I run "nginx" in a container which itself is under systemd-control. All error messages are put to stderr and the incomming requests are logged in access.log. To reduce the filesize I want to rotate the access.log. I see two possibilities to make nginx release the file handle: * Restart ser

[systemd-devel] machinectl: Support for cache cleaning

2015-02-23 Thread Peter Paule
Hi Lennart, after getting the "Permission Denied"-error mentioned in one of my previous mails, which went away when running "importd" under root: Got 1% of https://registry-1.docker.io/v1/images/e03153f199183f91a9ee47334e65c7155d8619ef35c8158da80d0790af05ad98/layer. 2min 50s left at 187

Re: [systemd-devel] Removing image from /var/lib/machines

2015-02-22 Thread Peter Paule
Does it make sense to avoid copying /etc/resolv.conf to a container if the filesystem is read-only? sudo /usr/bin/systemd-nspawn --read-only -M docker-centos-nginx --read-only /usr/sbin/nginx Failed to copy /etc/resolv.conf to /var/lib/machines/docker-centos-nginx/etc/resolv.conf: Rea

Re: [systemd-devel] Removing image from /var/lib/machines

2015-02-21 Thread Peter Paule
Excerpts from Peter Paule's message of 2015-02-21 19:42:49 +0100: > I tried 219 on a different machine as well. I got some "Permission > denied errors" for importd as well. I "fixed" them by running importd > from console as root. The errors occured when I tried to download a > docker image from in

Re: [systemd-devel] Removing image from /var/lib/machines

2015-02-20 Thread Peter Paule
Zitat von Lennart Poettering : On Thu, 19.02.15 19:46, Peter Paule (systemd-de...@fedux.org) wrote: BTW: --dkr-index-url cannot handle http redirects By accident I tried "http://index.docker.io"; and this will be redirected to "https://index.docker.io"; but importd can

Re: [systemd-devel] Updating existing docker image via machinectl

2015-02-20 Thread Peter Paule
Here's a small patch for changing the documentation. add_hint_for_updating_local_dkr_image.patch Description: Binary data ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel

Re: [systemd-devel] Updating existing docker image via machinectl

2015-02-20 Thread Peter Paule
Zitat von Lennart Poettering : If you invoke pull-dkr again, you can remove and replace the writable snapshot with "--force", or you can simply give it a new name by specifying it at the end of the command line. dkr doesn't know the concept of updating containers that have already been written

[systemd-devel] Updating existing docker image via machinectl

2015-02-20 Thread Peter Paule
Hi, what needs to be done to update an existing docker image? Pulling it again "fails" with "Image '' already exists". sudo machinectl pull-dkr maxmeyer/test-server --dkr-index-url https://index.docker.io --verify=no Enqueued transfer job 1. Press C-c to continue download in background

Re: [systemd-devel] Removing image from /var/lib/machines

2015-02-19 Thread Peter Paule
BTW: --dkr-index-url cannot handle http redirects By accident I tried "http://index.docker.io"; and this will be redirected to "https://index.docker.io"; but importd cannot handle this. ___ systemd-devel mailing list systemd-devel@lists.freedeskto

[systemd-devel] Removing image from /var/lib/machines

2015-02-19 Thread Peter Paule
Hi Lennart, I reformatted my partition and tried again. :-) Importing now works, if I disabled the verification. Feb 19 :52 host systemd-importd[483]: (transfer1) Pulling 'https://cloud-images.ubuntu.com/trusty/current/trusty-server-cloudimg-amd64-root.tar.gz', saving as 'tr Feb 19 :5

[systemd-devel] Fw: Errors using machinectl pull-tar and machinectl pull-dkr

2015-02-17 Thread Peter Paule
I tried systemd 219 on another system as well using some more debug options. Here's the outcome of this. 1) Checking signature of tar.gz failed there as well There's an error complaining about missing permissions to access "/root/.gnupg/trustdb.gpg". It doesn't matter if the file exist. The

[systemd-devel] Errors using machinectl pull-tar and machinectl pull-dkr

2015-02-17 Thread Peter Paule
Hi there, I tried "machinectl" from systemd 219 on Arch Linux (testing) today: I got two errors. Should we discuss this here or should I open a Bug Report? 1) Download if tar-file (http://www.freedesktop.org/software/systemd/man/machinectl.html#Examples) # machinectl pull-tar https:/