From e947d1a422b03421c3d6ab0eaa6f43ba31f1f3bb Mon Sep 17 00:00:00 2001 From: Louis Date: Sat, 29 Sep 2018 11:52:48 +0800 Subject: [PATCH 01/13] release tidb v2.1.0-rc3 --- inventory.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/inventory.ini b/inventory.ini index 97a67e9c2..b82de435d 100644 --- a/inventory.ini +++ b/inventory.ini @@ -60,7 +60,7 @@ ansible_user = tidb cluster_name = test-cluster -tidb_version = latest +tidb_version = v2.1.0-rc3 # process supervision, [systemd, supervise] process_supervision = systemd From 10ca5e1fec6d9086ef6ac164c3d1ae64dcc3bc5a Mon Sep 17 00:00:00 2001 From: Ian Date: Sun, 30 Sep 2018 15:08:24 +0800 Subject: [PATCH 02/13] *: update syncer grafana (#557) --- scripts/syncer.json | 593 +++++++++++++++++++++++++++++++------------- 1 file changed, 422 insertions(+), 171 deletions(-) diff --git a/scripts/syncer.json b/scripts/syncer.json index 5455ec1d4..954bf0335 100644 --- a/scripts/syncer.json +++ b/scripts/syncer.json @@ -1,8 +1,8 @@ { "__inputs": [ { - "name": "DS_BIGDATA-CLUSTER", - "label": "bigdata-cluster", + "name": "DS_HOTEL-BIZREPORT", + "label": "hotel-bizreport", "description": "", "type": "datasource", "pluginId": "prometheus", @@ -30,7 +30,17 @@ } ], "annotations": { - "list": [] + "list": [ + { + "builtIn": 1, + "datasource": "-- Grafana --", + "enable": true, + "hide": true, + "iconColor": "rgba(0, 211, 255, 1)", + "name": "Annotations & Alerts", + "type": "dashboard" + } + ] }, "editable": true, "gnetId": null, @@ -47,7 +57,9 @@ { "aliasColors": {}, "bars": false, - "datasource": "${DS_BIGDATA-CLUSTER}", + "dashLength": 10, + "dashes": false, + "datasource": "${DS_HOTEL-BIZREPORT}", "fill": 1, "id": 1, "legend": { @@ -57,7 +69,7 @@ "max": true, "min": false, "rightSide": true, - "show": true, + "show": false, "sort": "current", "sortDesc": true, "total": false, @@ -72,12 +84,14 @@ "points": false, "renderer": "flot", "seriesOverrides": [], - "span": 12, + "spaceLength": 10, + "span": 6, "stack": false, "steppedLine": false, "targets": [ { - "expr": "irate(syncer_binlog_events_total[1m])", + "expr": "rate(syncer_binlog_event_count[1m])", + "format": "time_series", "intervalFactor": 2, "legendFormat": "{{job}} - {{type}}", "metric": "syncer_binlog_events_total", @@ -96,6 +110,7 @@ }, "type": "graph", "xaxis": { + "buckets": null, "mode": "time", "name": null, "show": true, @@ -119,37 +134,27 @@ "show": true } ] - } - ], - "repeat": null, - "repeatIteration": null, - "repeatRowId": null, - "showTitle": false, - "title": "Dashboard Row", - "titleSize": "h6" - }, - { - "collapse": false, - "height": 250, - "panels": [ + }, { "aliasColors": {}, "bars": false, - "datasource": "${DS_BIGDATA-CLUSTER}", + "dashLength": 10, + "dashes": false, + "datasource": "${DS_HOTEL-BIZREPORT}", "fill": 1, - "id": 2, + "id": 9, "legend": { - "alignAsTable": false, + "alignAsTable": true, "avg": false, - "current": false, - "max": false, + "current": true, + "max": true, "min": false, - "rightSide": false, - "show": true, + "rightSide": true, + "show": false, "sort": "current", - "sortDesc": false, + "sortDesc": true, "total": false, - "values": false + "values": true }, "lines": true, "linewidth": 1, @@ -160,30 +165,25 @@ "points": false, "renderer": "flot", "seriesOverrides": [], + "spaceLength": 10, "span": 6, "stack": false, "steppedLine": false, "targets": [ { - "expr": "syncer_binlog_pos{node=\"syncer\"}", + "expr": "histogram_quantile(0.8, sum(rate(syncer_binlog_event_bucket[1m])) by (le))", + "format": "time_series", "intervalFactor": 2, - "legendFormat": "{{job}} {{node}}", - "metric": "", + "legendFormat": "{{job}} - {{type}}", + "metric": "syncer_binlog_events_total", "refId": "A", - "step": 30 - }, - { - "expr": "syncer_binlog_pos{node=\"master\"}", - "intervalFactor": 2, - "legendFormat": "{{job}} {{node}}", - "refId": "B", - "step": 30 + "step": 20 } ], "thresholds": [], "timeFrom": null, "timeShift": null, - "title": "binlog pos", + "title": "binlog event transform", "tooltip": { "shared": true, "sort": 0, @@ -191,6 +191,7 @@ }, "type": "graph", "xaxis": { + "buckets": null, "mode": "time", "name": null, "show": true, @@ -198,7 +199,7 @@ }, "yaxes": [ { - "format": "none", + "format": "short", "label": null, "logBase": 1, "max": null, @@ -214,21 +215,41 @@ "show": true } ] - }, + } + ], + "repeat": null, + "repeatIteration": null, + "repeatRowId": null, + "showTitle": false, + "title": "Dashboard Row", + "titleSize": "h6" + }, + { + "collapse": false, + "height": 250, + "panels": [ { "aliasColors": {}, "bars": false, - "datasource": "${DS_BIGDATA-CLUSTER}", + "dashLength": 10, + "dashes": false, + "datasource": "${DS_HOTEL-BIZREPORT}", "fill": 1, - "id": 4, + "id": 8, "legend": { + "alignAsTable": true, "avg": false, - "current": false, - "max": false, + "current": true, + "hideEmpty": false, + "hideZero": false, + "max": true, "min": false, + "rightSide": true, "show": true, + "sort": "max", + "sortDesc": true, "total": false, - "values": false + "values": true }, "lines": true, "linewidth": 1, @@ -239,29 +260,24 @@ "points": false, "renderer": "flot", "seriesOverrides": [], + "spaceLength": 10, "span": 6, "stack": false, "steppedLine": false, "targets": [ { - "expr": "syncer_binlog_file{node=\"master\"}", + "expr": "histogram_quantile(0.95, sum(rate(syncer_txn_cost_in_second_bucket[1m])) by (le))", + "format": "time_series", "intervalFactor": 2, - "legendFormat": "{{job}} {{node}}", + "legendFormat": "{{job}}", "refId": "A", - "step": 30 - }, - { - "expr": "syncer_binlog_file{node=\"syncer\"}", - "intervalFactor": 2, - "legendFormat": "{{job}} {{node}}", - "refId": "B", - "step": 30 + "step": 20 } ], "thresholds": [], "timeFrom": null, "timeShift": null, - "title": "syncer_binlog_file", + "title": "transaction latency", "tooltip": { "shared": true, "sort": 0, @@ -269,6 +285,7 @@ }, "type": "graph", "xaxis": { + "buckets": null, "mode": "time", "name": null, "show": true, @@ -292,35 +309,63 @@ "show": true } ] - } - ], - "repeat": null, - "repeatIteration": null, - "repeatRowId": null, - "showTitle": false, - "title": "Dashboard Row", - "titleSize": "h6" - }, - { - "collapse": false, - "height": 250, - "panels": [ + }, { + "alert": { + "conditions": [ + { + "evaluator": { + "params": [ + 1000 + ], + "type": "lt" + }, + "operator": { + "type": "and" + }, + "query": { + "params": [ + "A", + "1m", + "now" + ] + }, + "reducer": { + "params": [], + "type": "avg" + }, + "type": "query" + } + ], + "executionErrorState": "alerting", + "frequency": "60s", + "handler": 1, + "name": "transaction tps alert", + "noDataState": "no_data", + "notifications": [ + { + "id": 1 + } + ] + }, "aliasColors": {}, "bars": false, - "datasource": "${DS_BIGDATA-CLUSTER}", - "decimals": null, + "dashLength": 10, + "dashes": false, + "datasource": "${DS_HOTEL-BIZREPORT}", "fill": 1, - "id": 5, + "id": 7, "legend": { "alignAsTable": true, "avg": false, "current": true, - "max": false, + "hideEmpty": false, + "hideZero": false, + "max": true, "min": false, "rightSide": true, "show": true, - "sort": "current", + "sort": "max", "sortDesc": true, "total": false, "values": true @@ -334,22 +379,32 @@ "points": false, "renderer": "flot", "seriesOverrides": [], - "span": 12, + "spaceLength": 10, + "span": 6, "stack": false, "steppedLine": false, "targets": [ { - "expr": "syncer_gtid", + "expr": "rate(syncer_txn_cost_in_second_count[1m])", + "format": "time_series", "intervalFactor": 2, "legendFormat": "{{job}}", "refId": "A", "step": 20 } ], - "thresholds": [], + "thresholds": [ + { + "colorMode": "critical", + "fill": true, + "line": true, + "op": "lt", + "value": 1000 + } + ], "timeFrom": null, "timeShift": null, - "title": "syncer_gtid", + "title": "transaction tps", "tooltip": { "shared": true, "sort": 0, @@ -357,6 +412,7 @@ }, "type": "graph", "xaxis": { + "buckets": null, "mode": "time", "name": null, "show": true, @@ -380,19 +436,7 @@ "show": true } ] - } - ], - "repeat": null, - "repeatIteration": null, - "repeatRowId": null, - "showTitle": false, - "title": "Dashboard Row", - "titleSize": "h6" - }, - { - "collapse": false, - "height": 250, - "panels": [ + }, { "alert": { "conditions": [ @@ -441,7 +485,9 @@ }, "aliasColors": {}, "bars": false, - "datasource": "${DS_BIGDATA-CLUSTER}", + "dashLength": 10, + "dashes": false, + "datasource": "${DS_HOTEL-BIZREPORT}", "fill": 1, "id": 6, "legend": { @@ -466,12 +512,14 @@ "points": false, "renderer": "flot", "seriesOverrides": [], - "span": 12, + "spaceLength": 10, + "span": 6, "stack": false, "steppedLine": false, "targets": [ { "expr": " syncer_binlog_file{node=\"master\"} - ON(instance, job) syncer_binlog_file{node=\"syncer\"} ", + "format": "time_series", "intervalFactor": 10, "legendFormat": "{{job}}", "refId": "A", @@ -489,7 +537,7 @@ ], "timeFrom": null, "timeShift": null, - "title": "syncer_binlog_file", + "title": "binlog file gap", "tooltip": { "shared": true, "sort": 0, @@ -497,6 +545,7 @@ }, "type": "graph", "xaxis": { + "buckets": null, "mode": "time", "name": null, "show": true, @@ -520,13 +569,102 @@ "show": true } ] + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "${DS_HOTEL-BIZREPORT}", + "fill": 1, + "id": 2, + "legend": { + "alignAsTable": false, + "avg": false, + "current": false, + "max": false, + "min": false, + "rightSide": false, + "show": true, + "sort": "current", + "sortDesc": false, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "links": [], + "nullPointMode": "null", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "span": 6, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "syncer_binlog_pos{node=\"syncer\"}", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "{{job}} {{node}}", + "metric": "", + "refId": "A", + "step": 30 + }, + { + "expr": "syncer_binlog_pos{node=\"master\"}", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "{{job}} {{node}}", + "refId": "B", + "step": 30 + } + ], + "thresholds": [], + "timeFrom": null, + "timeShift": null, + "title": "binlog pos", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "none", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ] } ], "repeat": null, "repeatIteration": null, "repeatRowId": null, - "showTitle": true, - "title": "Binlog file", + "showTitle": false, + "title": "Dashboard Row", "titleSize": "h6" }, { @@ -536,7 +674,93 @@ { "aliasColors": {}, "bars": false, - "datasource": "${DS_BIGDATA-CLUSTER}", + "dashLength": 10, + "dashes": false, + "datasource": "${DS_HOTEL-BIZREPORT}", + "fill": 1, + "id": 4, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "links": [], + "nullPointMode": "null", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "span": 6, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "syncer_binlog_file{node=\"master\"}", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "{{job}} {{node}}", + "refId": "A", + "step": 30 + }, + { + "expr": "syncer_binlog_file{node=\"syncer\"}", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "{{job}} {{node}}", + "refId": "B", + "step": 30 + } + ], + "thresholds": [], + "timeFrom": null, + "timeShift": null, + "title": "syncer_binlog_file", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ] + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "${DS_HOTEL-BIZREPORT}", "fill": 1, "id": 3, "legend": { @@ -559,12 +783,14 @@ "points": false, "renderer": "flot", "seriesOverrides": [], - "span": 12, + "spaceLength": 10, + "span": 6, "stack": false, "steppedLine": false, "targets": [ { - "expr": "irate(syncer_binlog_skipped_events_total[1m])", + "expr": "rate(syncer_binlog_skipped_events_total[1m])", + "format": "time_series", "intervalFactor": 2, "legendFormat": "{{job}} {{type}}", "metric": "syncer_binlog_skipped_events_total", @@ -583,6 +809,7 @@ }, "type": "graph", "xaxis": { + "buckets": null, "mode": "time", "name": null, "show": true, @@ -606,74 +833,23 @@ "show": true } ] - } - ], - "repeat": null, - "repeatIteration": null, - "repeatRowId": null, - "showTitle": false, - "title": "Dashboard Row", - "titleSize": "h6" - }, - { - "collapse": false, - "height": 250, - "panels": [ + }, { - "alert": { - "conditions": [ - { - "evaluator": { - "params": [ - 20 - ], - "type": "gt" - }, - "operator": { - "type": "and" - }, - "query": { - "params": [ - "A", - "5m", - "now" - ] - }, - "reducer": { - "params": [], - "type": "avg" - }, - "type": "query" - } - ], - "executionErrorState": "alerting", - "frequency": "60s", - "handler": 1, - "name": "syncer_txn_costs_gauge_in_second alert", - "noDataState": "no_data", - "notifications": [ - { - "id": 1 - } - ] - }, "aliasColors": {}, "bars": false, - "datasource": "${DS_BIGDATA-CLUSTER}", + "dashLength": 10, + "dashes": false, + "datasource": "${DS_HOTEL-BIZREPORT}", "fill": 1, - "id": 7, + "id": 10, "legend": { "alignAsTable": true, "avg": false, "current": true, - "hideEmpty": false, - "hideZero": false, "max": true, "min": false, "rightSide": true, "show": true, - "sort": "max", - "sortDesc": true, "total": false, "values": true }, @@ -686,30 +862,104 @@ "points": false, "renderer": "flot", "seriesOverrides": [], - "span": 12, + "spaceLength": 10, + "span": 6, "stack": false, "steppedLine": false, "targets": [ { - "expr": "syncer_txn_costs_gauge_in_second", + "expr": "sum(rate(syncer_add_jobs_total[1m])) by (queueNo)", + "format": "time_series", "intervalFactor": 2, - "legendFormat": "{{job}}", + "legendFormat": "", + "metric": "syncer_binlog_skipped_events_total", "refId": "A", "step": 20 } ], - "thresholds": [ + "thresholds": [], + "timeFrom": null, + "timeShift": null, + "title": "execution jobs", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ { - "colorMode": "critical", - "fill": true, - "line": true, - "op": "gt", - "value": 20 + "format": "none", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ] + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "${DS_HOTEL-BIZREPORT}", + "fill": 1, + "id": 11, + "legend": { + "alignAsTable": true, + "avg": false, + "current": true, + "max": true, + "min": false, + "rightSide": true, + "show": false, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "links": [], + "nullPointMode": "null", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "span": 6, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "sum(rate(syncer_add_jobs_total[1m]) - rate(syncer_finished_jobs_total[1m])) by (queueNo)", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "", + "metric": "syncer_binlog_skipped_events_total", + "refId": "A", + "step": 20 } ], + "thresholds": [], "timeFrom": null, "timeShift": null, - "title": "syncer_txn_costs_gauge_in_second", + "title": "pending jobs", "tooltip": { "shared": true, "sort": 0, @@ -717,6 +967,7 @@ }, "type": "graph", "xaxis": { + "buckets": null, "mode": "time", "name": null, "show": true, @@ -724,11 +975,11 @@ }, "yaxes": [ { - "format": "short", + "format": "none", "label": null, "logBase": 1, "max": null, - "min": null, + "min": "0", "show": true }, { @@ -787,5 +1038,5 @@ }, "timezone": "browser", "title": "Syncer", - "version": 24 + "version": 16 } \ No newline at end of file From fc427d0a0b4a4067da9d7070dd5b74cf414db914 Mon Sep 17 00:00:00 2001 From: Louis Date: Tue, 9 Oct 2018 14:29:13 +0800 Subject: [PATCH 03/13] ansible: restrict ansible with min and max version range (#559) --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index c80a36512..28179ddbf 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,3 +1,3 @@ -ansible>=2.4.2 +ansible>=2.4.2,<2.7.0 jinja2>=2.9.6 jmespath>=0.9.0 From a5e3453098f538462d736c87d6d3b4284e72b706 Mon Sep 17 00:00:00 2001 From: liubo Date: Mon, 15 Oct 2018 11:04:00 +0800 Subject: [PATCH 04/13] systemd: add MemoryLimit setting (#564) --- roles/systemd/templates/systemd_binary.service.j2 | 3 +++ 1 file changed, 3 insertions(+) diff --git a/roles/systemd/templates/systemd_binary.service.j2 b/roles/systemd/templates/systemd_binary.service.j2 index cf6191b49..89870c92d 100644 --- a/roles/systemd/templates/systemd_binary.service.j2 +++ b/roles/systemd/templates/systemd_binary.service.j2 @@ -3,6 +3,9 @@ Description={{ service_name }} service After=syslog.target network.target remote-fs.target nss-lookup.target [Service] +{% if MemoryLimit|default("") %} +MemoryLimit={{ MemoryLimit }} +{% endif %} LimitNOFILE=1000000 #LimitCORE=infinity LimitSTACK=10485760 From a0c763aa4f3c547fae623242e16846190863000c Mon Sep 17 00:00:00 2001 From: Allen Zhong Date: Fri, 12 Oct 2018 11:51:18 +0800 Subject: [PATCH 05/13] tidb-insight: collect process info for each module instance (#562) --- roles/collector_pd/tasks/collect_config.yml | 2 +- roles/collector_pd/tasks/collect_log.yml | 2 +- roles/collector_pd/tasks/main.yml | 14 +++++++++----- roles/collector_pump/tasks/collect_log.yml | 2 +- roles/collector_pump/tasks/main.yml | 8 ++++---- roles/collector_tidb/tasks/collect_config.yml | 2 +- roles/collector_tidb/tasks/collect_log.yml | 2 +- roles/collector_tidb/tasks/main.yml | 14 +++++++++----- roles/collector_tikv/tasks/collect_config.yml | 2 +- roles/collector_tikv/tasks/collect_log.yml | 2 +- roles/collector_tikv/tasks/main.yml | 12 ++++++++---- roles/local/templates/common_packages.yml.j2 | 4 ++-- 12 files changed, 39 insertions(+), 27 deletions(-) diff --git a/roles/collector_pd/tasks/collect_config.yml b/roles/collector_pd/tasks/collect_config.yml index 79d46b454..19322b41f 100644 --- a/roles/collector_pd/tasks/collect_config.yml +++ b/roles/collector_pd/tasks/collect_config.yml @@ -13,4 +13,4 @@ when: conf_dir_st.stat.isdir is not defined or conf_dir_st.stat.isdir == False - name: collect pd config - shell: "python {{ collector_dir }}/scripts/tidb-insight/insight.py --output={{ pd_log_dir }} --alias={{ inventory_hostname }} config --dir={{ pd_conf_dir }} --prefix=pd" + shell: "python {{ collector_dir }}/scripts/tidb-insight/insight.py --output={{ pd_log_dir }} --alias=pd_{{ inventory_hostname }} config --dir={{ pd_conf_dir }} --prefix=pd" diff --git a/roles/collector_pd/tasks/collect_log.yml b/roles/collector_pd/tasks/collect_log.yml index ef165c866..7b5731e35 100644 --- a/roles/collector_pd/tasks/collect_log.yml +++ b/roles/collector_pd/tasks/collect_log.yml @@ -9,4 +9,4 @@ when: log_dir_st.stat.isdir is not defined or log_dir_st.stat.isdir == False - name: collect pd log - shell: "python {{ collector_dir }}/scripts/tidb-insight/insight.py --output={{ pd_log_dir }} --alias={{ inventory_hostname }} log --dir={{ pd_log_dir }} --prefix=pd --retention={{ collect_log_recent_hours | default('2') }}" + shell: "python {{ collector_dir }}/scripts/tidb-insight/insight.py --output={{ pd_log_dir }} --alias=pd_{{ inventory_hostname }} log --dir={{ pd_log_dir }} --prefix=pd --retention={{ collect_log_recent_hours | default('2') }}" diff --git a/roles/collector_pd/tasks/main.yml b/roles/collector_pd/tasks/main.yml index 35b09df3f..c6c160091 100644 --- a/roles/collector_pd/tasks/main.yml +++ b/roles/collector_pd/tasks/main.yml @@ -13,20 +13,24 @@ - include_tasks: collect_log.yml - include_tasks: collect_config.yml +- name: collect PD process information + shell: "python {{ collector_dir }}/scripts/tidb-insight/insight.py --output={{ pd_log_dir }} --alias=pd_{{ inventory_hostname }} system --collector --port {{ pd_client_port }}" + become: true + - name: collect PD information - shell: "python {{ collector_dir }}/scripts/tidb-insight/insight.py --output={{ pd_log_dir }} --alias={{ inventory_hostname }} tidb pdctl --host={{ ansible_host }} --port={{ pd_client_port }}" + shell: "python {{ collector_dir }}/scripts/tidb-insight/insight.py --output={{ pd_log_dir }} --alias=pd_{{ inventory_hostname }} tidb pdctl --host={{ ansible_host }} --port={{ pd_client_port }}" - name: compress collected data - shell: "python {{ collector_dir }}/scripts/tidb-insight/insight.py --output={{ pd_log_dir }} --alias={{ inventory_hostname }} archive" + shell: "python {{ collector_dir }}/scripts/tidb-insight/insight.py --output={{ pd_log_dir }} --alias=pd_{{ inventory_hostname }} archive" - name: fetch pd diagnosis tarball with bandwidth limit delegate_to: localhost - shell: "scp -P {{ ansible_port|default(22) }} -l {{ collect_bandwidth_limit|default('10000') }} -o StrictHostKeyChecking=no {{ service_host }}:{{ pd_log_dir }}/{{ inventory_hostname }}.tar.gz {{ fetch_tmp_dir }}/{{ service_host }}/pd_{{ inventory_hostname }}.tar.gz" + shell: "scp -P {{ ansible_port|default(22) }} -l {{ collect_bandwidth_limit|default('10000') }} -o StrictHostKeyChecking=no {{ service_host }}:{{ pd_log_dir }}/pd_{{ inventory_hostname }}.tar.gz {{ fetch_tmp_dir }}/{{ service_host }}/pd_{{ inventory_hostname }}.tar.gz" when: enable_bandwidth_limit|default(true) - name: fetch pd diagnosis tarball without bandwidth limit fetch: - src: "{{ pd_log_dir }}/{{ inventory_hostname }}.tar.gz" + src: "{{ pd_log_dir }}/pd_{{ inventory_hostname }}.tar.gz" dest: "{{ fetch_tmp_dir }}/{{ service_host }}/pd_{{ inventory_hostname }}.tar.gz" flat: yes when: not enable_bandwidth_limit|default(true) @@ -36,4 +40,4 @@ path: "{{ pd_log_dir }}/{{ item }}" state: absent with_items: - - "{{ inventory_hostname }}.tar.gz" + - "pd_{{ inventory_hostname }}.tar.gz" diff --git a/roles/collector_pump/tasks/collect_log.yml b/roles/collector_pump/tasks/collect_log.yml index 1ac2683f1..7659763fb 100644 --- a/roles/collector_pump/tasks/collect_log.yml +++ b/roles/collector_pump/tasks/collect_log.yml @@ -9,4 +9,4 @@ when: log_dir_st.stat.isdir is not defined or log_dir_st.stat.isdir == False - name: collect pump log - shell: "python {{ collector_dir }}/scripts/tidb-insight/insight.py --output={{ pump_log_dir }} --alias={{ inventory_hostname }} log --dir={{ pump_log_dir }} --prefix=pump --retention={{ collect_log_recent_hours | default('2') }}" + shell: "python {{ collector_dir }}/scripts/tidb-insight/insight.py --output={{ pump_log_dir }} --alias=pump_{{ inventory_hostname }} log --dir={{ pump_log_dir }} --prefix=pump --retention={{ collect_log_recent_hours | default('2') }}" diff --git a/roles/collector_pump/tasks/main.yml b/roles/collector_pump/tasks/main.yml index 56627869d..e5a089062 100644 --- a/roles/collector_pump/tasks/main.yml +++ b/roles/collector_pump/tasks/main.yml @@ -13,16 +13,16 @@ - include_tasks: collect_log.yml - name: compress collected data - shell: "python {{ collector_dir }}/scripts/tidb-insight/insight.py --output={{ pump_log_dir }} --alias={{ inventory_hostname }} archive" + shell: "python {{ collector_dir }}/scripts/tidb-insight/insight.py --output={{ pump_log_dir }} --alias=pump_{{ inventory_hostname }} archive" - name: fetch pump diagnosis tarball with bandwidth limit delegate_to: localhost - shell: "scp -P {{ ansible_port|default(22) }} -l {{ collect_bandwidth_limit|default('10000') }} -o StrictHostKeyChecking=no {{ service_host }}:{{ pump_log_dir }}/{{ inventory_hostname }}.tar.gz {{ fetch_tmp_dir }}/{{ service_host }}/pump_{{ inventory_hostname }}.tar.gz" + shell: "scp -P {{ ansible_port|default(22) }} -l {{ collect_bandwidth_limit|default('10000') }} -o StrictHostKeyChecking=no {{ service_host }}:{{ pump_log_dir }}/pump_{{ inventory_hostname }}.tar.gz {{ fetch_tmp_dir }}/{{ service_host }}/pump_{{ inventory_hostname }}.tar.gz" when: enable_bandwidth_limit|default(true) - name: fetch pump diagnosis tarball without bandwidth limit fetch: - src: "{{ pump_log_dir }}/{{ inventory_hostname }}.tar.gz" + src: "{{ pump_log_dir }}/pump_{{ inventory_hostname }}.tar.gz" dest: "{{ fetch_tmp_dir }}/{{ service_host }}/pump_{{ inventory_hostname }}.tar.gz" flat: yes when: not enable_bandwidth_limit|default(true) @@ -32,4 +32,4 @@ path: "{{ pump_log_dir }}/{{ item }}" state: absent with_items: - - "{{ inventory_hostname }}.tar.gz" + - "pump_{{ inventory_hostname }}.tar.gz" diff --git a/roles/collector_tidb/tasks/collect_config.yml b/roles/collector_tidb/tasks/collect_config.yml index 3337fce04..b75b4cd87 100644 --- a/roles/collector_tidb/tasks/collect_config.yml +++ b/roles/collector_tidb/tasks/collect_config.yml @@ -14,4 +14,4 @@ when: conf_dir_st.stat.isdir is not defined or conf_dir_st.stat.isdir == False - name: collect tidb config - shell: "python {{ collector_dir }}/scripts/tidb-insight/insight.py --output={{ tidb_log_dir }} --alias={{ inventory_hostname }} config --dir={{ tidb_conf_dir }} --prefix=tidb" + shell: "python {{ collector_dir }}/scripts/tidb-insight/insight.py --output={{ tidb_log_dir }} --alias=tidb_{{ inventory_hostname }} config --dir={{ tidb_conf_dir }} --prefix=tidb" diff --git a/roles/collector_tidb/tasks/collect_log.yml b/roles/collector_tidb/tasks/collect_log.yml index 8ed6339d2..6a921d7ba 100644 --- a/roles/collector_tidb/tasks/collect_log.yml +++ b/roles/collector_tidb/tasks/collect_log.yml @@ -9,4 +9,4 @@ when: log_dir_st.stat.isdir is not defined or log_dir_st.stat.isdir == False - name: collect tidb log - shell: "python {{ collector_dir }}/scripts/tidb-insight/insight.py --output={{ tidb_log_dir }} --alias={{ inventory_hostname }} log --dir={{ tidb_log_dir }} --prefix=tidb --retention={{ collect_log_recent_hours | default('2') }}" + shell: "python {{ collector_dir }}/scripts/tidb-insight/insight.py --output={{ tidb_log_dir }} --alias=tidb_{{ inventory_hostname }} log --dir={{ tidb_log_dir }} --prefix=tidb --retention={{ collect_log_recent_hours | default('2') }}" diff --git a/roles/collector_tidb/tasks/main.yml b/roles/collector_tidb/tasks/main.yml index 11bc8d549..55e180cac 100644 --- a/roles/collector_tidb/tasks/main.yml +++ b/roles/collector_tidb/tasks/main.yml @@ -13,20 +13,24 @@ - include_tasks: collect_log.yml - include_tasks: collect_config.yml +- name: collect tidb process information + shell: "python {{ collector_dir }}/scripts/tidb-insight/insight.py --output={{ tidb_log_dir }} --alias=tidb_{{ inventory_hostname }} system --collector --port {{ tidb_port }}" + become: true + - name: collect tidb server information - shell: "python {{ collector_dir }}/scripts/tidb-insight/insight.py --output={{ tidb_log_dir }} --alias={{ inventory_hostname }} tidb tidbinfo" + shell: "python {{ collector_dir }}/scripts/tidb-insight/insight.py --output={{ tidb_log_dir }} --alias=tidb_{{ inventory_hostname }} tidb tidbinfo" - name: compress collected data - shell: "python {{ collector_dir }}/scripts/tidb-insight/insight.py --output={{ tidb_log_dir }} --alias={{ inventory_hostname }} archive" + shell: "python {{ collector_dir }}/scripts/tidb-insight/insight.py --output={{ tidb_log_dir }} --alias=tidb_{{ inventory_hostname }} archive" - name: fetch tidb diagnosis tarball with bandwidth limit delegate_to: localhost - shell: "scp -P {{ ansible_port|default(22) }} -l {{ collect_bandwidth_limit|default('10000') }} -o StrictHostKeyChecking=no {{ service_host }}:{{ tidb_log_dir }}/{{ inventory_hostname }}.tar.gz {{ fetch_tmp_dir }}/{{ service_host }}/tidb_{{ inventory_hostname }}.tar.gz" + shell: "scp -P {{ ansible_port|default(22) }} -l {{ collect_bandwidth_limit|default('10000') }} -o StrictHostKeyChecking=no {{ service_host }}:{{ tidb_log_dir }}/tidb_{{ inventory_hostname }}.tar.gz {{ fetch_tmp_dir }}/{{ service_host }}/tidb_{{ inventory_hostname }}.tar.gz" when: enable_bandwidth_limit|default(true) - name: fetch tidb diagnosis tarball without bandwidth limit fetch: - src: "{{ tidb_log_dir }}/{{ inventory_hostname }}.tar.gz" + src: "{{ tidb_log_dir }}/tidb_{{ inventory_hostname }}.tar.gz" dest: "{{ fetch_tmp_dir }}/{{ service_host }}/tidb_{{ inventory_hostname }}.tar.gz" flat: yes when: not enable_bandwidth_limit|default(true) @@ -36,4 +40,4 @@ path: "{{ tidb_log_dir }}/{{ item }}" state: absent with_items: - - "{{ inventory_hostname }}.tar.gz" + - "tidb_{{ inventory_hostname }}.tar.gz" diff --git a/roles/collector_tikv/tasks/collect_config.yml b/roles/collector_tikv/tasks/collect_config.yml index 022fdc44d..1f34158f9 100644 --- a/roles/collector_tikv/tasks/collect_config.yml +++ b/roles/collector_tikv/tasks/collect_config.yml @@ -14,4 +14,4 @@ when: conf_dir_st.stat.isdir is not defined or conf_dir_st.stat.isdir == False - name: collect tikv config - shell: "python {{ collector_dir }}/scripts/tidb-insight/insight.py --output={{ tikv_log_dir }} --alias={{ inventory_hostname }} config --dir={{ tikv_conf_dir }} --prefix=tikv" + shell: "python {{ collector_dir }}/scripts/tidb-insight/insight.py --output={{ tikv_log_dir }} --alias=tikv_{{ inventory_hostname }} config --dir={{ tikv_conf_dir }} --prefix=tikv" diff --git a/roles/collector_tikv/tasks/collect_log.yml b/roles/collector_tikv/tasks/collect_log.yml index 31d389800..89677a8e6 100644 --- a/roles/collector_tikv/tasks/collect_log.yml +++ b/roles/collector_tikv/tasks/collect_log.yml @@ -9,4 +9,4 @@ when: log_dir_st.stat.isdir is not defined or log_dir_st.stat.isdir == False - name: collect tikv log - shell: "python {{ collector_dir }}/scripts/tidb-insight/insight.py --output={{ tikv_log_dir }} --alias={{ inventory_hostname }} log --dir={{ tikv_log_dir }} --prefix=tikv --retention={{ collect_log_recent_hours | default('2') }}" + shell: "python {{ collector_dir }}/scripts/tidb-insight/insight.py --output={{ tikv_log_dir }} --alias=tikv_{{ inventory_hostname }} log --dir={{ tikv_log_dir }} --prefix=tikv --retention={{ collect_log_recent_hours | default('2') }}" diff --git a/roles/collector_tikv/tasks/main.yml b/roles/collector_tikv/tasks/main.yml index bcb7d1046..0f52ead07 100644 --- a/roles/collector_tikv/tasks/main.yml +++ b/roles/collector_tikv/tasks/main.yml @@ -13,17 +13,21 @@ - include_tasks: collect_log.yml - include_tasks: collect_config.yml +- name: collect tikv process information + shell: "python {{ collector_dir }}/scripts/tidb-insight/insight.py --output={{ tikv_log_dir }} --alias=tikv_{{ inventory_hostname }} system --collector --port {{ tikv_port }}" + become: true + - name: compress collected data - shell: "python {{ collector_dir }}/scripts/tidb-insight/insight.py --output={{ tikv_log_dir }} --alias={{ inventory_hostname }} archive" + shell: "python {{ collector_dir }}/scripts/tidb-insight/insight.py --output={{ tikv_log_dir }} --alias=tikv_{{ inventory_hostname }} archive" - name: fetch tikv diagnosis tarball with bandwidth limit delegate_to: localhost - shell: "scp -P {{ ansible_port|default(22) }} -l {{ collect_bandwidth_limit|default('10000') }} -o StrictHostKeyChecking=no {{ service_host }}:{{ tikv_log_dir }}/{{ inventory_hostname }}.tar.gz {{ fetch_tmp_dir }}/{{ service_host }}/tikv_{{ inventory_hostname }}.tar.gz" + shell: "scp -P {{ ansible_port|default(22) }} -l {{ collect_bandwidth_limit|default('10000') }} -o StrictHostKeyChecking=no {{ service_host }}:{{ tikv_log_dir }}/tikv_{{ inventory_hostname }}.tar.gz {{ fetch_tmp_dir }}/{{ service_host }}/tikv_{{ inventory_hostname }}.tar.gz" when: enable_bandwidth_limit|default(true) - name: fetch tikv diagnosis tarball without bandwidth limit fetch: - src: "{{ tikv_log_dir }}/{{ inventory_hostname }}.tar.gz" + src: "{{ tikv_log_dir }}/tikv_{{ inventory_hostname }}.tar.gz" dest: "{{ fetch_tmp_dir }}/{{ service_host }}/tikv_{{ inventory_hostname }}.tar.gz" flat: yes when: not enable_bandwidth_limit|default(true) @@ -33,4 +37,4 @@ path: "{{ tikv_log_dir }}/{{ item }}" state: absent with_items: - - "{{ inventory_hostname }}.tar.gz" + - "tikv_{{ inventory_hostname }}.tar.gz" diff --git a/roles/local/templates/common_packages.yml.j2 b/roles/local/templates/common_packages.yml.j2 index 25a95451f..73ea95ee1 100644 --- a/roles/local/templates/common_packages.yml.j2 +++ b/roles/local/templates/common_packages.yml.j2 @@ -33,5 +33,5 @@ common_packages: diagnosis_packages: - name: tidb-insight - version: v0.2.4-4-gcaa54a6 - url: http://download.pingcap.org/tidb-insight-v0.2.4-4-gcaa54a6.tar.gz + version: v0.2.5 + url: http://download.pingcap.org/tidb-insight-v0.2.5.tar.gz From 3f83256e71208b960cbff1b3a8d2427ae4659de9 Mon Sep 17 00:00:00 2001 From: Louis Date: Tue, 16 Oct 2018 14:53:57 +0800 Subject: [PATCH 06/13] download: fix fio static package (#567) --- roles/local/templates/common_packages.yml.j2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/local/templates/common_packages.yml.j2 b/roles/local/templates/common_packages.yml.j2 index 73ea95ee1..12bb58ecf 100644 --- a/roles/local/templates/common_packages.yml.j2 +++ b/roles/local/templates/common_packages.yml.j2 @@ -17,7 +17,7 @@ common_packages: - name: fio version: 3.8 url: "http://download.pingcap.org/fio-3.8.tar.gz" - checksum: "sha256:aea46916db11bb621b48f7691453a30095cf6b8df64ddcec20890a0135369e30" + checksum: "sha256:15739abde7e74b59ac59df57f129b14fc5cd59e1e2eca2ce37b41f8c289c3d58" - name: grafana_collector version: latest url: http://download.pingcap.org/grafana_collector-latest-linux-amd64.tar.gz From 68fc58df764d794eb9ee3553d0677578c0a38ecf Mon Sep 17 00:00:00 2001 From: lzs <43946384+superlzs0476@users.noreply.github.com> Date: Thu, 18 Oct 2018 11:04:22 +0800 Subject: [PATCH 07/13] Fix randread and sequential write benchmark for latency (#571) --- .../tasks/fio_randread_write.yml | 22 --------- .../tasks/fio_randread_write_latency.yml | 47 +++++++++++++++++++ roles/machine_benchmark/tasks/main.yml | 2 + 3 files changed, 49 insertions(+), 22 deletions(-) create mode 100644 roles/machine_benchmark/tasks/fio_randread_write_latency.yml diff --git a/roles/machine_benchmark/tasks/fio_randread_write.yml b/roles/machine_benchmark/tasks/fio_randread_write.yml index d6e06c86e..87e8073ff 100644 --- a/roles/machine_benchmark/tasks/fio_randread_write.yml +++ b/roles/machine_benchmark/tasks/fio_randread_write.yml @@ -21,18 +21,6 @@ args: chdir: "{{ fio_deploy_dir }}/" -- name: get fio mixed test randread latency - shell: "python parse_fio_output.py --target='fio_randread_write_test.json' --read-lat" - register: disk_mix_randread_lat - args: - chdir: "{{ fio_deploy_dir }}/" - -- name: get fio mixed test write latency - shell: "python parse_fio_output.py --target='fio_randread_write_test.json' --write-lat" - register: disk_mix_write_lat - args: - chdir: "{{ fio_deploy_dir }}/" - - name: get fio mixed randread and sequential write summary shell: "python parse_fio_output.py --target='fio_randread_write_test.json' --summary" register: disk_mix_randread_write_smmary @@ -57,13 +45,3 @@ fail: msg: 'fio mixed randread and sequential write test: sequential write iops of tikv_data_dir disk is too low: {{ disk_mix_write_iops.stdout }} < {{ min_ssd_mix_write_iops }}, it is strongly recommended to use SSD disks for TiKV and PD, or there might be performance issues.' when: disk_mix_write_iops.stdout|int < min_ssd_mix_write_iops|int - -- name: Preflight check - Does fio mixed randread and sequential write latency of tikv_data_dir disk meet requirement - randread - fail: - msg: 'fio mixed randread and sequential write test: randread latency of tikv_data_dir disk is too low: {{ disk_mix_randread_lat.stdout }} ns > {{ max_ssd_mix_randread_lat }} ns, it is strongly recommended to use SSD disks for TiKV and PD, or there might be performance issues.' - when: disk_mix_randread_lat.stdout|int > max_ssd_mix_randread_lat|int - -- name: Preflight check - Does fio mixed randread and sequential write latency of tikv_data_dir disk meet requirement - sequential write - fail: - msg: 'fio mixed randread and sequential write test: sequential write latency of tikv_data_dir disk is too low: {{ disk_mix_write_lat.stdout }} ns > {{ max_ssd_mix_write_lat }} ns, it is strongly recommended to use SSD disks for TiKV and PD, or there might be performance issues.' - when: disk_mix_write_lat.stdout|int > max_ssd_mix_write_lat|int diff --git a/roles/machine_benchmark/tasks/fio_randread_write_latency.yml b/roles/machine_benchmark/tasks/fio_randread_write_latency.yml new file mode 100644 index 000000000..f6ad0a118 --- /dev/null +++ b/roles/machine_benchmark/tasks/fio_randread_write_latency.yml @@ -0,0 +1,47 @@ +--- + +- name: fio mixed randread and sequential write benchmark for latency on tikv_data_dir disk + shell: "cd {{ fio_deploy_dir }} && ./fio -ioengine=psync -bs=32k -fdatasync=1 -thread -rw=randrw -percentage_random=100,0 -size={{ benchmark_size }} -filename=fio_randread_write_latency_test.txt -name='fio mixed randread and sequential write test' -iodepth=1 -runtime=60 -numjobs=1 -group_reporting --output-format=json --output=fio_randread_write_latency_test.json" + register: fio_randread_write_latency + +- name: clean fio mixed randread and sequential write benchmark for latency temporary file + file: + path: "{{ fio_deploy_dir }}/fio_randread_write_latency_test.txt" + state: absent + +- name: get fio mixed test randread latency + shell: "python parse_fio_output.py --target='fio_randread_write_latency_test.json' --read-lat" + register: disk_mix_randread_lat + args: + chdir: "{{ fio_deploy_dir }}/" + +- name: get fio mixed test write latency + shell: "python parse_fio_output.py --target='fio_randread_write_latency_test.json' --write-lat" + register: disk_mix_write_lat + args: + chdir: "{{ fio_deploy_dir }}/" + +- name: get fio mixed randread and sequential write for latency summary + shell: "python parse_fio_output.py --target='fio_randread_write_latency_test.json' --summary" + register: disk_mix_randread_write_latency_smmary + args: + chdir: "{{ fio_deploy_dir }}/" + +- name: fio mixed randread and sequential write benchmark for latency command + debug: + msg: "fio mixed randread and sequential write benchmark for latency command: {{ fio_randread_write_latency.cmd }}." + run_once: true + +- name: fio mixed randread and sequential write benchmark for latency summary + debug: + msg: "fio mixed randread and sequential write benchmark summary: {{ disk_mix_randread_write_latency_smmary.stdout }}." + +- name: Preflight check - Does fio mixed randread and sequential write latency of tikv_data_dir disk meet requirement - randread + fail: + msg: 'fio mixed randread and sequential write test: randread latency of tikv_data_dir disk is too low: {{ disk_mix_randread_lat.stdout }} ns > {{ max_ssd_mix_randread_lat }} ns, it is strongly recommended to use SSD disks for TiKV and PD, or there might be performance issues.' + when: disk_mix_randread_lat.stdout|int > max_ssd_mix_randread_lat|int + +- name: Preflight check - Does fio mixed randread and sequential write latency of tikv_data_dir disk meet requirement - sequential write + fail: + msg: 'fio mixed randread and sequential write test: sequential write latency of tikv_data_dir disk is too low: {{ disk_mix_write_lat.stdout }} ns > {{ max_ssd_mix_write_lat }} ns, it is strongly recommended to use SSD disks for TiKV and PD, or there might be performance issues.' + when: disk_mix_write_lat.stdout|int > max_ssd_mix_write_lat|int diff --git a/roles/machine_benchmark/tasks/main.yml b/roles/machine_benchmark/tasks/main.yml index b9a9be126..a97ff81a6 100644 --- a/roles/machine_benchmark/tasks/main.yml +++ b/roles/machine_benchmark/tasks/main.yml @@ -27,3 +27,5 @@ - include_tasks: fio_randread.yml - include_tasks: fio_randread_write.yml + +- include_tasks: fio_randread_write_latency.yml From b3db0a197c8048acf65e33c825ac20326f46f699 Mon Sep 17 00:00:00 2001 From: Allen Zhong Date: Fri, 19 Oct 2018 01:21:03 +0800 Subject: [PATCH 08/13] tidb-insight: bump tidb-insight package version (#576) --- roles/local/templates/common_packages.yml.j2 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/roles/local/templates/common_packages.yml.j2 b/roles/local/templates/common_packages.yml.j2 index 12bb58ecf..b70073b3f 100644 --- a/roles/local/templates/common_packages.yml.j2 +++ b/roles/local/templates/common_packages.yml.j2 @@ -33,5 +33,5 @@ common_packages: diagnosis_packages: - name: tidb-insight - version: v0.2.5 - url: http://download.pingcap.org/tidb-insight-v0.2.5.tar.gz + version: v0.2.5-1-g99b8fea + url: http://download.pingcap.org/tidb-insight-v0.2.5-1-g99b8fea.tar.gz From 04c5d5bb9961f24398efcf828d63e3c4bdf0ee1e Mon Sep 17 00:00:00 2001 From: disksing Date: Mon, 22 Oct 2018 22:45:19 +0800 Subject: [PATCH 09/13] grafana: fix inconsistent radix units (#578) Signed-off-by: disksing --- scripts/overview.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/overview.json b/scripts/overview.json index 6d54dfdc1..20583272c 100644 --- a/scripts/overview.json +++ b/scripts/overview.json @@ -524,7 +524,7 @@ "decimals": null, "editable": true, "error": false, - "format": "bytes", + "format": "decbytes", "gauge": { "maxValue": 100, "minValue": 0, @@ -602,7 +602,7 @@ "decimals": 1, "editable": true, "error": false, - "format": "bytes", + "format": "decbytes", "gauge": { "maxValue": 100, "minValue": 0, @@ -3440,7 +3440,7 @@ }, "yaxes": [ { - "format": "bytes", + "format": "decbytes", "label": null, "logBase": 1, "max": null, From 3bf80e5f65bffe0beded87d26ac33d7e3bc326d6 Mon Sep 17 00:00:00 2001 From: Ryan Leung Date: Fri, 12 Oct 2018 11:51:35 +0800 Subject: [PATCH 10/13] hide tombstone store (#558) --- scripts/pd.json | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/scripts/pd.json b/scripts/pd.json index b9dfdf574..16d1cc9ee 100644 --- a/scripts/pd.json +++ b/scripts/pd.json @@ -1453,6 +1453,8 @@ "alignAsTable": true, "avg": false, "current": true, + "hideEmpty": true, + "hideZero": true, "max": false, "min": false, "rightSide": true, @@ -1531,6 +1533,8 @@ "alignAsTable": true, "avg": false, "current": true, + "hideEmpty": true, + "hideZero": true, "max": false, "min": false, "rightSide": true, @@ -1612,6 +1616,8 @@ "alignAsTable": true, "avg": false, "current": true, + "hideEmpty": true, + "hideZero": true, "max": true, "min": false, "rightSide": true, @@ -1705,8 +1711,8 @@ "alignAsTable": true, "avg": false, "current": true, - "hideEmpty": false, - "hideZero": false, + "hideEmpty": true, + "hideZero": true, "max": true, "min": false, "rightSide": true, @@ -1797,6 +1803,8 @@ "alignAsTable": true, "avg": false, "current": true, + "hideEmpty": true, + "hideZero": true, "max": true, "min": false, "rightSide": true, @@ -1876,6 +1884,8 @@ "alignAsTable": true, "avg": false, "current": true, + "hideEmpty": true, + "hideZero": true, "max": true, "min": false, "rightSide": true, @@ -1955,6 +1965,8 @@ "alignAsTable": true, "avg": false, "current": true, + "hideEmpty": true, + "hideZero": true, "max": true, "min": false, "rightSide": true, @@ -2034,6 +2046,8 @@ "alignAsTable": true, "avg": false, "current": true, + "hideEmpty": true, + "hideZero": true, "max": true, "min": false, "rightSide": true, From 86bf9eb634cbf0003f66a048d52ccc76f6df705f Mon Sep 17 00:00:00 2001 From: Louis Date: Mon, 29 Oct 2018 11:06:52 +0800 Subject: [PATCH 11/13] release v2.1.0-rc.4 --- inventory.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/inventory.ini b/inventory.ini index b82de435d..d5d95084a 100644 --- a/inventory.ini +++ b/inventory.ini @@ -60,7 +60,7 @@ ansible_user = tidb cluster_name = test-cluster -tidb_version = v2.1.0-rc3 +tidb_version = v2.1.0-rc.4 # process supervision, [systemd, supervise] process_supervision = systemd From 6aba31746d36c208f03e9fa648aabbdb6aed7f27 Mon Sep 17 00:00:00 2001 From: superlzs0476 Date: Thu, 13 Dec 2018 17:35:30 +0800 Subject: [PATCH 12/13] Importer one of PD addresse --- roles/tidb_lightning/templates/tidb-lightning.toml.j2 | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/roles/tidb_lightning/templates/tidb-lightning.toml.j2 b/roles/tidb_lightning/templates/tidb-lightning.toml.j2 index 1671367a9..c7436f0c5 100644 --- a/roles/tidb_lightning/templates/tidb-lightning.toml.j2 +++ b/roles/tidb_lightning/templates/tidb-lightning.toml.j2 @@ -1,12 +1,10 @@ # lightning Configuration {% set all_pd = [] -%} -{% set pd_hosts = groups.pd_servers %} -{% for host in pd_hosts -%} - {% set pd_ip = hostvars[host].ansible_host | default(hostvars[host].inventory_hostname) -%} - {% set pd_port = hostvars[host].pd_client_port -%} - {% set _ = all_pd.append("%s:%s" % (pd_ip, pd_port)) -%} -{% endfor -%} +{% set pd_hosts = groups.pd_servers -%} +{% set pd_ip = hostvars[pd_host].ansible_host | default(hostvars[pd_host].inventory_hostname) -%} +{% set pd_port = hostvars[pd_host].pd_client_port -%} +{% set _ = all_pd.append("%s:%s" % (pd_ip, pd_port)) -%} [lightning] {% for item, value in tidb_lightning_conf.lightning | dictsort -%} From 98c34d733c3cb5b39e1db8d92299085634d824ac Mon Sep 17 00:00:00 2001 From: superlzs0476 Date: Thu, 13 Dec 2018 17:38:40 +0800 Subject: [PATCH 13/13] Importer one of PD addresse --- roles/tidb_lightning/templates/tidb-lightning.toml.j2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/tidb_lightning/templates/tidb-lightning.toml.j2 b/roles/tidb_lightning/templates/tidb-lightning.toml.j2 index c7436f0c5..f00038425 100644 --- a/roles/tidb_lightning/templates/tidb-lightning.toml.j2 +++ b/roles/tidb_lightning/templates/tidb-lightning.toml.j2 @@ -1,7 +1,7 @@ # lightning Configuration {% set all_pd = [] -%} -{% set pd_hosts = groups.pd_servers -%} +{% set pd_host = groups.pd_servers[0] -%} {% set pd_ip = hostvars[pd_host].ansible_host | default(hostvars[pd_host].inventory_hostname) -%} {% set pd_port = hostvars[pd_host].pd_client_port -%} {% set _ = all_pd.append("%s:%s" % (pd_ip, pd_port)) -%}