summaryrefslogtreecommitdiffstats
path: root/roles/openshift_master
diff options
context:
space:
mode:
authorJason DeTiberus <jdetiber@redhat.com>2015-08-26 17:07:06 -0400
committerAndrew Butcher <abutcher@redhat.com>2015-11-04 19:57:22 -0500
commita6dd87452379403704fb5cd1d8647ef3cf978e28 (patch)
tree596ef9a4e3352749752ca6af62a5295defe879cd /roles/openshift_master
parent16e085b44ba3e3328ec7d8a5dd5e2331c7f633a6 (diff)
downloadopenshift-a6dd87452379403704fb5cd1d8647ef3cf978e28.tar.gz
openshift-a6dd87452379403704fb5cd1d8647ef3cf978e28.tar.bz2
openshift-a6dd87452379403704fb5cd1d8647ef3cf978e28.tar.xz
openshift-a6dd87452379403704fb5cd1d8647ef3cf978e28.zip
fix dueling controllers - without controllerLeaseTTL set in config, multiple controllers will attempt to start
Diffstat (limited to 'roles/openshift_master')
-rw-r--r--roles/openshift_master/handlers/main.yml2
-rw-r--r--roles/openshift_master/tasks/main.yml1
-rw-r--r--roles/openshift_master/templates/master.yaml.v1.j24
3 files changed, 6 insertions, 1 deletions
diff --git a/roles/openshift_master/handlers/main.yml b/roles/openshift_master/handlers/main.yml
index 9ce4f512b..ad3ac5a9f 100644
--- a/roles/openshift_master/handlers/main.yml
+++ b/roles/openshift_master/handlers/main.yml
@@ -7,6 +7,8 @@
service: name={{ openshift.common.service_type }}-master-api state=restarted
when: openshift_master_ha | bool
+# TODO: need to fix up ignore_errors here
- name: restart master controllers
service: name={{ openshift.common.service_type }}-master-controllers state=restarted
when: openshift_master_ha | bool
+ ignore_errors: yes
diff --git a/roles/openshift_master/tasks/main.yml b/roles/openshift_master/tasks/main.yml
index 085855750..290f22358 100644
--- a/roles/openshift_master/tasks/main.yml
+++ b/roles/openshift_master/tasks/main.yml
@@ -64,6 +64,7 @@
infra_nodes: "{{ num_infra | default(None) }}"
disabled_features: "{{ osm_disabled_features | default(None) }}"
master_count: "{{ openshift_master_count | default(None) }}"
+ controller_lease_ttl: "{{ osm_controller_lease_ttl | default(None) }}"
- name: Install Master package
yum: pkg={{ openshift.common.service_type }}-master state=present
diff --git a/roles/openshift_master/templates/master.yaml.v1.j2 b/roles/openshift_master/templates/master.yaml.v1.j2
index 3f2c51417..9145df479 100644
--- a/roles/openshift_master/templates/master.yaml.v1.j2
+++ b/roles/openshift_master/templates/master.yaml.v1.j2
@@ -16,7 +16,9 @@ assetConfig:
keyFile: master.server.key
maxRequestsInFlight: 0
requestTimeoutSeconds: 0
-controllerLeaseTTL: 0
+{% if openshift_master_ha | bool %}
+controllerLeaseTTL: {{ openshift.master.controller_lease_ttl | default('30') }}
+{% endif %}
controllers: '*'
corsAllowedOrigins:
{% for origin in ['127.0.0.1', 'localhost', openshift.common.ip, openshift.common.public_ip] | union(openshift.common.all_hostnames) | unique %}