summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.tito/packages/openshift-ansible2
-rwxr-xr-xbin/oscp2
-rw-r--r--openshift-ansible.spec9
-rw-r--r--playbooks/aws/openshift-cluster/tasks/launch_instances.yml15
-rw-r--r--playbooks/common/openshift-cluster/additional_config.yml1
-rw-r--r--playbooks/openstack/openshift-cluster/launch.yml37
-rw-r--r--roles/openshift_repos/tasks/main.yaml8
-rw-r--r--utils/src/ooinstall/cli_installer.py11
8 files changed, 62 insertions, 23 deletions
diff --git a/.tito/packages/openshift-ansible b/.tito/packages/openshift-ansible
index 722fad28d..ab096b300 100644
--- a/.tito/packages/openshift-ansible
+++ b/.tito/packages/openshift-ansible
@@ -1 +1 @@
-3.0.45-1 ./
+3.0.47-1 ./
diff --git a/bin/oscp b/bin/oscp
index b15133642..203b9d6da 100755
--- a/bin/oscp
+++ b/bin/oscp
@@ -211,7 +211,7 @@ class Oscp(object):
# Assume we have one and only one.
hostname, server_info = results[0]
- dns = server_info['oo_pulic_ip']
+ dns = server_info['oo_public_ip']
host_str = "%s%s%s" % (self.user, dns, self.path)
diff --git a/openshift-ansible.spec b/openshift-ansible.spec
index 4eef29a4d..c92ea2843 100644
--- a/openshift-ansible.spec
+++ b/openshift-ansible.spec
@@ -5,7 +5,7 @@
}
Name: openshift-ansible
-Version: 3.0.45
+Version: 3.0.47
Release: 1%{?dist}
Summary: Openshift and Atomic Enterprise Ansible
License: ASL 2.0
@@ -261,6 +261,13 @@ Atomic OpenShift Utilities includes
%changelog
+* Wed Feb 24 2016 Brenton Leanhardt <bleanhar@redhat.com> 3.0.47-1
+- a-o-i: Double safety check on master_lb (smunilla@redhat.com)
+- a-o-i: Better method for identifying master_lb (smunilla@redhat.com)
+
+* Tue Feb 23 2016 Brenton Leanhardt <bleanhar@redhat.com> 3.0.46-1
+- a-o-i: Exception checking around master_lb (smunilla@redhat.com)
+
* Mon Feb 22 2016 Brenton Leanhardt <bleanhar@redhat.com> 3.0.45-1
- Do not monitor for etcd watchers (mmahut@redhat.com)
- remove old master registry item/triggers (jdiaz@redhat.com)
diff --git a/playbooks/aws/openshift-cluster/tasks/launch_instances.yml b/playbooks/aws/openshift-cluster/tasks/launch_instances.yml
index 6090ed6fe..63be06ecf 100644
--- a/playbooks/aws/openshift-cluster/tasks/launch_instances.yml
+++ b/playbooks/aws/openshift-cluster/tasks/launch_instances.yml
@@ -34,26 +34,22 @@
- set_fact:
ec2_instance_type: "{{ ec2_master_instance_type | default(lookup('env', 'ec2_master_instance_type') | default(lookup('env', 'ec2_instance_type') | default(deployment_vars[deployment_type].type, true), true), true) }}"
- ec2_security_groups: "{{ ec2_master_security_groups
- | default(deployment_vars[deployment_type].security_groups, true) }}"
+ ec2_security_groups: "{{ ec2_master_security_groups | default(lookup('env', 'ec2_master_security_groups') | default(lookup('env', 'ec2_security_groups') | default(deployment_vars[deployment_type].security_groups, true), true), true) }}"
when: host_type == "master" and sub_host_type == "default"
- set_fact:
ec2_instance_type: "{{ ec2_etcd_instance_type | default(lookup('env', 'ec2_etcd_instance_type') | default(lookup('env', 'ec2_instance_type') | default(deployment_vars[deployment_type].type, true), true), true) }}"
- ec2_security_groups: "{{ ec2_etcd_security_groups
- | default(deployment_vars[deployment_type].security_groups, true)}}"
+ ec2_security_groups: "{{ ec2_etcd_security_groups | default(lookup('env', 'ec2_etcd_security_groups') | default(lookup('env', 'ec2_security_groups') | default(deployment_vars[deployment_type].security_groups, true), true), true) }}"
when: host_type == "etcd" and sub_host_type == "default"
- set_fact:
ec2_instance_type: "{{ ec2_infra_instance_type | default(lookup('env', 'ec2_infra_instance_type') | default(lookup('env', 'ec2_instance_type') | default(deployment_vars[deployment_type].type, true), true), true) }}"
- ec2_security_groups: "{{ ec2_infra_security_groups
- | default(deployment_vars[deployment_type].security_groups, true) }}"
+ ec2_security_groups: "{{ ec2_infra_security_groups | default(lookup('env', 'ec2_infra_security_groups') | default(lookup('env', 'ec2_security_groups') | default(deployment_vars[deployment_type].security_groups, true), true), true) }}"
when: host_type == "node" and sub_host_type == "infra"
- set_fact:
ec2_instance_type: "{{ ec2_node_instance_type | default(lookup('env', 'ec2_node_instance_type') | default(lookup('env', 'ec2_instance_type') | default(deployment_vars[deployment_type].type, true), true), true) }}"
- ec2_security_groups: "{{ ec2_node_security_groups
- | default(deployment_vars[deployment_type].security_groups, true) }}"
+ ec2_security_groups: "{{ ec2_node_security_groups | default(lookup('env', 'ec2_node_security_groups') | default(lookup('env', 'ec2_security_groups') | default(deployment_vars[deployment_type].security_groups, true), true), true) }}"
when: host_type == "node" and sub_host_type == "compute"
- set_fact:
@@ -61,8 +57,7 @@
| default(deployment_vars[deployment_type].type, true) }}"
when: ec2_instance_type is not defined
- set_fact:
- ec2_security_groups: "{{ lookup('env', 'ec2_security_groups')
- | default(deployment_vars[deployment_type].security_groups, true) }}"
+ ec2_security_groups: "{{ lookup('env', 'ec2_security_groups') | default(deployment_vars[deployment_type].security_groups, true) }}"
when: ec2_security_groups is not defined
- name: Find amis for deployment_type
diff --git a/playbooks/common/openshift-cluster/additional_config.yml b/playbooks/common/openshift-cluster/additional_config.yml
index 0f4e6ab88..1ac78468a 100644
--- a/playbooks/common/openshift-cluster/additional_config.yml
+++ b/playbooks/common/openshift-cluster/additional_config.yml
@@ -52,4 +52,5 @@
- role: openshift_router
when: deploy_infra | bool
- role: openshift_registry
+ registry_volume_claim: "{{ openshift.hosted.registry.storage.volume.name }}-claim"
when: deploy_infra | bool and attach_registry_volume | bool
diff --git a/playbooks/openstack/openshift-cluster/launch.yml b/playbooks/openstack/openshift-cluster/launch.yml
index e9b9cf540..0afcad72e 100644
--- a/playbooks/openstack/openshift-cluster/launch.yml
+++ b/playbooks/openstack/openshift-cluster/launch.yml
@@ -29,7 +29,7 @@
- name: Create or Update OpenStack Stack
command: 'heat {{ heat_stack_action }} -f {{ openstack_infra_heat_stack }}
- --timeout 3 --enable-rollback
+ --timeout 3
-P cluster_env={{ cluster_env }}
-P cluster_id={{ cluster_id }}
-P subnet_24_prefix={{ openstack_subnet_24_prefix }}
@@ -59,7 +59,40 @@
until: stack_show_status_result.stdout not in ['CREATE_IN_PROGRESS', 'UPDATE_IN_PROGRESS']
retries: 30
delay: 5
- failed_when: stack_show_status_result.stdout not in ['CREATE_COMPLETE', 'UPDATE_COMPLETE']
+
+ - name: Display the stack resources
+ command: 'heat resource-list openshift-ansible-{{ cluster_id }}-stack'
+ register: stack_resource_list_result
+ when: stack_show_status_result.stdout not in ['CREATE_COMPLETE', 'UPDATE_COMPLETE']
+
+ - name: Display the stack status
+ command: 'heat stack-show openshift-ansible-{{ cluster_id }}-stack'
+ register: stack_show_result
+ when: stack_show_status_result.stdout not in ['CREATE_COMPLETE', 'UPDATE_COMPLETE']
+
+ - name: Delete the stack
+ command: 'heat stack-delete openshift-ansible-{{ cluster_id }}-stack'
+ when: stack_show_status_result.stdout not in ['CREATE_COMPLETE', 'UPDATE_COMPLETE']
+
+ - fail:
+ msg: |
+
+ +--------------------------------------+
+ | ^ |
+ | /!\ Failed to create the heat stack |
+ | /___\ |
+ +--------------------------------------+
+
+ Here is the list of stack resources and their status:
+ {{ stack_resource_list_result.stdout }}
+
+ Here is the status of the stack:
+ {{ stack_show_result.stdout }}
+
+ ^ Failed to create the heat stack
+ /!\
+ /___\ Please check the `stack_status_reason` line in the above array to know why.
+ when: stack_show_status_result.stdout not in ['CREATE_COMPLETE', 'UPDATE_COMPLETE']
- name: Read OpenStack Stack outputs
command: 'heat stack-show openshift-ansible-{{ cluster_id }}-stack'
diff --git a/roles/openshift_repos/tasks/main.yaml b/roles/openshift_repos/tasks/main.yaml
index 8a75639c2..6143805ca 100644
--- a/roles/openshift_repos/tasks/main.yaml
+++ b/roles/openshift_repos/tasks/main.yaml
@@ -46,19 +46,19 @@
with_fileglob:
- '*/repos/*'
when: not (item | search("/files/fedora-" ~ openshift_deployment_type ~ "/repos")) and
- (ansible_distribution == "Fedora")
+ (ansible_distribution == "Fedora")
and not openshift.common.is_containerized | bool
notify: refresh cache
- name: Configure gpg keys if needed
- copy: src={{ item }} dest=/etc/pki/rpm-gpg/
+ copy: src="{{ item }}" dest=/etc/pki/rpm-gpg/
with_fileglob:
- "{{ openshift_deployment_type }}/gpg_keys/*"
notify: refresh cache
when: not openshift.common.is_containerized | bool
- name: Configure yum repositories RHEL/CentOS
- copy: src={{ item }} dest=/etc/yum.repos.d/
+ copy: src="{{ item }}" dest=/etc/yum.repos.d/
with_fileglob:
- "{{ openshift_deployment_type }}/repos/*"
notify: refresh cache
@@ -66,7 +66,7 @@
and not openshift.common.is_containerized | bool
- name: Configure yum repositories Fedora
- copy: src={{ item }} dest=/etc/yum.repos.d/
+ copy: src="{{ item }}" dest=/etc/yum.repos.d/
with_fileglob:
- "fedora-{{ openshift_deployment_type }}/repos/*"
notify: refresh cache
diff --git a/utils/src/ooinstall/cli_installer.py b/utils/src/ooinstall/cli_installer.py
index f09f90288..ace834323 100644
--- a/utils/src/ooinstall/cli_installer.py
+++ b/utils/src/ooinstall/cli_installer.py
@@ -533,22 +533,25 @@ def get_installed_hosts(hosts, callback_facts):
try:
first_master = next(host for host in hosts if host.master)
lb_hostname = callback_facts[first_master.connect_to]['master'].get('cluster_hostname', '')
- lb_host = next(host for host in hosts if host.connect_to == lb_hostname)
+ lb_host = \
+ next(host for host in hosts if host.ip == callback_facts[lb_hostname]['common']['ip'])
+
installed_hosts.append(lb_host)
- except KeyError:
+ except (KeyError, StopIteration):
pass
-
for host in hosts:
if host.connect_to in callback_facts.keys() and is_installed_host(host, callback_facts):
installed_hosts.append(host)
return installed_hosts
def is_installed_host(host, callback_facts):
- return 'common' in callback_facts[host.connect_to].keys() and \
+ version_found = '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'
+ return version_found or host.master_lb or host.preconfigured
+
# pylint: disable=too-many-branches
# This pylint error will be corrected shortly in separate PR.
def get_hosts_to_run_on(oo_cfg, callback_facts, unattended, force, verbose):