Skip to content

Commit

Permalink
Merge pull request #4832 from smarterclayton/stop_using_old_mode
Browse files Browse the repository at this point in the history
Merged by openshift-bot
  • Loading branch information
OpenShift Bot authored Aug 9, 2017
2 parents 5fe4c8c + c71bed7 commit 57db372
Show file tree
Hide file tree
Showing 28 changed files with 60 additions and 288 deletions.
6 changes: 6 additions & 0 deletions playbooks/common/openshift-cluster/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,12 @@
- docker_image_availability
- docker_storage

- hosts: localhost
tasks:
- fail:
msg: No etcd hosts defined. Running an all-in-one master is deprecated and will no longer be supported in a future upgrade.
when: groups.oo_etcd_to_config | default([]) | length == 0 and not openshift_master_unsupported_all_in_one | default(False)

- include: initialize_oo_option_facts.yml
tags:
- always
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
with_items:
- etcd_container
- openvswitch
- "{{ openshift.common.service_type }}-master"
- "{{ openshift.common.service_type }}-master-api"
- "{{ openshift.common.service_type }}-master-controllers"
- "{{ openshift.common.service_type }}-node"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
- name: Stop containerized services
service: name={{ item }} state=stopped
with_items:
- "{{ openshift.common.service_type }}-master"
- "{{ openshift.common.service_type }}-master-api"
- "{{ openshift.common.service_type }}-master-controllers"
- "{{ openshift.common.service_type }}-node"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,23 +9,16 @@
local_facts:
ha: "{{ groups.oo_masters_to_config | length > 1 }}"

- name: Ensure Master is running
service:
name: "{{ openshift.common.service_type }}-master"
state: started
enabled: yes
when: openshift.master.ha is defined and not openshift.master.ha | bool and openshift.common.is_containerized | bool

- name: Ensure HA Master is running
service:
name: "{{ openshift.common.service_type }}-master-api"
state: started
enabled: yes
when: openshift.master.ha is defined and openshift.master.ha | bool and openshift.common.is_containerized | bool
when: openshift.common.is_containerized | bool

- name: Ensure HA Master is running
service:
name: "{{ openshift.common.service_type }}-master-controllers"
state: started
enabled: yes
when: openshift.master.ha is defined and openshift.master.ha | bool and openshift.common.is_containerized | bool
when: openshift.common.is_containerized | bool
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,9 @@

- include_vars: ../../../../roles/openshift_master/vars/main.yml

- name: Remove any legacy systemd units
include: ../../../../roles/openshift_master/tasks/clean_systemd_units.yml

- name: Update systemd units
include: ../../../../roles/openshift_master/tasks/systemd_units.yml

Expand Down
5 changes: 0 additions & 5 deletions playbooks/common/openshift-master/restart_services.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,4 @@
---
- name: Restart master
service:
name: "{{ openshift.common.service_type }}-master"
state: restarted
when: not openshift_master_ha | bool
- name: Restart master API
service:
name: "{{ openshift.common.service_type }}-master-api"
Expand Down
1 change: 0 additions & 1 deletion playbooks/common/openshift-node/restart.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
with_items:
- etcd_container
- openvswitch
- "{{ openshift.common.service_type }}-master"
- "{{ openshift.common.service_type }}-master-api"
- "{{ openshift.common.service_type }}-master-controllers"
- "{{ openshift.common.service_type }}-node"
Expand Down
4 changes: 0 additions & 4 deletions roles/nuage_master/handlers/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,6 @@
become: yes
systemd: name=nuage-openshift-monitor state=restarted

- name: restart master
systemd: name={{ openshift.common.service_type }}-master state=restarted
when: (not openshift_master_ha | bool) and (not master_service_status_changed | default(false))

- name: restart master api
systemd: name={{ openshift.common.service_type }}-master-api state=restarted
when: >
Expand Down
9 changes: 2 additions & 7 deletions roles/openshift_cfme/handlers/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,14 @@
# See: https://github.com/openshift/openshift-ansible/pull/4041#discussion_r118770782
######################################################################

- name: restart master
systemd: name={{ openshift.common.service_type }}-master state=restarted
when: (openshift.master.ha is not defined or not openshift.master.ha | bool) and (not (master_service_status_changed | default(false) | bool))
notify: Verify API Server

- name: restart master api
systemd: name={{ openshift.common.service_type }}-master-api state=restarted
when: (openshift.master.ha is defined and openshift.master.ha | bool) and (not (master_api_service_status_changed | default(false) | bool)) and openshift.master.cluster_method == 'native'
when: (not (master_api_service_status_changed | default(false) | bool)) and openshift.master.cluster_method == 'native'
notify: Verify API Server

- name: restart master controllers
systemd: name={{ openshift.common.service_type }}-master-controllers state=restarted
when: (openshift.master.ha is defined and openshift.master.ha | bool) and (not (master_controllers_service_status_changed | default(false) | bool)) and openshift.master.cluster_method == 'native'
when: (not (master_controllers_service_status_changed | default(false) | bool)) and openshift.master.cluster_method == 'native'

