core/unit: search shared namespace in transitive relation of JoinsNamespaceOf=
authorYu Watanabe <watanabe.yu+github@gmail.com>
Thu, 25 May 2023 09:08:37 +0000 (18:08 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Fri, 26 May 2023 06:23:57 +0000 (15:23 +0900)
commit83123a44989c095f9b7a89841db9917417fc451a
treebcaff0ac9571ffb142586c28ba70546e2c53c1a8
parenta60f96fcf55c3452e5b13d6daec537af1909eda3
core/unit: search shared namespace in transitive relation of JoinsNamespaceOf=

Previously, dependency chain of JoinsNamespaceOf= did not work, e.g.
- a.service has JoinsNamespaceOf=b.service
- b.service has JoinsNamespaceOf=c.service
if, first c.service, next a.service, finally b.service is started,
then a.service is not joined to the namespace of c.service. And, as
mentioned in the document, the namespace used by b.service is not
deterministic.

This makes when searching exsiting namespace to be joined, all units in
the transitive dependency of JoinsNamespaceOf= are checked.
src/core/unit.c
src/core/unit.h
test/testsuite-23.units/testsuite-23-joins-namespace-of-7.service
test/testsuite-23.units/testsuite-23-joins-namespace-of-8.service
test/testsuite-23.units/testsuite-23-joins-namespace-of-9.service