summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSeth Jennings <sjenning@redhat.com>2016-03-28 11:02:57 -0500
committerSeth Jennings <sjenning@redhat.com>2016-03-28 11:49:43 -0500
commit93d48b330e500bd45a91c4dc7dc3d89fd000dfc4 (patch)
tree671ff9b7ede1291d6e6abaf3aa9f7db39c6fb23d
parent0961451fe7bc601ffbd3dccfdfb4eb3364a1eb2d (diff)
downloadopenshift-93d48b330e500bd45a91c4dc7dc3d89fd000dfc4.tar.gz
openshift-93d48b330e500bd45a91c4dc7dc3d89fd000dfc4.tar.bz2
openshift-93d48b330e500bd45a91c4dc7dc3d89fd000dfc4.tar.xz
openshift-93d48b330e500bd45a91c4dc7dc3d89fd000dfc4.zip
make docker service want ose containerized services
There are points where the docker service is restarted during the install. Sometimes the services that are PartOf docker.service do not get restarted when docker is restarted. https://bugzilla.redhat.com/show_bug.cgi?id=1318948 Systemd documentation recommends using "wants" as the perferred means of creating startup linkages between units. This patch makes the ose services wanted by the docker service rather than multi-user.target. This creates a downward link from the docker service to the ose containerized services.
-rw-r--r--roles/etcd/templates/etcd.docker.service2
-rw-r--r--roles/openshift_master/templates/docker-cluster/atomic-openshift-master-api.service.j22
-rw-r--r--roles/openshift_master/templates/docker-cluster/atomic-openshift-master-controllers.service.j22
-rw-r--r--roles/openshift_master/templates/docker/master.docker.service.j22
-rw-r--r--roles/openshift_node/templates/openshift.docker.node.service2
-rw-r--r--roles/openshift_node/templates/openvswitch.docker.service2
6 files changed, 6 insertions, 6 deletions
diff --git a/roles/etcd/templates/etcd.docker.service b/roles/etcd/templates/etcd.docker.service
index defc070bd..b8dbefa64 100644
--- a/roles/etcd/templates/etcd.docker.service
+++ b/roles/etcd/templates/etcd.docker.service
@@ -13,4 +13,4 @@ SyslogIdentifier=etcd_container
Restart=always
[Install]
-WantedBy=multi-user.target
+WantedBy=docker.service
diff --git a/roles/openshift_master/templates/docker-cluster/atomic-openshift-master-api.service.j2 b/roles/openshift_master/templates/docker-cluster/atomic-openshift-master-api.service.j2
index 6a21a04ab..5e6577d95 100644
--- a/roles/openshift_master/templates/docker-cluster/atomic-openshift-master-api.service.j2
+++ b/roles/openshift_master/templates/docker-cluster/atomic-openshift-master-api.service.j2
@@ -22,5 +22,5 @@ SyslogIdentifier={{ openshift.common.service_type }}-master-api
Restart=always
[Install]
-WantedBy=multi-user.target
+WantedBy=docker.service
WantedBy={{ openshift.common.service_type }}-node.service
diff --git a/roles/openshift_master/templates/docker-cluster/atomic-openshift-master-controllers.service.j2 b/roles/openshift_master/templates/docker-cluster/atomic-openshift-master-controllers.service.j2
index 69f68d843..04c84a84a 100644
--- a/roles/openshift_master/templates/docker-cluster/atomic-openshift-master-controllers.service.j2
+++ b/roles/openshift_master/templates/docker-cluster/atomic-openshift-master-controllers.service.j2
@@ -21,4 +21,4 @@ SyslogIdentifier={{ openshift.common.service_type }}-master-controllers
Restart=on-failure
[Install]
-WantedBy=multi-user.target
+WantedBy=docker.service
diff --git a/roles/openshift_master/templates/docker/master.docker.service.j2 b/roles/openshift_master/templates/docker/master.docker.service.j2
index b714fdeb7..6bd0dcf56 100644
--- a/roles/openshift_master/templates/docker/master.docker.service.j2
+++ b/roles/openshift_master/templates/docker/master.docker.service.j2
@@ -14,4 +14,4 @@ ExecStop=/usr/bin/docker stop {{ openshift.common.service_type }}-master
Restart=always
[Install]
-WantedBy=multi-user.target
+WantedBy=docker.service
diff --git a/roles/openshift_node/templates/openshift.docker.node.service b/roles/openshift_node/templates/openshift.docker.node.service
index 65d2291bb..a8accca47 100644
--- a/roles/openshift_node/templates/openshift.docker.node.service
+++ b/roles/openshift_node/templates/openshift.docker.node.service
@@ -19,4 +19,4 @@ SyslogIdentifier={{ openshift.common.service_type }}-node
Restart=always
[Install]
-WantedBy=multi-user.target
+WantedBy=docker.service
diff --git a/roles/openshift_node/templates/openvswitch.docker.service b/roles/openshift_node/templates/openvswitch.docker.service
index 047f66fda..8052a3a39 100644
--- a/roles/openshift_node/templates/openvswitch.docker.service
+++ b/roles/openshift_node/templates/openvswitch.docker.service
@@ -13,4 +13,4 @@ SyslogIdentifier=openvswitch
Restart=always
[Install]
-WantedBy=multi-user.target
+WantedBy=docker.service