Skip to content
This repository was archived by the owner on Jun 24, 2021. It is now read-only.

cherry-pick from master to 3.0 #727

Merged
merged 5 commits into from
Apr 8, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 18 additions & 8 deletions excessive_rolling_update.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,22 @@
roles:
- check_config_dynamic

- name: Pre-check for rolling update
hosts: tidb_servers
any_errors_fatal: true
serial: 1
tags:
- always
tasks:
- shell: "{{ deploy_dir }}/bin/tidb-server -V"
register: current_version

- name: Check whether can perform rolling update
fail:
msg: "Rolling update from {{ current_version.stdout_lines[0].replace(' ','').split(':')[1] }} to {{ tidb_version }} is forbidden"
when:
- current_version.stdout_lines[0].replace(' ','').split(':')[1] <= "v2.0.1"
- tidb_version >= "v2.1.0" or tidb_version == "latest"

- name: rolling update PD cluster
hosts: pd_servers
Expand Down Expand Up @@ -199,7 +215,7 @@
until: tikv_http_result.status == 200
retries: 12
delay: 5
when: not enable_tls|default(false) and (tikv_metric_method is defined and tikv_metric_method != "push")
when: not enable_tls|default(false)

- name: wait until the TiKV status page is available when enable_tls
uri:
Expand All @@ -212,13 +228,7 @@
until: tikv_https_result.status == 200
retries: 10
delay: 5
when: enable_tls|default(false) and (tikv_metric_method is defined and tikv_metric_method != "push")

- name: wait until TiKV process is up
wait_for_pid: |
pid_file={{ deploy_dir }}/status/tikv.pid timeout=300
thread_name_regex='tikv-server' state=present
when: deployment_method == 'binary' and (tikv_metric_method is defined and tikv_metric_method == "push")
when: enable_tls|default(false)

- command: cat {{ deploy_dir }}/status/tikv.pid
register: new_tikv_pid
Expand Down
3 changes: 0 additions & 3 deletions group_vars/all.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,6 @@ dev_mode: False
# systemd: Specifies whether to send SIGKILL to remaining processes after a timeout.
disable_send_sigkill: False

# The way to collect tikv monitor data: "pull" or "push".
tikv_metric_method: "pull"

# pump
pump_port: 8250
pump_data_dir: "{{ deploy_dir }}/data.pump"
Expand Down
4 changes: 3 additions & 1 deletion migrate_monitor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,9 @@
node: "{{ cluster_name | title }}-Node_exporter"
pd: "{{ cluster_name | title }}-PD"
tidb: "{{ cluster_name | title }}-TiDB"
tikv: "{{ cluster_name | title }}-TiKV"
tikv_summary: "{{ cluster_name | title }}-TiKV-Summary"
tikv_details: "{{ cluster_name | title }}-TiKV-Details"
tikv_trouble_shot: "{{ cluster_name | title }}-TiKV-Trouble-Shooting"
binlog: "{{ cluster_name | title }}-Binlog"
overview: "{{ cluster_name | title }}-Overview"
disk_performance: "{{ cluster_name | title }}-Disk-Performance"
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
ansible>=2.4.2,<2.7.0
ansible==2.5.14
jinja2>=2.9.6
jmespath>=0.9.0
5 changes: 4 additions & 1 deletion roles/check_system_static/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,10 @@
- name: Preflight check - Linux OS family and distribution version
fail:
msg: "System versions lower than Red Hat Enterprise Linux / CentOS 7.3 have been deprecated. Please use CentOS 7.3 and above. See https://github.com/pingcap/docs/blob/master/op-guide/recommendation.md"
when: "ansible_os_family == 'RedHat' and ansible_distribution_version < '7.3'"
when:
- ansible_os_family == 'RedHat'
- ansible_distribution != 'Amazon'
- ansible_distribution_version < '7.3'

- name: Deploy epollexclusive script
copy: src="{{ script_dir }}/check/epollexclusive" dest="{{ deploy_dir }}/epollexclusive" mode=0755
Expand Down
4 changes: 2 additions & 2 deletions roles/grafana/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ grafana_api_keys:

grafana_exec_vars_only: false

grafana_version: 4.6.3
grafana_version: 5.4.3

# docker settings
grafana_tag: 4.6.3
grafana_tag: 5.4.3
16 changes: 8 additions & 8 deletions roles/local/templates/binary_packages.yml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

third_party_packages:
- name: prometheus
version: 2.2.1
url: "https://github.com/prometheus/prometheus/releases/download/v2.2.1/prometheus-2.2.1.linux-amd64.tar.gz"
version: 2.6.1
url: "https://github.com/prometheus/prometheus/releases/download/v2.6.1/prometheus-2.6.1.linux-amd64.tar.gz"
- name: alertmanager
version: 0.14.0
url: "https://github.com/prometheus/alertmanager/releases/download/v0.14.0/alertmanager-0.14.0.linux-amd64.tar.gz"
Expand All @@ -17,14 +17,14 @@ third_party_packages:
version: 0.4.0
url: "https://github.com/prometheus/pushgateway/releases/download/v0.4.0/pushgateway-0.4.0.linux-amd64.tar.gz"
- name: grafana
version: 4.6.3
url: "https://s3-us-west-2.amazonaws.com/grafana-releases/release/grafana-4.6.3.linux-x64.tar.gz"
version: 5.4.3
url: "https://dl.grafana.com/oss/release/grafana-5.4.3.linux-amd64.tar.gz"


third_party_packages_under_gfw:
- name: prometheus
version: 2.2.1
url: "http://download.pingcap.org/prometheus-2.2.1.linux-amd64.tar.gz"
version: 2.6.1
url: "https://download.pingcap.org/prometheus-2.6.1.linux-amd64.tar.gz"
- name: alertmanager
version: 0.14.0
url: "http://download.pingcap.org/alertmanager-0.14.0.linux-amd64.tar.gz"
Expand All @@ -35,8 +35,8 @@ third_party_packages_under_gfw:
version: 0.4.0
url: "http://download.pingcap.org/pushgateway-0.4.0.linux-amd64.tar.gz"
- name: grafana
version: 4.6.3
url: "http://download.pingcap.org/grafana-4.6.3.linux-x64.tar.gz"
version: 5.4.3
url: "https://download.pingcap.org/grafana-5.4.3.linux-amd64.tar.gz"
- name: blackbox_exporter
version: 0.12.0
url: "http://download.pingcap.org/blackbox_exporter-0.12.0.linux-amd64.tar.gz"
Expand Down
2 changes: 1 addition & 1 deletion roles/prometheus/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ prometheus_extra_labels:

alert_label: "promethues"

prometheus_tag: v2.2.1
prometheus_tag: v2.6.1
Loading