summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.tito/packages/openshift-ansible2
-rw-r--r--openshift-ansible.spec19
-rw-r--r--playbooks/common/openshift-cluster/upgrades/v3_0_to_v3_1/upgrade.yml11
-rw-r--r--playbooks/libvirt/openshift-cluster/tasks/configure_libvirt_storage_pool.yml6
-rw-r--r--playbooks/openstack/openshift-cluster/files/heat_stack.yaml69
-rw-r--r--playbooks/openstack/openshift-cluster/files/heat_stack_server.yaml8
-rw-r--r--playbooks/openstack/openshift-cluster/launch.yml1
-rw-r--r--playbooks/openstack/openshift-cluster/terminate.yml2
-rw-r--r--roles/openshift_cli/templates/openshift.j221
-rwxr-xr-xroles/openshift_facts/library/openshift_facts.py4
-rw-r--r--roles/openshift_node/tasks/storage_plugins/ceph.yml2
-rw-r--r--roles/openshift_node/tasks/storage_plugins/glusterfs.yml2
12 files changed, 97 insertions, 50 deletions
diff --git a/.tito/packages/openshift-ansible b/.tito/packages/openshift-ansible
index f95b607a9..caa4ded81 100644
--- a/.tito/packages/openshift-ansible
+++ b/.tito/packages/openshift-ansible
@@ -1 +1 @@
-3.0.24-1 ./
+3.0.26-1 ./
diff --git a/openshift-ansible.spec b/openshift-ansible.spec
index eef619ede..7c260ff21 100644
--- a/openshift-ansible.spec
+++ b/openshift-ansible.spec
@@ -5,7 +5,7 @@
}
Name: openshift-ansible
-Version: 3.0.24
+Version: 3.0.26
Release: 1%{?dist}
Summary: Openshift and Atomic Enterprise Ansible
License: ASL 2.0
@@ -259,6 +259,23 @@ Atomic OpenShift Utilities includes
%changelog
+* Fri Jan 08 2016 Brenton Leanhardt <bleanhar@redhat.com> 3.0.26-1
+- Bug 1296388 - fixing typo (bleanhar@redhat.com)
+
+* Thu Jan 07 2016 Brenton Leanhardt <bleanhar@redhat.com> 3.0.25-1
+- Bug 1296388 - The playbook still configure ManageIQ when
+ openshift_use_manageiq is false (bleanhar@redhat.com)
+- Add a banner to CLI wrapper instructing users that it's only for
+ bootstrapping (sdodson@redhat.com)
+- Rename env into clusterid and add environment in the OpenStack VMs tags
+ (lhuard@amadeus.com)
+- Fix terminate.yml on OpenStack (lhuard@amadeus.com)
+- Install gluster and ceph packages when containerized but not atomic
+ (sdodson@redhat.com)
+- Update openshift_facts config_base for Online deployments (whearn@redhat.com)
+- Fix multi-word arguments & cli wrapper stdin plumbing (sdodson@redhat.com)
+- Improve 3.1/1.1 upgrade check (jdetiber@redhat.com)
+
* Thu Jan 07 2016 Brenton Leanhardt <bleanhar@redhat.com> 3.0.24-1
- Setting relative paths in the upgrade playbooks wasn't working
(bleanhar@redhat.com)
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 1f9c6afd3..68df2153d 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
@@ -29,6 +29,7 @@
hosts: oo_first_master
vars:
openshift_master_ha: "{{ groups.oo_masters_to_config | length > 1 }}"
+ target_version: "{{ '1.1' if deployment_type == 'origin' else '3.1' }}"
gather_facts: no
tasks:
# Pacemaker is currently the only supported upgrade path for multiple masters
@@ -45,8 +46,8 @@
- fail:
msg: >
openshift_pkg_version is {{ openshift_pkg_version }} which is not a
- valid version for a 3.1 upgrade
- when: openshift_pkg_version is defined and openshift_pkg_version.split('-',1).1 | version_compare('3.0.2.900','<')
+ valid version for a {{ target_version }} upgrade
+ when: openshift_pkg_version is defined and openshift_pkg_version.split('-',1).1 | version_compare(target_version ,'<')
# If this script errors out ansible will show the default stdout/stderr
# which contains details for the user:
@@ -55,6 +56,8 @@
- name: Verify upgrade can proceed
hosts: oo_masters_to_config:oo_nodes_to_config
+ vars:
+ target_version: "{{ '1.1' if deployment_type == 'origin' else '3.1' }}"
tasks:
- name: Clean package cache
command: "{{ ansible_pkg_mgr }} clean all"
@@ -77,8 +80,8 @@
when: deployment_type == 'origin' and g_aos_versions.curr_version | version_compare('1.0.6','<')
- fail:
- msg: Atomic OpenShift 3.1 packages not found
- when: g_aos_versions.curr_version | version_compare('3.0.2.900','<') and (g_aos_versions.avail_version is none or g_aos_versions.avail_version | version_compare('3.0.2.900','<'))
+ msg: Upgrade packages not found
+ when: (g_aos_versions.avail_version | default(g_aos_versions.curr_version, true) | version_compare(target_version, '<'))
- set_fact:
pre_upgrade_complete: True
diff --git a/playbooks/libvirt/openshift-cluster/tasks/configure_libvirt_storage_pool.yml b/playbooks/libvirt/openshift-cluster/tasks/configure_libvirt_storage_pool.yml
index 8a67d713f..397158b9e 100644
--- a/playbooks/libvirt/openshift-cluster/tasks/configure_libvirt_storage_pool.yml
+++ b/playbooks/libvirt/openshift-cluster/tasks/configure_libvirt_storage_pool.yml
@@ -4,13 +4,17 @@
dest: "{{ libvirt_storage_pool_path }}"
state: directory
+# We need to set permissions on the directory and any items created under the directory, so we need to call the acl module with and without default set.
- acl:
- default: yes
+ default: "{{ item }}"
entity: kvm
etype: group
name: "{{ libvirt_storage_pool_path }}"
permissions: rwx
state: present
+ with_items:
+ - no
+ - yes
- name: Test if libvirt storage pool for openshift already exists
command: "virsh -c {{ libvirt_uri }} pool-info {{ libvirt_storage_pool }}"
diff --git a/playbooks/openstack/openshift-cluster/files/heat_stack.yaml b/playbooks/openstack/openshift-cluster/files/heat_stack.yaml
index bfd73c777..4f6a59a30 100644
--- a/playbooks/openstack/openshift-cluster/files/heat_stack.yaml
+++ b/playbooks/openstack/openshift-cluster/files/heat_stack.yaml
@@ -4,6 +4,11 @@ description: OpenShift cluster
parameters:
+ cluster_env:
+ type: string
+ label: Cluster environment
+ description: Environment of the cluster
+
cluster_id:
type: string
label: Cluster ID
@@ -345,13 +350,14 @@ resources:
params:
cluster_id: { get_param: cluster_id }
k8s_type: etcd
- cluster_id: { get_param: cluster_id }
- type: etcd
- image: { get_param: etcd_image }
- flavor: { get_param: etcd_flavor }
- key_name: { get_resource: keypair }
- net: { get_resource: net }
- subnet: { get_resource: subnet }
+ cluster_env: { get_param: cluster_env }
+ cluster_id: { get_param: cluster_id }
+ type: etcd
+ image: { get_param: etcd_image }
+ flavor: { get_param: etcd_flavor }
+ key_name: { get_resource: keypair }
+ net: { get_resource: net }
+ subnet: { get_resource: subnet }
secgrp:
- { get_resource: etcd-secgrp }
floating_network: { get_param: floating_ip_pool }
@@ -375,13 +381,14 @@ resources:
params:
cluster_id: { get_param: cluster_id }
k8s_type: master
- cluster_id: { get_param: cluster_id }
- type: master
- image: { get_param: master_image }
- flavor: { get_param: master_flavor }
- key_name: { get_resource: keypair }
- net: { get_resource: net }
- subnet: { get_resource: subnet }
+ cluster_env: { get_param: cluster_env }
+ cluster_id: { get_param: cluster_id }
+ type: master
+ image: { get_param: master_image }
+ flavor: { get_param: master_flavor }
+ key_name: { get_resource: keypair }
+ net: { get_resource: net }
+ subnet: { get_resource: subnet }
secgrp:
- { get_resource: master-secgrp }
floating_network: { get_param: floating_ip_pool }
@@ -406,14 +413,15 @@ resources:
cluster_id: { get_param: cluster_id }
k8s_type: node
sub_host_type: compute
- cluster_id: { get_param: cluster_id }
- type: node
- subtype: compute
- image: { get_param: node_image }
- flavor: { get_param: node_flavor }
- key_name: { get_resource: keypair }
- net: { get_resource: net }
- subnet: { get_resource: subnet }
+ cluster_env: { get_param: cluster_env }
+ cluster_id: { get_param: cluster_id }
+ type: node
+ subtype: compute
+ image: { get_param: node_image }
+ flavor: { get_param: node_flavor }
+ key_name: { get_resource: keypair }
+ net: { get_resource: net }
+ subnet: { get_resource: subnet }
secgrp:
- { get_resource: node-secgrp }
floating_network: { get_param: floating_ip_pool }
@@ -438,14 +446,15 @@ resources:
cluster_id: { get_param: cluster_id }
k8s_type: node
sub_host_type: infra
- cluster_id: { get_param: cluster_id }
- type: node
- subtype: infra
- image: { get_param: infra_image }
- flavor: { get_param: infra_flavor }
- key_name: { get_resource: keypair }
- net: { get_resource: net }
- subnet: { get_resource: subnet }
+ cluster_env: { get_param: cluster_env }
+ cluster_id: { get_param: cluster_id }
+ type: node
+ subtype: infra
+ image: { get_param: infra_image }
+ flavor: { get_param: infra_flavor }
+ key_name: { get_resource: keypair }
+ net: { get_resource: net }
+ subnet: { get_resource: subnet }
secgrp:
- { get_resource: node-secgrp }
- { get_resource: infra-secgrp }
diff --git a/playbooks/openstack/openshift-cluster/files/heat_stack_server.yaml b/playbooks/openstack/openshift-cluster/files/heat_stack_server.yaml
index 3f24a3e45..f83f2c984 100644
--- a/playbooks/openstack/openshift-cluster/files/heat_stack_server.yaml
+++ b/playbooks/openstack/openshift-cluster/files/heat_stack_server.yaml
@@ -9,6 +9,11 @@ parameters:
label: Name
description: Name
+ cluster_env:
+ type: string
+ label: Cluster environment
+ description: Environment of the cluster
+
cluster_id:
type: string
label: Cluster ID
@@ -105,7 +110,8 @@ resources:
user_data: { get_file: user-data }
user_data_format: RAW
metadata:
- env: { get_param: cluster_id }
+ environment: { get_param: cluster_env }
+ clusterid: { get_param: cluster_id }
host-type: { get_param: type }
sub-host-type: { get_param: subtype }
diff --git a/playbooks/openstack/openshift-cluster/launch.yml b/playbooks/openstack/openshift-cluster/launch.yml
index f07ca684f..fdcb77acc 100644
--- a/playbooks/openstack/openshift-cluster/launch.yml
+++ b/playbooks/openstack/openshift-cluster/launch.yml
@@ -29,6 +29,7 @@
- name: Create or Update OpenStack Stack
command: 'heat {{ heat_stack_action }} -f {{ openstack_infra_heat_stack }}
+ -P cluster_env={{ cluster_env }}
-P cluster_id={{ cluster_id }}
-P cidr={{ openstack_network_cidr }}
-P dns_nameservers={{ openstack_network_dns | join(",") }}
diff --git a/playbooks/openstack/openshift-cluster/terminate.yml b/playbooks/openstack/openshift-cluster/terminate.yml
index d0abe9fa5..d4ab51fa7 100644
--- a/playbooks/openstack/openshift-cluster/terminate.yml
+++ b/playbooks/openstack/openshift-cluster/terminate.yml
@@ -11,7 +11,7 @@
groups: oo_hosts_to_terminate
ansible_ssh_user: "{{ deployment_vars[deployment_type].ssh_user }}"
ansible_sudo: "{{ deployment_vars[deployment_type].sudo }}"
- with_items: (groups['tag_environment_' ~ cluster_env]|default([])) | groups['tag_clusterid_' ~ cluster_id ] | default([])
+ with_items: (groups['tag_environment_' ~ cluster_env]|default([])) | intersect(groups['tag_clusterid_' ~ cluster_id ]|default([]))
- name: Unsubscribe VMs
hosts: oo_hosts_to_terminate
diff --git a/roles/openshift_cli/templates/openshift.j2 b/roles/openshift_cli/templates/openshift.j2
index cade4d1a7..a7c148a22 100644
--- a/roles/openshift_cli/templates/openshift.j2
+++ b/roles/openshift_cli/templates/openshift.j2
@@ -6,11 +6,18 @@ cmd=`basename $0`
user=`id -u`
group=`id -g`
-# docker can only split stderr and stdin when run without -t
-# https://github.com/docker/docker/issues/725
-# ansible checks various streams DO NOT CROSS THE STREAMS
-if [ -z $TERM ]; then
- $t = '-it'
-fi
+>&2 echo """
+================================================================================
+ATTENTION: You are running ${cmd} via a wrapper around 'docker run {{ openshift.common.cli_image }}'.
+This wrapper is intended only to be used to bootstrap an environment. Please
+install client tools on another host once you have granted cluster-admin
+privileges to a user.
+{% if openshift.common.deployment_type in ['openshift-enterprise','atomic-enterprise'] %}
+See https://docs.openshift.com/enterprise/latest/cli_reference/get_started_cli.html
+{% else %}
+See https://docs.openshift.org/latest/cli_reference/get_started_cli.html
+{% endif %}
+=================================================================================
+"""
-docker run ${t} -a STDERR -a STDOUT -a STDIN --privileged --net=host --user=${user}:${group} -v ~/.kube:/root/.kube -v /tmp:/tmp -v {{ openshift.common.config_base}}:{{ openshift.common.config_base }} -e KUBECONFIG=/root/.kube/config --entrypoint ${cmd} --rm {{ openshift.common.cli_image }} ${@} \ No newline at end of file
+docker run -i --privileged --net=host --user=${user}:${group} -v ~/.kube:/root/.kube -v /tmp:/tmp -v {{ openshift.common.config_base}}:{{ openshift.common.config_base }} -e KUBECONFIG=/root/.kube/config --entrypoint ${cmd} --rm {{ openshift.common.cli_image }} "${@}"
diff --git a/roles/openshift_facts/library/openshift_facts.py b/roles/openshift_facts/library/openshift_facts.py
index 8dc16f5e4..2a3d4acbd 100755
--- a/roles/openshift_facts/library/openshift_facts.py
+++ b/roles/openshift_facts/library/openshift_facts.py
@@ -730,8 +730,8 @@ def set_manageiq_facts_if_unset(facts):
raise OpenShiftFactsInternalError(
"Invalid invocation: The required facts are not set"
)
-
- facts['common']['use_manageiq'] = facts['common']['version_greater_than_3_1_or_1_1']
+ if 'use_manageiq' not in facts['common']:
+ facts['common']['use_manageiq'] = facts['common']['version_greater_than_3_1_or_1_1']
return facts
diff --git a/roles/openshift_node/tasks/storage_plugins/ceph.yml b/roles/openshift_node/tasks/storage_plugins/ceph.yml
index 119ad62ef..eed3c99a3 100644
--- a/roles/openshift_node/tasks/storage_plugins/ceph.yml
+++ b/roles/openshift_node/tasks/storage_plugins/ceph.yml
@@ -1,4 +1,4 @@
---
- name: Install Ceph storage plugin dependencies
action: "{{ ansible_pkg_mgr }} name=ceph-common state=present"
- when: not openshift.common.is_containerized | bool \ No newline at end of file
+ when: not openshift.common.is_atomic | bool \ No newline at end of file
diff --git a/roles/openshift_node/tasks/storage_plugins/glusterfs.yml b/roles/openshift_node/tasks/storage_plugins/glusterfs.yml
index 91ee77e7e..8fc8497fa 100644
--- a/roles/openshift_node/tasks/storage_plugins/glusterfs.yml
+++ b/roles/openshift_node/tasks/storage_plugins/glusterfs.yml
@@ -1,7 +1,7 @@
---
- name: Install GlusterFS storage plugin dependencies
action: "{{ ansible_pkg_mgr }} name=glusterfs-fuse state=present"
- when: not openshift.common.is_containerized | bool
+ when: not openshift.common.is_atomic | bool
- name: Set sebooleans to allow gluster storage plugin access from containers
seboolean: