Browse Source

Merge pull request #4832 from smarterclayton/stop_using_old_mode

Merged by openshift-bot
OpenShift Bot 7 years ago
parent
commit
57db37245e
28 changed files with 60 additions and 288 deletions
  1. 6 0
      playbooks/common/openshift-cluster/config.yml
  2. 0 1
      playbooks/common/openshift-cluster/upgrades/docker/restart.yml
  3. 0 1
      playbooks/common/openshift-cluster/upgrades/docker/upgrade.yml
  4. 2 9
      playbooks/common/openshift-cluster/upgrades/pre/verify_control_plane_running.yml
  5. 3 0
      playbooks/common/openshift-cluster/upgrades/upgrade_control_plane.yml
  6. 0 5
      playbooks/common/openshift-master/restart_services.yml
  7. 0 1
      playbooks/common/openshift-node/restart.yml
  8. 0 4
      roles/nuage_master/handlers/main.yaml
  9. 2 7
      roles/openshift_cfme/handlers/main.yml
  10. 0 5
      roles/openshift_hosted_logging/handlers/main.yml
  11. 2 7
      roles/openshift_hosted_metrics/handlers/main.yml
  12. 2 7
      roles/openshift_logging/handlers/main.yml
  13. 0 23
      roles/openshift_master/files/atomic-openshift-master.service
  14. 0 23
      roles/openshift_master/files/origin-master.service
  15. 2 7
      roles/openshift_master/handlers/main.yml
  16. 5 0
      roles/openshift_master/tasks/clean_systemd_units.yml
  17. 0 1
      roles/openshift_master/tasks/files
  18. 19 67
      roles/openshift_master/tasks/main.yml
  19. 0 12
      roles/openshift_master/tasks/system_container.yml
  20. 12 67
      roles/openshift_master/tasks/systemd_units.yml
  21. 2 3
      roles/openshift_master/templates/master.yaml.v1.j2
  22. 0 18
      roles/openshift_master/templates/master_docker/master.docker.service.j2
  23. 0 1
      roles/openshift_master/vars/main.yml
  24. 1 1
      roles/openshift_master_facts/tasks/main.yml
  25. 2 7
      roles/openshift_metrics/handlers/main.yml
  26. 0 2
      roles/openshift_node_upgrade/tasks/main.yml
  27. 0 1
      roles/openshift_node_upgrade/tasks/restart.yml
  28. 0 8
      roles/openshift_service_catalog/tasks/wire_aggregator.yml

+ 6 - 0
playbooks/common/openshift-cluster/config.yml

@@ -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

+ 0 - 1
playbooks/common/openshift-cluster/upgrades/docker/restart.yml

@@ -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"

+ 0 - 1
playbooks/common/openshift-cluster/upgrades/docker/upgrade.yml

@@ -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"

+ 2 - 9
playbooks/common/openshift-cluster/upgrades/pre/verify_control_plane_running.yml

@@ -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

+ 3 - 0
playbooks/common/openshift-cluster/upgrades/upgrade_control_plane.yml

@@ -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
 

+ 0 - 5
playbooks/common/openshift-master/restart_services.yml

@@ -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"

+ 0 - 1
playbooks/common/openshift-node/restart.yml

@@ -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"

+ 0 - 4
roles/nuage_master/handlers/main.yaml

@@ -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: >

+ 2 - 7
roles/openshift_cfme/handlers/main.yml

@@ -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

+ 0 - 5
roles/openshift_hosted_logging/handlers/main.yml

@@ -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.

+ 2 - 7
roles/openshift_hosted_metrics/handlers/main.yml

@@ -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

+ 2 - 7
roles/openshift_logging/handlers/main.yml

@@ -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

+ 0 - 23
roles/openshift_master/files/atomic-openshift-master.service

