From a61046b23b36e17a584d41678ddb8879afdacf2c Mon Sep 17 00:00:00 2001 From: Giuseppe Scrivano Date: Fri, 15 Sep 2017 17:00:49 +0200 Subject: [PATCH 1/2] node,syscontainer: initialize dnsmasq Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1482239 Signed-off-by: Giuseppe Scrivano --- images/node/system-container/manifest.json | 1 + images/node/system-container/service.template | 8 ++++++++ 2 files changed, 9 insertions(+) diff --git a/images/node/system-container/manifest.json b/images/node/system-container/manifest.json index e067921953dd..c5bcd0e4053e 100644 --- a/images/node/system-container/manifest.json +++ b/images/node/system-container/manifest.json @@ -1,6 +1,7 @@ { "version": "1.0", "defaultValues": { + "DNS_DOMAIN": "cluster.local", "ORIGIN_CONFIG_DIR": "/etc/origin", "ORIGIN_DATA_DIR": "/var/lib/origin", "MASTER_SERVICE": "atomic-openshift-master.service", diff --git a/images/node/system-container/service.template b/images/node/system-container/service.template index 212a16b8b945..f80b19759d04 100644 --- a/images/node/system-container/service.template +++ b/images/node/system-container/service.template @@ -4,10 +4,18 @@ After=${OPENVSWITCH_SERVICE} Wants=${DOCKER_SERVICE} After=$NAME-dep.service After=${MASTER_SERVICE} +Requires=dnsmasq.service +After=dnsmasq.service [Service] EnvironmentFile=/etc/sysconfig/$NAME EnvironmentFile=/etc/sysconfig/$NAME-dep + +ExecStartPre=/usr/bin/cp /etc/origin/node/node-dnsmasq.conf /etc/dnsmasq.d/ +ExecStartPre=/usr/bin/dbus-send --system --dest=uk.org.thekelleys.dnsmasq /uk/org/thekelleys/dnsmasq uk.org.thekelleys.SetDomainServers array:string:/in-addr.arpa/127.0.0.1,/${DNS_DOMAIN}/127.0.0.1 +ExecStopPost=/usr/bin/rm /etc/dnsmasq.d/node-dnsmasq.conf +ExecStopPost=/usr/bin/dbus-send --system --dest=uk.org.thekelleys.dnsmasq /uk/org/thekelleys/dnsmasq uk.org.thekelleys.SetDomainServers array:string: + ExecStartPre=/bin/bash -c 'export -p > /run/$NAME-env' ExecStart=$EXEC_START ExecStop=$EXEC_STOP From 8ed8c53f7e3403973afd4d0d3fd74692be067e30 Mon Sep 17 00:00:00 2001 From: Giuseppe Scrivano Date: Fri, 15 Sep 2017 17:01:10 +0200 Subject: [PATCH 2/2] node,syscontainer: enable Type=notify sd notifications work well now in runc, so start using them. Signed-off-by: Giuseppe Scrivano --- images/node/system-container/service.template | 1 + 1 file changed, 1 insertion(+) diff --git a/images/node/system-container/service.template b/images/node/system-container/service.template index f80b19759d04..124251dfbf04 100644 --- a/images/node/system-container/service.template +++ b/images/node/system-container/service.template @@ -8,6 +8,7 @@ Requires=dnsmasq.service After=dnsmasq.service [Service] +Type=notify EnvironmentFile=/etc/sysconfig/$NAME EnvironmentFile=/etc/sysconfig/$NAME-dep