summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.tito/packages/openshift-ansible-bin1
-rw-r--r--.tito/packages/openshift-ansible-inventory1
-rw-r--r--.tito/releasers.conf4
-rw-r--r--openshift-ansible.spec32
-rw-r--r--playbooks/adhoc/uninstall.yml16
-rw-r--r--rel-eng/packages/.readme3
-rw-r--r--rel-eng/packages/openshift-ansible-bin1
-rw-r--r--rel-eng/packages/openshift-ansible-inventory1
-rw-r--r--rel-eng/tito.props5
-rw-r--r--roles/lib_zabbix/library/zbx_item.py20
-rw-r--r--roles/lib_zabbix/library/zbx_itemprototype.py20
-rw-r--r--roles/lib_zabbix/tasks/create_template.yml2
-rw-r--r--roles/os_zabbix/vars/template_aws.yml2
-rw-r--r--roles/os_zabbix/vars/template_openshift_master.yml30
-rw-r--r--utils/src/ooinstall/cli_installer.py10
15 files changed, 111 insertions, 37 deletions
diff --git a/.tito/packages/openshift-ansible-bin b/.tito/packages/openshift-ansible-bin
deleted file mode 100644
index 5275dfcf9..000000000
--- a/.tito/packages/openshift-ansible-bin
+++ /dev/null
@@ -1 +0,0 @@
-0.0.21-1 bin/
diff --git a/.tito/packages/openshift-ansible-inventory b/.tito/packages/openshift-ansible-inventory
deleted file mode 100644
index 85502438a..000000000
--- a/.tito/packages/openshift-ansible-inventory
+++ /dev/null
@@ -1 +0,0 @@
-0.0.11-1 inventory/
diff --git a/.tito/releasers.conf b/.tito/releasers.conf
index f863ce9b1..a9116291a 100644
--- a/.tito/releasers.conf
+++ b/.tito/releasers.conf
@@ -11,3 +11,7 @@ srpm_disttag = .el7ose
releaser = tito.release.DistGitReleaser
branches = rhaos-3.1-rhel-7
srpm_disttag = .el7aos
+
+[copr-openshift-ansible]
+releaser = tito.release.CoprReleaser
+project_name = openshift-ansible
diff --git a/openshift-ansible.spec b/openshift-ansible.spec
index 21f624400..ffdbe65b7 100644
--- a/openshift-ansible.spec
+++ b/openshift-ansible.spec
@@ -13,7 +13,8 @@ URL: https://github.com/openshift/openshift-ansible
Source0: https://github.com/openshift/openshift-ansible/archive/%{commit}/%{name}-%{version}.tar.gz
BuildArch: noarch
-Requires: ansible
+Requires: ansible >= 1.9.3
+Requires: python2
%description
Openshift and Atomic Enterprise Ansible
@@ -96,8 +97,9 @@ popd
# ----------------------------------------------------------------------------------
%package bin
Summary: Openshift and Atomic Enterprise Ansible Scripts for working with metadata hosts
-Requires: %{name}-inventory
-Requires: python2
+Requires: %{name} = %{version}
+Requires: %{name}-inventory = %{version}
+Requires: %{name}-playbooks = %{version}
BuildRequires: python2-devel
BuildArch: noarch
@@ -117,7 +119,7 @@ Scripts to make it nicer when working with hosts that are defined only by metada
# ----------------------------------------------------------------------------------
%package docs
Summary: Openshift and Atomic Enterprise Ansible documents
-Requires: %{name}
+Requires: %{name} = %{version}
BuildArch: noarch
%description docs
@@ -131,7 +133,7 @@ BuildArch: noarch
# ----------------------------------------------------------------------------------
%package inventory
Summary: Openshift and Atomic Enterprise Ansible Inventories
-Requires: python2
+Requires: %{name} = %{version}
BuildArch: noarch
%description inventory
@@ -144,7 +146,7 @@ Ansible Inventories used with the openshift-ansible scripts and playbooks.
%package inventory-aws
Summary: Openshift and Atomic Enterprise Ansible Inventories for AWS
-Requires: %{name}-inventory
+Requires: %{name}-inventory = %{version}
Requires: python-boto
BuildArch: noarch
@@ -156,7 +158,7 @@ Ansible Inventories for AWS used with the openshift-ansible scripts and playbook
%package inventory-gce
Summary: Openshift and Atomic Enterprise Ansible Inventories for GCE
-Requires: %{name}-inventory
+Requires: %{name}-inventory = %{version}
Requires: python-libcloud >= 0.13
BuildArch: noarch
@@ -172,10 +174,10 @@ Ansible Inventories for GCE used with the openshift-ansible scripts and playbook
# ----------------------------------------------------------------------------------
%package playbooks
Summary: Openshift and Atomic Enterprise Ansible Playbooks
-Requires: %{name}
-Requires: %{name}-roles
-Requires: %{name}-lookup-plugins
-Requires: %{name}-filter-plugins
+Requires: %{name} = %{version}
+Requires: %{name}-roles = %{version}
+Requires: %{name}-lookup-plugins = %{version}
+Requires: %{name}-filter-plugins = %{version}
BuildArch: noarch
%description playbooks
@@ -191,8 +193,8 @@ BuildArch: noarch
%package roles
Summary: Openshift and Atomic Enterprise Ansible roles
Requires: %{name}
-Requires: %{name}-lookup-plugins
-Requires: %{name}-filter-plugins
+Requires: %{name}-lookup-plugins = %{version}
+Requires: %{name}-filter-plugins = %{version}
BuildArch: noarch
%description roles
@@ -238,9 +240,7 @@ BuildArch: noarch
%package -n atomic-openshift-utils
Summary: Atomic OpenShift Utilities
BuildRequires: python-setuptools
-Requires: openshift-ansible-playbooks
-Requires: openshift-ansible-roles
-Requires: ansible
+Requires: %{name}-playbooks >= %{version}
Requires: python-click
Requires: python-setuptools
Requires: PyYAML
diff --git a/playbooks/adhoc/uninstall.yml b/playbooks/adhoc/uninstall.yml
index e0dbad900..565bb20a8 100644
--- a/playbooks/adhoc/uninstall.yml
+++ b/playbooks/adhoc/uninstall.yml
@@ -103,7 +103,7 @@
- shell: find /var/lib/openshift/openshift.local.volumes -type d -exec umount {} \; 2>/dev/null || true
changed_when: False
- - shell: docker rm -f "{{ item }}"-master "{{ item }}"-node
+ - shell: docker rm -f "{{ item }}"-master "{{ item }}"-node
changed_when: False
failed_when: False
with_items:
@@ -152,10 +152,14 @@
- /etc/sysconfig/atomic-enterprise-master
- /etc/sysconfig/atomic-enterprise-node
- /etc/sysconfig/atomic-openshift-master
+ - /etc/sysconfig/atomic-openshift-master-api
+ - /etc/sysconfig/atomic-openshift-master-controllers
- /etc/sysconfig/atomic-openshift-node
- /etc/sysconfig/openshift-master
- /etc/sysconfig/openshift-node
- /etc/sysconfig/origin-master
+ - /etc/sysconfig/origin-master-api
+ - /etc/sysconfig/origin-master-controllers
- /etc/sysconfig/origin-node
- /root/.kube
- /run/openshift-sdn
@@ -165,6 +169,16 @@
- /var/lib/openshift
- /var/lib/origin
- /var/lib/pacemaker
+ - /usr/lib/systemd/system/atomic-openshift-master-api.service
+ - /usr/lib/systemd/system/atomic-openshift-master-controllers.service
+ - /usr/lib/systemd/system/origin-master-api.service
+ - /usr/lib/systemd/system/origin-master-controllers.service
+
+ # Since we are potentially removing the systemd unit files for separated
+ # master-api and master-controllers services, so we need to reload the
+ # systemd configuration manager
+ - name: Reload systemd manager configuration
+ command: systemctl daemon-reload
- name: restart docker
service: name=docker state=restarted
diff --git a/rel-eng/packages/.readme b/rel-eng/packages/.readme
deleted file mode 100644
index 8999c8dbc..000000000
--- a/rel-eng/packages/.readme
+++ /dev/null
@@ -1,3 +0,0 @@
-the rel-eng/packages directory contains metadata files
-named after their packages. Each file has the latest tagged
-version and the project's relative directory.
diff --git a/rel-eng/packages/openshift-ansible-bin b/rel-eng/packages/openshift-ansible-bin
deleted file mode 100644
index 11c2906f0..000000000
--- a/rel-eng/packages/openshift-ansible-bin
+++ /dev/null
@@ -1 +0,0 @@
-0.0.19-1 bin/
diff --git a/rel-eng/packages/openshift-ansible-inventory b/rel-eng/packages/openshift-ansible-inventory
deleted file mode 100644
index 733c626cf..000000000
--- a/rel-eng/packages/openshift-ansible-inventory
+++ /dev/null
@@ -1 +0,0 @@
-0.0.9-1 inventory/
diff --git a/rel-eng/tito.props b/rel-eng/tito.props
deleted file mode 100644
index eab3f190d..000000000
--- a/rel-eng/tito.props
+++ /dev/null
@@ -1,5 +0,0 @@
-[buildconfig]
-builder = tito.builder.Builder
-tagger = tito.tagger.VersionTagger
-changelog_do_not_remove_cherrypick = 0
-changelog_format = %s (%ae)
diff --git a/roles/lib_zabbix/library/zbx_item.py b/roles/lib_zabbix/library/zbx_item.py
index 5dc3cff9b..996c98fae 100644
--- a/roles/lib_zabbix/library/zbx_item.py
+++ b/roles/lib_zabbix/library/zbx_item.py
@@ -41,6 +41,24 @@ def exists(content, key='result'):
return True
+def get_data_type(data_type):
+ '''
+ Possible values:
+ 0 - decimal;
+ 1 - octal;
+ 2 - hexadecimal;
+ 3 - bool;
+ '''
+ vtype = 0
+ if 'octal' in data_type:
+ vtype = 1
+ elif 'hexadecimal' in data_type:
+ vtype = 2
+ elif 'bool' in data_type:
+ vtype = 3
+
+ return vtype
+
def get_value_type(value_type):
'''
Possible values:
@@ -158,6 +176,7 @@ def main():
template_name=dict(default=None, type='str'),
zabbix_type=dict(default='trapper', type='str'),
value_type=dict(default='int', type='str'),
+ data_type=dict(default='decimal', type='str'),
interval=dict(default=60, type='int'),
delta=dict(default=0, type='int'),
multiplier=dict(default=None, type='str'),
@@ -219,6 +238,7 @@ def main():
'hostid': templateid[0],
'type': get_zabbix_type(module.params['zabbix_type']),
'value_type': get_value_type(module.params['value_type']),
+ 'data_type': get_data_type(module.params['data_type']),
'applications': get_app_ids(module.params['applications'], app_name_ids),
'formula': formula,
'multiplier': use_multiplier,
diff --git a/roles/lib_zabbix/library/zbx_itemprototype.py b/roles/lib_zabbix/library/zbx_itemprototype.py
index 43498c015..aca9c8336 100644
--- a/roles/lib_zabbix/library/zbx_itemprototype.py
+++ b/roles/lib_zabbix/library/zbx_itemprototype.py
@@ -116,6 +116,24 @@ def get_zabbix_type(ztype):
return _vtype
+def get_data_type(data_type):
+ '''
+ Possible values:
+ 0 - decimal;
+ 1 - octal;
+ 2 - hexadecimal;
+ 3 - bool;
+ '''
+ vtype = 0
+ if 'octal' in data_type:
+ vtype = 1
+ elif 'hexadecimal' in data_type:
+ vtype = 2
+ elif 'bool' in data_type:
+ vtype = 3
+
+ return vtype
+
def get_value_type(value_type):
'''
Possible values:
@@ -175,6 +193,7 @@ def main():
interfaceid=dict(default=None, type='int'),
zabbix_type=dict(default='trapper', type='str'),
value_type=dict(default='float', type='str'),
+ data_type=dict(default='decimal', type='str'),
delay=dict(default=60, type='int'),
lifetime=dict(default=30, type='int'),
state=dict(default='present', type='str'),
@@ -238,6 +257,7 @@ def main():
'ruleid': get_rule_id(zapi, module.params['discoveryrule_key'], template['templateid']),
'type': get_zabbix_type(module.params['zabbix_type']),
'value_type': get_value_type(module.params['value_type']),
+ 'data_type': get_data_type(module.params['data_type']),
'applications': get_app_ids(zapi, module.params['applications'], template['templateid']),
'formula': formula,
'multiplier': use_multiplier,
diff --git a/roles/lib_zabbix/tasks/create_template.yml b/roles/lib_zabbix/tasks/create_template.yml
index 44c4e6766..2992505bf 100644
--- a/roles/lib_zabbix/tasks/create_template.yml
+++ b/roles/lib_zabbix/tasks/create_template.yml
@@ -33,6 +33,7 @@
key: "{{ item.key }}"
name: "{{ item.name | default(item.key, true) }}"
value_type: "{{ item.value_type | default('int') }}"
+ data_type: "{{ item.data_type | default('decimal') }}"
description: "{{ item.description | default('', True) }}"
multiplier: "{{ item.multiplier | default('', True) }}"
units: "{{ item.units | default('', True) }}"
@@ -81,6 +82,7 @@
key: "{{ item.key }}"
discoveryrule_key: "{{ item.discoveryrule_key }}"
value_type: "{{ item.value_type }}"
+ data_type: "{{ item.data_type | default('decimal') }}"
template_name: "{{ template.name }}"
applications: "{{ item.applications }}"
description: "{{ item.description | default('', True) }}"
diff --git a/roles/os_zabbix/vars/template_aws.yml b/roles/os_zabbix/vars/template_aws.yml
index 0ed682128..57832a3fe 100644
--- a/roles/os_zabbix/vars/template_aws.yml
+++ b/roles/os_zabbix/vars/template_aws.yml
@@ -4,7 +4,7 @@ g_template_aws:
zdiscoveryrules:
- name: disc.aws
key: disc.aws
- lifetime: 1
+ lifetime: 14
description: "Dynamically register AWS bucket info"
zitemprototypes:
diff --git a/roles/os_zabbix/vars/template_openshift_master.yml b/roles/os_zabbix/vars/template_openshift_master.yml
index 6defc4989..174486e15 100644
--- a/roles/os_zabbix/vars/template_openshift_master.yml
+++ b/roles/os_zabbix/vars/template_openshift_master.yml
@@ -13,6 +13,13 @@ g_template_openshift_master:
applications:
- Openshift Master
+ - key: openshift.master.api.healthz
+ description: "Checks the healthz check of the master's api: https://master_host/healthz"
+ type: int
+ data_type: bool
+ applications:
+ - Openshift Master
+
- key: openshift.master.user.count
description: Shows number of users in a cluster
type: int
@@ -24,8 +31,20 @@ g_template_openshift_master:
type: int
applications:
- Openshift Master
-
- - key: openshift.project.counter
+
+ - key: openshift.master.pod.user.running.count
+ description: Shows number of user pods running (non infrastructure pods)
+ type: int
+ applications:
+ - Openshift Master
+
+ - key: openshift.master.pod.total.count
+ description: Shows total number of pods (running and non running)
+ type: int
+ applications:
+ - Openshift Master
+
+ - key: openshift.project.count
description: Shows number of projects on a cluster
type: int
applications:
@@ -109,6 +128,11 @@ g_template_openshift_master:
url: 'https://github.com/openshift/ops-sop/blob/master/V3/Alerts/check_create_app.asciidoc'
priority: avg
+ - name: 'Openshift Master API health check is failing on {HOST.NAME}'
+ expression: '{Template Openshift Master:openshift.master.api.healthz.max(#3)}<1'
+ url: 'https://github.com/openshift/ops-sop/blob/master/V3/Alerts/openshift_master.asciidoc'
+ priority: high
+
- name: 'Openshift Master process not running on {HOST.NAME}'
expression: '{Template Openshift Master:openshift.master.process.count.max(#3)}<1'
url: 'https://github.com/openshift/ops-sop/blob/master/V3/Alerts/openshift_master.asciidoc'
@@ -125,7 +149,7 @@ g_template_openshift_master:
priority: info
- name: 'There are no projects running on {HOST.NAME}'
- expression: '{Template Openshift Master:openshift.project.counter.last()}=0'
+ expression: '{Template Openshift Master:openshift.project.count.last()}=0'
url: 'https://github.com/openshift/ops-sop/blob/master/V3/Alerts/openshift_master.asciidoc'
priority: info
diff --git a/utils/src/ooinstall/cli_installer.py b/utils/src/ooinstall/cli_installer.py
index 3c3f45c3b..f34255234 100644
--- a/utils/src/ooinstall/cli_installer.py
+++ b/utils/src/ooinstall/cli_installer.py
@@ -71,7 +71,7 @@ def delete_hosts(hosts):
click.echo("\"{}\" doesn't coorespond to any valid input.".format(del_idx))
return hosts, None
-def collect_hosts():
+def collect_hosts(master_set=False):
"""
Collect host information from user. This will later be filled in using
ansible.
@@ -108,8 +108,10 @@ http://docs.openshift.com/enterprise/latest/architecture/infrastructure_componen
value_proc=validate_prompt_hostname)
host_props['connect_to'] = hostname_or_ip
-
- host_props['master'] = click.confirm('Will this host be an OpenShift Master?')
+ if not master_set:
+ is_master = click.confirm('Will this host be an OpenShift Master?')
+ host_props['master'] = is_master
+ master_set = is_master
host_props['node'] = True
#TODO: Reenable this option once container installs are out of tech preview
@@ -308,7 +310,7 @@ def collect_new_nodes():
Add new nodes here
"""
click.echo(message)
- return collect_hosts()
+ return collect_hosts(True)
def get_installed_hosts(hosts, callback_facts):
installed_hosts = []