@@ -1,23 +0,0 @@
-[Unit]
-Description=Atomic OpenShift Master
-Documentation=https://github.com/openshift/origin
-After=network-online.target
-After=etcd.service
-Before=atomic-openshift-node.service
-Requires=network-online.target
-
-[Service]
-Type=notify
-EnvironmentFile=/etc/sysconfig/atomic-openshift-master
-Environment=GOTRACEBACK=crash
-ExecStart=/usr/bin/openshift start master --config=${CONFIG_FILE} $OPTIONS
-LimitNOFILE=131072
-LimitCORE=infinity
-WorkingDirectory=/var/lib/origin/
-SyslogIdentifier=atomic-openshift-master
-Restart=always
-RestartSec=5s
-
-[Install]
-WantedBy=multi-user.target
-WantedBy=atomic-openshift-node.service

+ 0 - 23
roles/openshift_master/files/origin-master.service

@@ -1,23 +0,0 @@
-[Unit]
-Description=Origin Master Service
-Documentation=https://github.com/openshift/origin
-After=network-online.target
-After=etcd.service
-Before=origin-node.service
-Requires=network-online.target
-
-[Service]
-Type=notify
-EnvironmentFile=/etc/sysconfig/origin-master
-Environment=GOTRACEBACK=crash
-ExecStart=/usr/bin/openshift start master --config=${CONFIG_FILE} $OPTIONS
-LimitNOFILE=131072
-LimitCORE=infinity
-WorkingDirectory=/var/lib/origin/
-SyslogIdentifier=origin-master
-Restart=always
-RestartSec=5s
-
-[Install]
-WantedBy=multi-user.target
-WantedBy=origin-node.service

+ 2 - 7
roles/openshift_master/handlers/main.yml

@@ -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

+ 5 - 0
roles/openshift_master/tasks/clean_systemd_units.yml

@@ -0,0 +1,5 @@
+---
+
+- name: Disable master service
+  systemd: name={{ openshift.common.service_type }}-master state=stopped enabled=no masked=yes
+  ignore_errors: true

+ 0 - 1
roles/openshift_master/tasks/files

@@ -1 +0,0 @@
-../files

+ 19 - 67
roles/openshift_master/tasks/main.yml

@@ -12,16 +12,16 @@
 # HA Variable Validation
 - fail:
     msg: "openshift_master_cluster_method must be set to either 'native' or 'pacemaker' for multi-master installations"
-  when: openshift_master_ha | bool and ((openshift_master_cluster_method is not defined) or (openshift_master_cluster_method is defined and openshift_master_cluster_method not in ["native", "pacemaker"]))
+  when: openshift.master.ha | bool and ((openshift.master.cluster_method is not defined) or (openshift.master.cluster_method is defined and openshift.master.cluster_method not in ["native", "pacemaker"]))
 - fail:
     msg: "'native' high availability is not supported for the requested OpenShift version"
-  when: openshift_master_ha | bool and openshift_master_cluster_method == "native" and not openshift.common.version_gte_3_1_or_1_1 | bool
+  when: openshift.master.ha | bool and openshift.master.cluster_method == "native" and not openshift.common.version_gte_3_1_or_1_1 | bool
 - fail:
     msg: "openshift_master_cluster_password must be set for multi-master installations"
-  when: openshift_master_ha | bool and openshift_master_cluster_method == "pacemaker" and (openshift_master_cluster_password is not defined or not openshift_master_cluster_password)
+  when: openshift.master.ha | bool and openshift.master.cluster_method == "pacemaker" and (openshift_master_cluster_password is not defined or not openshift_master_cluster_password)
 - fail:
     msg: "Pacemaker based HA is not supported at this time when used with containerized installs"
-  when: openshift_master_ha | bool and openshift_master_cluster_method == "pacemaker" and openshift.common.is_containerized | bool
+  when: openshift.master.ha | bool and openshift.master.cluster_method == "pacemaker" and openshift.common.is_containerized | bool
 
 - name: Install Master package
   package:
@@ -57,7 +57,6 @@
   args:
     creates: "{{ openshift_master_policy }}"
   notify:
-    - restart master
     - restart master api
     - restart master controllers
 
@@ -67,7 +66,6 @@
     dest: "{{ openshift_master_scheduler_conf }}"
     backup: true
   notify:
-    - restart master
     - restart master api
     - restart master controllers
 
@@ -146,6 +144,9 @@
     local_facts:
       no_proxy_etcd_host_ips: "{{ openshift_no_proxy_etcd_host_ips }}"
 
+- name: Remove the legacy master service if it exists
+  include: clean_systemd_units.yml
+
 - name: Install the systemd units
   include: systemd_units.yml
 
@@ -162,7 +163,6 @@
     mode: 0600
   when: openshift.master.session_auth_secrets is defined and openshift.master.session_encryption_secrets is defined
   notify:
-    - restart master
     - restart master api
 
 - set_fact:
@@ -178,66 +178,18 @@
     group: root
     mode: 0600
   notify:
-    - restart master
     - restart master api
     - restart master controllers
 
 - include: set_loopback_context.yml
   when: openshift.common.version_gte_3_2_or_1_2
 
-# TODO: Master startup can fail when ec2 transparently reallocates the block
-# storage, causing etcd writes to temporarily fail. Retry failures blindly just
-# once to allow time for this transient condition to to resolve and for systemd
-# to restart the master (which will eventually succeed).
-#
-# https://github.com/coreos/etcd/issues/3864
-# https://github.com/openshift/origin/issues/6065
-# https://github.com/openshift/origin/issues/6447
-- name: Start and enable master
-  systemd:
-    daemon_reload: yes
-    name: "{{ openshift.common.service_type }}-master"
-    enabled: yes
-    state: started
-  when: not openshift_master_ha | bool
-  register: start_result
-  until: not start_result | failed
-  retries: 1
-  delay: 60
-  notify: Verify API Server
-
-- name: Dump logs from master service if it failed
-  command: journalctl --no-pager -n 100 -u {{ openshift.common.service_type }}-master
-  when: start_result | failed
-
-- name: Stop and disable non-HA master when running HA
-  systemd:
-    name: "{{ openshift.common.service_type }}-master"
-    enabled: no
-    state: stopped
-  when: openshift_master_ha | bool
-  register: task_result
-  failed_when: task_result|failed and 'could not' not in task_result.msg|lower
-
-- set_fact:
-    master_service_status_changed: "{{ start_result | changed }}"
-  when: not openshift_master_ha | bool
-
-- name: Mask master service
-  systemd:
-    name: "{{ openshift.common.service_type }}-master"
-    masked: yes
-  when: >
-    openshift_master_ha | bool and
-    openshift.master.cluster_method == 'native' and
-    not openshift.common.is_containerized | bool
-
 - name: Start and enable master api on first master
   systemd:
     name: "{{ openshift.common.service_type }}-master-api"
     enabled: yes
     state: started
-  when: openshift_master_ha | bool and openshift.master.cluster_method == 'native' and inventory_hostname == openshift_master_hosts[0]
+  when: openshift.master.cluster_method == 'native' and inventory_hostname == openshift_master_hosts[0]
   register: start_result
   until: not start_result | failed
   retries: 1
@@ -249,18 +201,18 @@
 
 - set_fact:
     master_api_service_status_changed: "{{ start_result | changed }}"
-  when: openshift_master_ha | bool and openshift.master.cluster_method == 'native' and inventory_hostname == openshift_master_hosts[0]
+  when: openshift.master.cluster_method == 'native' and inventory_hostname == openshift_master_hosts[0]
 
 - pause:
     seconds: 15
-  when: openshift_master_ha | bool and openshift.master.cluster_method == 'native'
+  when: openshift.master.ha | bool and openshift.master.cluster_method == 'native'
 
 - name: Start and enable master api all masters
   systemd:
     name: "{{ openshift.common.service_type }}-master-api"
     enabled: yes
     state: started
