nspawn: always setup machine id
authorMichal Sekletar <msekleta@redhat.com>
Fri, 8 Apr 2016 11:22:54 +0000 (13:22 +0200)
committerMichal Sekletar <msekleta@redhat.com>
Mon, 11 Apr 2016 14:43:16 +0000 (16:43 +0200)
commite01ff70a77e781734e1e73a2238af2e9bf7967a8
tree8235651af0b93081b1db89026bdbc061540263ee
parent710a8858a930a13da8dabbba61d64eb8f420b448
nspawn: always setup machine id

We check /etc/machine-id of the container and if it is already populated
we use value from there, possibly ignoring value of --uuid option from
the command line. When dealing with R/O image we setup transient machine
id.

Once we determined machine id of the container, we use this value for
registration with systemd-machined and we also export it via
container_uuid environment variable.

As registration with systemd-machined is done by the main nspawn process
we communicate container machine id established by setup_machine_id from
outer child to the main process by unix domain socket. Similarly to PID
of inner child.
Makefile.am
TODO
man/systemd-nspawn.xml
src/nspawn/nspawn.c