- name: Verify API Server
# Using curl here since the uri module requires python-httplib2 and
Expand Down
5 changes: 0 additions & 5 deletions roles/openshift_hosted_logging/handlers/main.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,4 @@
---
- name: restart master
systemd: name={{ openshift.common.service_type }}-master state=restarted
when: (openshift.master.ha is not defined or not openshift.master.ha | bool) and (not (master_service_status_changed | default(false) | bool))
notify: Verify API Server

- name: Verify API Server
# Using curl here since the uri module requires python-httplib2 and
# wait_for port doesn't provide health information.
Expand Down
9 changes: 2 additions & 7 deletions roles/openshift_hosted_metrics/handlers/main.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,12 @@
---
- name: restart master
systemd: name={{ openshift.common.service_type }}-master state=restarted
when: (openshift.master.ha is not defined or not openshift.master.ha | bool) and (not (master_service_status_changed | default(false) | bool))
notify: Verify API Server

- name: restart master api
systemd: name={{ openshift.common.service_type }}-master-api state=restarted
when: (openshift.master.ha is defined and openshift.master.ha | bool) and (not (master_api_service_status_changed | default(false) | bool)) and openshift.master.cluster_method == 'native'
when: (not (master_api_service_status_changed | default(false) | bool)) and openshift.master.cluster_method == 'native'
notify: Verify API Server

- name: restart master controllers
systemd: name={{ openshift.common.service_type }}-master-controllers state=restarted
when: (openshift.master.ha is defined and openshift.master.ha | bool) and (not (master_controllers_service_status_changed | default(false) | bool)) and openshift.master.cluster_method == 'native'
when: (not (master_controllers_service_status_changed | default(false) | bool)) and openshift.master.cluster_method == 'native'

- name: Verify API Server
# Using curl here since the uri module requires python-httplib2 and
Expand Down
9 changes: 2 additions & 7 deletions roles/openshift_logging/handlers/main.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,12 @@
---
- name: restart master
systemd: name={{ openshift.common.service_type }}-master state=restarted
when: (openshift.master.ha is not defined or not openshift.master.ha | bool) and (not (master_service_status_changed | default(false) | bool))
notify: Verify API Server

- name: restart master api
systemd: name={{ openshift.common.service_type }}-master-api state=restarted
when: (openshift.master.ha is defined and openshift.master.ha | bool) and (not (master_api_service_status_changed | default(false) | bool)) and openshift.master.cluster_method == 'native'
when: (not (master_api_service_status_changed | default(false) | bool)) and openshift.master.cluster_method == 'native'
notify: Verify API Server

- name: restart master controllers
systemd: name={{ openshift.common.service_type }}-master-controllers state=restarted
when: (openshift.master.ha is defined and openshift.master.ha | bool) and (not (master_controllers_service_status_changed | default(false) | bool)) and openshift.master.cluster_method == 'native'
when: (not (master_controllers_service_status_changed | default(false) | bool)) and openshift.master.cluster_method == 'native'

- name: Verify API Server
# Using curl here since the uri module requires python-httplib2 and
Expand Down
23 changes: 0 additions & 23 deletions roles/openshift_master/files/atomic-openshift-master.service

This file was deleted.

23 changes: 0 additions & 23 deletions roles/openshift_master/files/origin-master.service

This file was deleted.

9 changes: 2 additions & 7 deletions roles/openshift_master/handlers/main.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,12 @@
---
- name: restart master
systemd: name={{ openshift.common.service_type }}-master state=restarted
when: (openshift.master.ha is not defined or not openshift.master.ha | bool) and (not (master_service_status_changed | default(false) | bool))
notify: Verify API Server

- name: restart master api
systemd: name={{ openshift.common.service_type }}-master-api state=restarted
when: (openshift.master.ha is defined and openshift.master.ha | bool) and (not (master_api_service_status_changed | default(false) | bool)) and openshift.master.cluster_method == 'native'
when: (not (master_api_service_status_changed | default(false) | bool)) and openshift.master.cluster_method == 'native'
notify: Verify API Server

- name: restart master controllers
systemd: name={{ openshift.common.service_type }}-master-controllers state=restarted
when: (openshift.master.ha is defined and openshift.master.ha | bool) and (not (master_controllers_service_status_changed | default(false) | bool)) and openshift.master.cluster_method == 'native'
when: (not (master_controllers_service_status_changed | default(false) | bool)) and openshift.master.cluster_method == 'native'

- name: Verify API Server
# Using curl here since the uri module requires python-httplib2 and
Expand Down
5 changes: 5 additions & 0 deletions roles/openshift_master/tasks/clean_systemd_units.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---

- name: Disable master service
systemd: name={{ openshift.common.service_type }}-master state=stopped enabled=no masked=yes
ignore_errors: true
1 change: 0 additions & 1 deletion roles/openshift_master/tasks/files

This file was deleted.

Loading

0 comments on commit 57db372

Please sign in to comment.