diff options
author | Michael Gugino <mgugino@redhat.com> | 2017-10-12 12:08:48 -0400 |
---|---|---|
committer | Michael Gugino <mgugino@redhat.com> | 2017-10-12 12:08:48 -0400 |
commit | f71a729eda62cf1f2855183a28774053eb3ea96f (patch) | |
tree | 71642e045faaa94241e16d019008b24a3fe3f0f7 /roles/openshift_node/tasks | |
parent | 45725a38dd8ee6db16a89144f1e14c30f98440b8 (diff) | |
download | openshift-f71a729eda62cf1f2855183a28774053eb3ea96f.tar.gz openshift-f71a729eda62cf1f2855183a28774053eb3ea96f.tar.bz2 openshift-f71a729eda62cf1f2855183a28774053eb3ea96f.tar.xz openshift-f71a729eda62cf1f2855183a28774053eb3ea96f.zip |
Fix containerized node service unit placement order
Currently, non-containerized nodes have systemd
service unit files created after registry auth
credentials are created. Containerized nodes
place service unit files prior to creation of
these credentials.
This commit ensures systemd service units
are created at the correct time for both
containerized and non-containerized nodes.
Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1500642
Diffstat (limited to 'roles/openshift_node/tasks')
4 files changed, 3 insertions, 15 deletions
diff --git a/roles/openshift_node/tasks/bootstrap.yml b/roles/openshift_node/tasks/bootstrap.yml index b83b2c452..6bd2df362 100644 --- a/roles/openshift_node/tasks/bootstrap.yml +++ b/roles/openshift_node/tasks/bootstrap.yml @@ -29,7 +29,7 @@ line: "{% raw %}ExecStart=/usr/bin/openshift start node --bootstrap --kubeconfig=${KUBECONFIG} $OPTIONS{% endraw %}" regexp: "^ExecStart=.*" -- name: "systemctl enable {{ openshift_service_type }}-node" +- name: "disable {{ openshift_service_type }}-node and {{ openshift_service_type }}-master services" systemd: name: "{{ item }}" enabled: no diff --git a/roles/openshift_node/tasks/config/install-node-docker-service-file.yml b/roles/openshift_node/tasks/config/install-node-docker-service-file.yml deleted file mode 100644 index f92ff79b5..000000000 --- a/roles/openshift_node/tasks/config/install-node-docker-service-file.yml +++ /dev/null @@ -1,8 +0,0 @@ ---- -- name: Install Node docker service file - template: - dest: "/etc/systemd/system/{{ openshift.common.service_type }}-node.service" - src: openshift.docker.node.service - notify: - - reload systemd units - - restart node diff --git a/roles/openshift_node/tasks/install.yml b/roles/openshift_node/tasks/install.yml index 265bf2c46..1539d6e3b 100644 --- a/roles/openshift_node/tasks/install.yml +++ b/roles/openshift_node/tasks/install.yml @@ -27,5 +27,3 @@ docker pull {{ openshift.node.node_image }}:{{ openshift_image_tag }} register: pull_result changed_when: "'Downloaded newer image' in pull_result.stdout" - - - include: config/install-node-docker-service-file.yml diff --git a/roles/openshift_node/tasks/systemd_units.yml b/roles/openshift_node/tasks/systemd_units.yml index 6b4490f61..9c182ade6 100644 --- a/roles/openshift_node/tasks/systemd_units.yml +++ b/roles/openshift_node/tasks/systemd_units.yml @@ -1,11 +1,9 @@ --- -# This file is included both in the openshift_master role and in the upgrade -# playbooks. - name: Install Node service file template: dest: "/etc/systemd/system/{{ openshift.common.service_type }}-node.service" - src: "node.service.j2" - when: not openshift.common.is_containerized | bool + src: "{{ openshift.common.is_containerized | bool | ternary('openshift.docker.node.service', 'node.service.j2') }}" + when: not openshift.common.is_node_system_container | bool notify: - reload systemd units - restart node |