-  when: openshift_master_ha | bool and openshift.master.cluster_method == 'native' and inventory_hostname != openshift_master_hosts[0]
+  when: openshift.master.cluster_method == 'native' and inventory_hostname != openshift_master_hosts[0]
   register: start_result
   until: not start_result | failed
   retries: 1
@@ -272,7 +224,7 @@
 
 - set_fact:
     master_api_service_status_changed: "{{ start_result | changed }}"
-  when: openshift_master_ha | bool and openshift.master.cluster_method == 'native' and inventory_hostname != openshift_master_hosts[0]
+  when: openshift.master.cluster_method == 'native' and inventory_hostname != openshift_master_hosts[0]
 
 # A separate wait is required here for native HA since notifies will
 # be resolved after all tasks in the role.
@@ -293,14 +245,14 @@
   delay: 1
   run_once: true
   changed_when: false
-  when: openshift_master_ha | bool and openshift.master.cluster_method == 'native' and master_api_service_status_changed | bool
+  when: openshift.master.cluster_method == 'native' and master_api_service_status_changed | bool
 
 - name: Start and enable master controller on first master
   systemd:
     name: "{{ openshift.common.service_type }}-master-controllers"
     enabled: yes
     state: started
-  when: openshift_master_ha | bool and openshift.master.cluster_method == 'native' and inventory_hostname == openshift_master_hosts[0]
+  when: openshift.master.cluster_method == 'native' and inventory_hostname == openshift_master_hosts[0]
   register: start_result
   until: not start_result | failed
   retries: 1
@@ -313,14 +265,14 @@
 - name: Wait for master controller service to start on first master
   pause:
     seconds: 15
-  when: openshift_master_ha | bool and openshift.master.cluster_method == 'native'
+  when: openshift.master.cluster_method == 'native'
 
 - name: Start and enable master controller on all masters
   systemd:
     name: "{{ openshift.common.service_type }}-master-controllers"
     enabled: yes
     state: started
-  when: openshift_master_ha | bool and openshift.master.cluster_method == 'native' and inventory_hostname != openshift_master_hosts[0]
+  when: openshift.master.cluster_method == 'native' and inventory_hostname != openshift_master_hosts[0]
   register: start_result
   until: not start_result | failed
   retries: 1
@@ -332,11 +284,11 @@
 
 - set_fact:
     master_controllers_service_status_changed: "{{ start_result | changed }}"
-  when: openshift_master_ha | bool and openshift.master.cluster_method == 'native'
+  when: openshift.master.cluster_method == 'native'
 
 - name: Install cluster packages
   package: name=pcs state=present
-  when: openshift_master_ha | bool and openshift.master.cluster_method == 'pacemaker'
+  when: openshift.master.cluster_method == 'pacemaker'
     and not openshift.common.is_containerized | bool
   register: install_result
 
@@ -345,7 +297,7 @@
     name: pcsd
     enabled: yes
     state: started
-  when: openshift_master_ha | bool and openshift.master.cluster_method == 'pacemaker'
+  when: openshift.master.cluster_method == 'pacemaker'
     and not openshift.common.is_containerized | bool
 
 - name: Set the cluster user password

+ 0 - 12
roles/openshift_master/tasks/system_container.yml

@@ -10,14 +10,6 @@
     atomic containers list --no-trunc -a -f container={{ openshift.common.service_type }}-master
   register: result
 
-- name: Install or Update master system container
-  oc_atomic_container:
-    name: "{{ openshift.common.service_type }}-master"
-    image: "{{ 'docker:' if openshift.common.system_images_registry == 'docker' else openshift.common.system_images_registry + '/' }}{{ openshift.master.master_system_image }}:{{ openshift_image_tag }}"
-    state: latest
-  when:
-    - not l_is_ha
-
 # HA
 - name: Install or Update HA api master system container
   oc_atomic_container:
