[systemd-devel] Redirecting logfile to journald

2016-07-24 Thread Juanjo Presa
Hi, I'm running a service that only writes output to log file, not
configurable. Then I'm trying to link the log file to /dev/stdout but I
guess that is not enough to be received by journald because is not working.

As I've read here: https://github.com/coreos/rkt/issues/2640 really
/dev/stdout is redirected to /proc/self/fd/1 and then to a journald
inaccesible socket.

Is there another way to feed journald?
Maybe an systemd-cat wrapper, but I'm trying hard to get rid of shell
scripts.

I'm running:

systemd 229
+PAM +AUDIT +SELINUX +IMA +APPARMOR +SMACK +SYSVINIT +UTMP +LIBCRYPTSETUP
+GCRYPT +GNUTLS +ACL +XZ -LZ4 +SECCOMP +BLKID +ELFUTILS +KMOD -IDN

Ubuntu 16.04.1 LTS (Xenial Xerus)

Thanks in advance.
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] systemd-nspawn overlay and rootfs

2016-08-19 Thread Juanjo Presa
Ok, thanks for your reply.

Any suggestion to achieve something similar? I'm trying with btrfs
subvolumes but I don't get to make union of /usr from OS subvolume with
/usr from runtime subvolume

Nowadays I'm workarouding with:

systemd-nspawn
--overlay=/var/lib/machines/os/usr:/var/lib/machines/runtime/usr:/usr -D
/var/lib/machines/os --machine=foo -b -x

On Fri, Aug 19, 2016 at 1:02 PM, Lennart Poettering <lenn...@poettering.net>
wrote:

> On Tue, 16.08.16 15:43, Juanjo Presa (juan...@gmail.com) wrote:
>
> > Hi, I'm trying to compose a container with several layers and join
> together
> > with overlay option but seems that is not supported.
> >
> > I want to get something like:
> > systemd-nspawn --overlay=/foo/ubuntu-base:/foo/app-runtime:/foo/app:/ -D
> > /foo/bar --boot
> >
> > Maybe I'm misunderstanding the overlay option.
> >
> > So, what do you suggest to accomplish a similar model. Maybe just mount
> the
> > desired overlay sideways in /foo/bar and dismiss systemd-nspawn overlay
> > option? Something similar with btrfs subvolumes?
> >
> > Thanks in advance.
>
> Yeah, we currently do not support overlayfs as root dir, see
>
> https://github.com/systemd/systemd/issues/3847
>
> We should probably make that work. But do note that overlayfs
> introduces as many new problems as it solves IRL... Because of that
> there's no first level support for it in place right now (i.e. no
> support for using it as backing for --ephemeral or so).
>
> Lennart
>
> --
> Lennart Poettering, Red Hat
>
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel


[systemd-devel] systemd-nspawn overlay and rootfs

2016-08-16 Thread Juanjo Presa
Hi, I'm trying to compose a container with several layers and join together
with overlay option but seems that is not supported.

I want to get something like:
systemd-nspawn --overlay=/foo/ubuntu-base:/foo/app-runtime:/foo/app:/ -D
/foo/bar --boot

Maybe I'm misunderstanding the overlay option.

So, what do you suggest to accomplish a similar model. Maybe just mount the
desired overlay sideways in /foo/bar and dismiss systemd-nspawn overlay
option? Something similar with btrfs subvolumes?

Thanks in advance.
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] How to deploy systemd-nspawn containers and use for deployment

2016-10-20 Thread Juanjo Presa
I am comfortable with machinectl nowadays but maybe I miss some kind of
versioning of images generated. Do you have any advice or recommendation
about this?

On Thu, Oct 20, 2016 at 2:41 AM, Nathan Williams 
wrote:

