[systemd-devel] Host and machine ids are equal (4c93d957bcf44b289c3e4edb5bd5c355): refusing to link journals

Lennart Poettering lennart at poettering.net
Fri May 16 10:40:44 PDT 2014


On Tue, 29.04.14 22:18, Ruben Kerkhof (ruben at rubenkerkhof.com) wrote:

> 
> On Mon, Apr 28, 2014 at 9:04 PM, Ruben Kerkhof <ruben at rubenkerkhof.com> wrote:
> > I would have expected that to be 'Initializing machine ID from container UUID.'
> > container_uuid is set in the environment:
> >
> > [root at testcontainer ~]# tr '\0' '\n' < /proc/1/environ | grep container
> >
> > container=systemd-nspawn
> > container_uuid=d9611cfff0114c7c8c762fe4154f7ed3
> 
> I think I know what's wrong.
> systemd-nspawn --uuid takes a 36-character uuid string.
> It is converted to sd_128_t arg_uuid in nspawn.c:parse_args
> and then placed in the environment of pid 1 as 32-character string:
> if (asprintf((char**)(envp + n_env++), "container_uuid="
> SD_ID128_FORMAT_STR, SD_ID128_FORMAT_VAL(arg_uuid)) < 0)
> 
> machine-id-setup.c:generate however expects a 36-character string in
> the environment.

Indeed!

Fixed in git. Could you verify if this now works for you?

Thanks!

Lennart

-- 
Lennart Poettering, Red Hat


More information about the systemd-devel mailing list