@@ -26,8 +18,6 @@
     state: latest
     values:
       - COMMAND=api
-  when:
-    - l_is_ha
 
 - name: Install or Update HA controller master system container
   oc_atomic_container:
@@ -36,5 +26,3 @@
     state: latest
     values:
       - COMMAND=controllers
-  when:
-    - l_is_ha

+ 12 - 67
roles/openshift_master/tasks/systemd_units.yml

@@ -22,34 +22,12 @@
   changed_when: "'Downloaded newer image' in pull_result.stdout"
   when: openshift.common.is_containerized | bool and not openshift.common.is_master_system_container | bool
 
-# workaround for missing systemd unit files
-- name: "Create the {{ openshift.common.service_type }} systemd unit file"
-  template:
-    src: "master_docker/master.docker.service.j2"
-    dest: "{{ containerized_svc_dir }}/{{ openshift.common.service_type }}-master.service"
-  when:
-  - openshift.common.is_containerized | bool and (openshift.master.ha is not defined or not openshift.master.ha) | bool
-  - not openshift.common.is_master_system_container | bool
-  register: create_master_unit_file
-
-- name: "Install {{ openshift.common.service_type }} systemd unit file"
-  copy:
-    dest: "/etc/systemd/system/{{ openshift.common.service_type }}-master.service"
-    src: "{{ openshift.common.service_type }}-master.service"
-  register: create_master_unit_file
-  when:
-  - not openshift.common.is_containerized | bool
-  - (openshift.master.ha is not defined or not openshift.master.ha) | bool
-
-- command: systemctl daemon-reload
-  when: create_master_unit_file | changed
-
-- name: Create the ha systemd unit files for api and controller services
+- name: Create the ha systemd unit files
   template:
     src: "{{ ha_svc_template_path }}/atomic-openshift-master-{{ item }}.service.j2"
     dest: "{{ containerized_svc_dir }}/{{ openshift.common.service_type }}-master-{{ item }}.service"
   when:
-  - openshift.master.ha is defined and openshift.master.ha | bool and openshift_master_cluster_method == "native"
+  - openshift.master.cluster_method == "native"
   - not openshift.common.is_master_system_container | bool
   with_items:
   - api
@@ -63,14 +41,14 @@
 - name: Preserve Master API Proxy Config options
   command: grep PROXY /etc/sysconfig/{{ openshift.common.service_type }}-master-api
   register: master_api_proxy
-  when: openshift.master.ha is defined and openshift.master.ha | bool and openshift_master_cluster_method == "native"
+  when: openshift.master.cluster_method == "native"
   failed_when: false
   changed_when: false
 
 - name: Preserve Master API AWS options
   command: grep AWS_ /etc/sysconfig/{{ openshift.common.service_type }}-master-api
   register: master_api_aws
-  when: openshift.master.ha is defined and openshift.master.ha | bool and openshift_master_cluster_method == "native"
+  when: openshift.master.cluster_method == "native"
   failed_when: false
   changed_when: false
 
@@ -79,12 +57,12 @@
     src: "{{ ha_svc_template_path }}/atomic-openshift-master-api.j2"
     dest: /etc/sysconfig/{{ openshift.common.service_type }}-master-api
     backup: true
-  when: openshift.master.ha is defined and openshift.master.ha | bool and openshift_master_cluster_method == "native"
+  when: openshift.master.cluster_method == "native"
   notify:
   - restart master api
 
 - name: Restore Master API Proxy Config Options
-  when: openshift.master.ha is defined and openshift.master.ha | bool and openshift_master_cluster_method == "native"
+  when: openshift.master.cluster_method == "native"
       and master_api_proxy.rc == 0 and 'http_proxy' not in openshift.common and 'https_proxy' not in openshift.common
   lineinfile:
     dest: /etc/sysconfig/{{ openshift.common.service_type }}-master-api
@@ -92,7 +70,7 @@
   with_items: "{{ master_api_proxy.stdout_lines | default([]) }}"
 
 - name: Restore Master API AWS Options
-  when: openshift.master.ha is defined and openshift.master.ha | bool and openshift_master_cluster_method == "native"
+  when: bool and openshift.master.cluster_method == "native"
       and master_api_aws.rc == 0 and
       not (openshift_cloudprovider_kind is defined and openshift_cloudprovider_kind == 'aws' and openshift_cloudprovider_aws_access_key is defined and openshift_cloudprovider_aws_secret_key is defined)
   lineinfile:
@@ -104,14 +82,14 @@
 - name: Preserve Master Controllers Proxy Config options
   command: grep PROXY /etc/sysconfig/{{ openshift.common.service_type }}-master-controllers
   register: master_controllers_proxy
-  when: openshift.master.ha is defined and openshift.master.ha | bool and openshift_master_cluster_method == "native"
+  when: openshift.master.cluster_method == "native"
   failed_when: false
   changed_when: false
 
 - name: Preserve Master Controllers AWS options
   command: grep AWS_ /etc/sysconfig/{{ openshift.common.service_type }}-master-controllers
   register: master_controllers_aws
-  when: openshift.master.ha is defined and openshift.master.ha | bool and openshift_master_cluster_method == "native"
+  when: openshift.master.cluster_method == "native"
   failed_when: false
   changed_when: false
 
@@ -120,7 +98,7 @@
     src: "{{ ha_svc_template_path }}/atomic-openshift-master-controllers.j2"
     dest: /etc/sysconfig/{{ openshift.common.service_type }}-master-controllers
     backup: true
-  when: openshift.master.ha is defined and openshift.master.ha | bool and openshift_master_cluster_method == "native"
+  when: openshift.master.cluster_method == "native"
   notify:
   - restart master controllers
 
@@ -129,7 +107,7 @@
     dest: /etc/sysconfig/{{ openshift.common.service_type }}-master-controllers
     line: "{{ item }}"
   with_items: "{{ master_controllers_proxy.stdout_lines | default([]) }}"
-  when: openshift.master.ha is defined and openshift.master.ha | bool and openshift_master_cluster_method == "native"
+  when: openshift.master.cluster_method == "native"
         and master_controllers_proxy.rc == 0 and 'http_proxy' not in openshift.common and 'https_proxy' not in openshift.common
 
 - name: Restore Master Controllers AWS Options
@@ -137,39 +115,6 @@
     dest: /etc/sysconfig/{{ openshift.common.service_type }}-master-controllers
     line: "{{ item }}"
   with_items: "{{ master_controllers_aws.stdout_lines | default([]) }}"
-  when: openshift.master.ha is defined and openshift.master.ha | bool and openshift_master_cluster_method == "native"
+  when: openshift.master.cluster_method == "native"
       and master_controllers_aws.rc == 0 and
       not (openshift_cloudprovider_kind is defined and openshift_cloudprovider_kind == 'aws' and openshift_cloudprovider_aws_access_key is defined and openshift_cloudprovider_aws_secret_key is defined)
-
-- name: Install Master docker service file
-  template:
-    dest: "/etc/systemd/system/{{ openshift.common.service_type }}-master.service"
-    src: master_docker/master.docker.service.j2
-  register: install_result
-  when: openshift.common.is_containerized | bool and openshift.master.ha is defined and not openshift.master.ha | bool and not openshift.common.is_master_system_container | bool
-
-- name: Preserve Master Proxy Config options
-  command: grep PROXY /etc/sysconfig/{{ openshift.common.service_type }}-master
-  register: master_proxy_result
-  failed_when: false
-  changed_when: false
-
-- set_fact:
-    master_proxy: "{{ master_proxy_result.stdout_lines | default([]) }}"
-
-- name: Preserve Master AWS options
-  command: grep AWS_ /etc/sysconfig/{{ openshift.common.service_type }}-master
-  register: master_aws_result
-  failed_when: false
-  changed_when: false
-
-- set_fact:
-    master_aws: "{{ master_aws_result.stdout_lines | default([]) }}"
-
-- name: Create the master service env file
-  template:
-    src: "atomic-openshift-master.j2"
-    dest: /etc/sysconfig/{{ openshift.common.service_type }}-master
-    backup: true
-  notify:
-  - restart master