> Fwiw, if you're using Chef, the impending release of v3 of the systemd
> cookbook has a machine_image and a machine resource, which use importd and
> nspawn under the hood.
>
> On Wed, Oct 19, 2016, 3:45 PM Lennart Poettering 
> wrote:
>
>> On Thu, 13.10.16 01:09, Brian Kroth (bpkr...@gmail.com) wrote:
>>
>> > Seems really dependent upon the container layout as to what's the most
>> > appropriate way of doing that. For instance, if the underlying fs of the
>> > source container is something like btrfs or zfs you could imagine doing
>> a
>> > send/recv of a golden snapshot. Possibly also for an lvm
>> volume/snapshot.
>> > For others rsync might be best. For others maybe it's just a deployment
>> > script or tar or git repo.
>>
>> Yeah, to make this clear: I doubt we should really be in the
>> deployment business too much. That's for other people to solve, for
>> example rkt.
>>
>> However, I do think the most basic bits should probably be available,
>> simply to get developers off the ground for the most basic testing. I
>> figure that means "machinectl migrate" (as suggested in the other
>> mail) is really as good as it might get, and anything fancier should
>> really be left to other projects.
>>
>> Lennart
>>
>> --
>> Lennart Poettering, Red Hat
>> ___
>> systemd-devel mailing list
>> systemd-devel@lists.freedesktop.org
>> https://lists.freedesktop.org/mailman/listinfo/systemd-devel
>>
>
> ___
> systemd-devel mailing list
> systemd-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/systemd-devel
>
>
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] How to deploy systemd-nspawn containers and use for deployment

2016-10-28 Thread Juanjo Presa
What about rkt with systemd?

https://coreos.com/rkt/docs/latest/using-rkt-with-systemd.html

Any experiences?

On Thu, Oct 20, 2016 at 2:02 PM, Lennart Poettering <lenn...@poettering.net>
wrote:

> On Thu, 20.10.16 12:35, Juanjo Presa (juan...@gmail.com) wrote:
>
> > I am comfortable with machinectl nowadays but maybe I miss some kind of
> > versioning of images generated. Do you have any advice or recommendation
> > about this?
>
> Versioning is hard. We have no concept for that in nspawn/machined,
> and right now I have no good suggeston about it, except maybe that you
> could include a version identifier in the container's name, the same
> way deb/rpm packages do it...
>
> Lennart
>
> --
> Lennart Poettering, Red Hat
>
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel


[systemd-devel] upgrade/rollbacks

2016-12-12 Thread Juanjo Presa
Hello,

I am researching about the different systems of transactional (atomic)
upgrades and rollbacks in linux. Namely, ubuntu core, rpm-ostree, coreos.
Which of them is more in line with the systemd philosophy? I personally
like the coreos chrome-based system based on GPT partitions, but I doubt if
it's the right view.

Any advice?
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel


[systemd-devel] container into systemd-nspawn machine

2017-11-06 Thread Juanjo Presa
Hi,
I am trying to run concourse CI (CI that run build process into
docker/runc/whatever containers) on systemd-nspawn. I will try to explain
what i do:

1.- First I make a .raw file that install/setup app (with mkosi).
2.- Run concourse container with "systemd-nspawn -bi concourse.raw
--capability=all". App works but fails when starting docker container:

runc create: exit status 1: container_linux.go:264: starting container
process caused "process_linux.go:261: applying cgroup configuration for
process caused \"mkdir
/sys/fs/cgroup/cpuset/8638cb95-bbbc-4719-4509-5a1789fb100a: read-only file
system\""

3.- Run binding cgroups filesystem rw with: "systemd-nspawn -bi
concourse.raw --capability=all --bind=/sys/fs/cgroup". Failing again with:

runc create: exit status 1: container_linux.go:264: starting container
process caused "process_linux.go:339: container init caused
\"rootfs_linux.go:69: creating device nodes caused \\"no such file or
directory\\"\""

Do you have any hint about how can I solve this problem? Thanks in advance.


My system setup, both host and container:
$ cat /etc/issue
Ubuntu 17.10 \n \l

$ systemctl --version
systemd 234 +PAM +AUDIT +SELINUX +IMA +APPARMOR +SMACK +SYSVINIT +UTMP
+LIBCRYPTSETUP +GCRYPT +GNUTLS +ACL +XZ +LZ4 +SECCOMP +BLKID +ELFUTILS
+KMOD -IDN2 +IDN default-hierarchy=hybrid
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel


[systemd-devel] Best way to run upstream systemd

2018-07-18 Thread Juanjo Presa
I wonder which ways are to run last systemd versions? nowadays Im running
Centos 7 with systemd facebook backports (
https://github.com/facebookincubator/rpm-backports). But maybe you guys
have another way, NixOs? Archlinux?

Tyvm.
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel