summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--filter_plugins/oo_filters.py14
-rw-r--r--openshift-ansible.spec2
-rw-r--r--playbooks/common/openshift-cluster/upgrades/v3_0_to_v3_1/upgrade.yml10
-rw-r--r--playbooks/common/openshift-cluster/upgrades/v3_1_minor/post.yml2
-rw-r--r--roles/openshift_master/tasks/main.yml2
-rw-r--r--utils/src/ooinstall/cli_installer.py12
-rw-r--r--utils/src/ooinstall/oo_config.py1
7 files changed, 37 insertions, 6 deletions
diff --git a/filter_plugins/oo_filters.py b/filter_plugins/oo_filters.py
index dcda14c63..3dc3f2fe9 100644
--- a/filter_plugins/oo_filters.py
+++ b/filter_plugins/oo_filters.py
@@ -697,6 +697,19 @@ class FilterModule(object):
return matching_pods
+ @staticmethod
+ def oo_get_hosts_from_hostvars(hostvars, hosts):
+ """ Return a list of hosts from hostvars """
+ retval = []
+ for host in hosts:
+ try:
+ retval.append(hostvars[host])
+ except errors.AnsibleError as _:
+ # host does not exist
+ pass
+
+ return retval
+
def filters(self):
""" returns a mapping of filters to methods """
return {
@@ -724,4 +737,5 @@ class FilterModule(object):
"oo_persistent_volume_claims": self.oo_persistent_volume_claims,
"oo_31_rpm_rename_conversion": self.oo_31_rpm_rename_conversion,
"oo_pods_match_component": self.oo_pods_match_component,
+ "oo_get_hosts_from_hostvars": self.oo_get_hosts_from_hostvars,
}
diff --git a/openshift-ansible.spec b/openshift-ansible.spec
index 7c7fb399c..36786cfda 100644
--- a/openshift-ansible.spec
+++ b/openshift-ansible.spec
@@ -50,8 +50,10 @@ cp -p bin/openshift_ansible.conf.example %{buildroot}/etc/openshift_ansible/open
# Fix links
rm -f %{buildroot}%{python_sitelib}/openshift_ansible/multi_inventory.py
rm -f %{buildroot}%{python_sitelib}/openshift_ansible/aws
+rm -f %{buildroot}%{python_sitelib}/openshift_ansible/gce
ln -sf %{_datadir}/ansible/inventory/multi_inventory.py %{buildroot}%{python_sitelib}/openshift_ansible/multi_inventory.py
ln -sf %{_datadir}/ansible/inventory/aws %{buildroot}%{python_sitelib}/openshift_ansible/aws
+ln -sf %{_datadir}/ansible/inventory/gce %{buildroot}%{python_sitelib}/openshift_ansible/gce
# openshift-ansible-docs install
# -docs are currently just %doc, no install needed
diff --git a/playbooks/common/openshift-cluster/upgrades/v3_0_to_v3_1/upgrade.yml b/playbooks/common/openshift-cluster/upgrades/v3_0_to_v3_1/upgrade.yml
index 049ac997c..0fb38f32e 100644
--- a/playbooks/common/openshift-cluster/upgrades/v3_0_to_v3_1/upgrade.yml
+++ b/playbooks/common/openshift-cluster/upgrades/v3_0_to_v3_1/upgrade.yml
@@ -622,6 +622,16 @@
'{"spec":{"template":{"spec":{"containers":[{"name":"router","image":"{{ router_image }}"}]}}}}'
--api-version=v1
with_items: haproxy_routers
+ when: not openshift.common.version_gte_3_1_1_or_1_1_1
+
+ - name: Update router image to current version
+ when: all_routers.rc == 0
+ command: >
+ {{ oc_cmd }} patch dc/{{ item['labels']['deploymentconfig'] }} -p
+ '{"spec":{"template":{"spec":{"containers":[{"name":"router","image":"{{ router_image }}","livenessProbe":{"tcpSocket":null,"httpGet":{"path": "/healthz", "port": 1936, "host": "localhost", "scheme": "HTTP"},"initialDelaySeconds":10,"timeoutSeconds":1}}]}}}}'
+ --api-version=v1
+ with_items: haproxy_routers
+ when: openshift.common.version_gte_3_1_1_or_1_1_1
- name: Check for default registry
command: >
diff --git a/playbooks/common/openshift-cluster/upgrades/v3_1_minor/post.yml b/playbooks/common/openshift-cluster/upgrades/v3_1_minor/post.yml
index d7a2ac405..196393b2a 100644
--- a/playbooks/common/openshift-cluster/upgrades/v3_1_minor/post.yml
+++ b/playbooks/common/openshift-cluster/upgrades/v3_1_minor/post.yml
@@ -37,7 +37,7 @@
when: all_routers.rc == 0
command: >
{{ oc_cmd }} patch dc/{{ item['labels']['deploymentconfig'] }} -p
- '{"spec":{"template":{"spec":{"containers":[{"name":"router","image":"{{ router_image }}"}]}}}}'
+ '{"spec":{"template":{"spec":{"containers":[{"name":"router","image":"{{ router_image }}","livenessProbe":{"tcpSocket":null,"httpGet":{"path": "/healthz", "port": 1936, "host": "localhost", "scheme": "HTTP"},"initialDelaySeconds":10,"timeoutSeconds":1}}]}}}}'
--api-version=v1
with_items: haproxy_routers
diff --git a/roles/openshift_master/tasks/main.yml b/roles/openshift_master/tasks/main.yml
index 4aede31f6..23dfacf79 100644
--- a/roles/openshift_master/tasks/main.yml
+++ b/roles/openshift_master/tasks/main.yml
@@ -259,7 +259,7 @@
- name: Mask master service
command: systemctl mask {{ openshift.common.service_type }}-master
- when: openshift_master_ha | bool and openshift.master.cluster_method == 'native' and not openshift.common.is_atomic | bool
+ when: openshift_master_ha | bool and openshift.master.cluster_method == 'native' and not openshift.common.is_containerized | bool
- name: Start and enable master api
service: name={{ openshift.common.service_type }}-master-api enabled=yes state=started
diff --git a/utils/src/ooinstall/cli_installer.py b/utils/src/ooinstall/cli_installer.py
index e1047e700..9839bf447 100644
--- a/utils/src/ooinstall/cli_installer.py
+++ b/utils/src/ooinstall/cli_installer.py
@@ -526,10 +526,14 @@ Add new nodes here
def get_installed_hosts(hosts, callback_facts):
installed_hosts = []
for host in hosts:
- if(host.connect_to in callback_facts.keys()
- and 'common' in callback_facts[host.connect_to].keys()
- and callback_facts[host.connect_to]['common'].get('version', '')
- and callback_facts[host.connect_to]['common'].get('version', '') != 'None'):
+ if host.connect_to in callback_facts.keys() and (
+ ('common' in callback_facts[host.connect_to].keys() and
+ callback_facts[host.connect_to]['common'].get('version', '') and
+ callback_facts[host.connect_to]['common'].get('version', '') != 'None') \
+ or
+ ('master' in callback_facts[host.connect_to].keys() and
+ callback_facts[host.connect_to]['master'].get('cluster_method', '') == 'native')
+ ):
installed_hosts.append(host)
return installed_hosts
diff --git a/utils/src/ooinstall/oo_config.py b/utils/src/ooinstall/oo_config.py
index 33ab27567..4861b1b1b 100644
--- a/utils/src/ooinstall/oo_config.py
+++ b/utils/src/ooinstall/oo_config.py
@@ -10,6 +10,7 @@ PERSIST_SETTINGS = [
'ansible_ssh_user',
'ansible_config',
'ansible_log_path',
+ 'master_routingconfig_subdomain',
'variant',
'variant_version',
'version',