+ 2 - 3
roles/openshift_master/templates/master.yaml.v1.j2

@@ -47,11 +47,10 @@ assetConfig:
 {% if openshift.master.audit_config | default(none) is not none and openshift.common.version_gte_3_2_or_1_2 | bool %}
 auditConfig:{{ openshift.master.audit_config | to_padded_yaml(level=1) }}
 {% endif %}
-{% if openshift_master_ha | bool %}
-controllerLeaseTTL: {{ openshift.master.controller_lease_ttl | default('30') }}
-{% endif %}
 {% if openshift.common.version_gte_3_3_or_1_3 | bool %}
 controllerConfig:
+  election:
+    lockName: openshift-master-controllers
   serviceServingCert:
     signer:
       certFile: service-signer.crt

File diff suppressed because it is too large
+ 0 - 18
roles/openshift_master/templates/master_docker/master.docker.service.j2


+ 0 - 1
roles/openshift_master/vars/main.yml

@@ -19,5 +19,4 @@ openshift_master_valid_grant_methods:
 - prompt
 - deny
 
-l_is_ha: "{{ openshift.master.ha is defined and openshift.master.ha | bool }}"
 openshift_master_is_scaleup_host: False

+ 1 - 1
roles/openshift_master_facts/tasks/main.yml

@@ -32,7 +32,7 @@
   openshift_facts:
     role: master
     local_facts:
-      cluster_method: "{{ openshift_master_cluster_method | default(None) }}"
+      cluster_method: "{{ openshift_master_cluster_method | default('native') }}"
       cluster_hostname: "{{ openshift_master_cluster_hostname | default(None) }}"
       cluster_public_hostname: "{{ openshift_master_cluster_public_hostname | default(None) }}"
       debug_level: "{{ openshift_master_debug_level | default(openshift.common.debug_level) }}"

+ 2 - 7
roles/openshift_metrics/handlers/main.yml

@@ -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

+ 0 - 2
roles/openshift_node_upgrade/tasks/main.yml

@@ -24,7 +24,6 @@
     name: "{{ item }}"
     state: stopped
   with_items:
-  - "{{ openshift.common.service_type }}-master"
   - "{{ openshift.common.service_type }}-master-controllers"
   - "{{ openshift.common.service_type }}-master-api"
   - etcd_container
@@ -81,7 +80,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"

+ 0 - 1
roles/openshift_node_upgrade/tasks/restart.yml

@@ -31,7 +31,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"

+ 0 - 8
roles/openshift_service_catalog/tasks/wire_aggregator.yml

@@ -156,24 +156,16 @@
   register: yedit_output
 
 #restart master serially here
-- name: restart master
-  systemd: name={{ openshift.common.service_type }}-master state=restarted
-  when:
-  - yedit_output.changed
-  - openshift.master.ha is not defined or not openshift.master.ha | bool
-
 - name: restart master api
   systemd: name={{ openshift.common.service_type }}-master-api state=restarted
   when:
   - yedit_output.changed
-  - openshift.master.ha is defined and openshift.master.ha | bool
   - openshift.master.cluster_method == 'native'
 
 - name: restart master controllers
   systemd: name={{ openshift.common.service_type }}-master-controllers state=restarted
   when:
   - yedit_output.changed
-  - openshift.master.ha is defined and openshift.master.ha | bool
   - openshift.master.cluster_method == 'native'
 
 - name: Verify API Server