Giter VIP home page Giter VIP logo

tidb-ansible's Introduction

⚠️ End of project ⚠️

development

Ansible Playbook for TiDB is superseded by TiUP, a powerful tool to manage a TiDB cluster.

And this project has ended. All development/maintenance activities have halted.

As it is free software, people are free and welcome to fork and develop the codebase on their own. However, to avoid any confusion, the original repository is archived and we recommend any further fork/development to proceed with an explicit rename and rebranding first.

We encourage all interested parties to mirror any relevant bits as we can't actively guarantee their existence in the future.

Ansible Playbook for TiDB

Overview

Ansible is an IT automation tool. It can configure systems, deploy software, and orchestrate more advanced IT tasks such as continuous deployments or zero downtime rolling updates.

TiDB-Ansible is a TiDB cluster deployment tool developed by PingCAP, based on Ansible playbook. TiDB-Ansible enables you to quickly deploy a new TiDB cluster which includes PD, TiDB, TiKV, and the cluster monitoring modules.

You can use the TiDB-Ansible configuration file to set up the cluster topology, completing all operation tasks with one click, including:

  • Initializing the system, including creating the user for deployment, setting up the hostname, etc.
  • Deploying the components
  • Rolling update, including module survival detection
  • Cleaning data
  • Cleaning the environment
  • Configuring monitoring modules

Tutorial

License

TiDB-Ansible is under the Apache 2.0 license.

tidb-ansible's People

Contributors

5kbpers avatar andelf avatar andremouche avatar astroprofundis avatar breezewish avatar buggithubs avatar connor1996 avatar crazycs520 avatar disksing avatar hicqu avatar huachaohuang avatar ianthereal avatar jackysp avatar jayson-huang avatar jomenxiao avatar linuxgit avatar little-wallace avatar liubo0127 avatar marsishandsome avatar myonkeminta avatar nolouch avatar overvenus avatar rleungx avatar siddontang avatar superlzs0476 avatar tennix avatar tiancaiamao avatar wsabc01 avatar youjiali1995 avatar zhangjinpeng87 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

tidb-ansible's Issues

Feature Request: save all stderr

Go program will print goroutine stack to stderr under fatal error, which will bypass log files.
Should redirect stderr in run script.

To avoid disk space running out, redirect with > is acceptable.

Should not use >> for append.
Should not append to same log file as main program.

list object has no element 0

[192.168.0.1]: Ansible FAILED! => playbook: deploy.yml; TASK: pd : generate dynamic config; message: {"msg": "The task includes an option with an undefined variable. The error was: list object has no element 0\n\nThe error appears to have been in '/home/tidb/tidb-ansible/roles/pd/tasks/main.yml': line 26, column 3, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n\n- name: generate dynamic config\n ^ here\n"}

sysctl: ipv6 cannot disable?

(item={u'name': u'fs.file-max', u'value': 1000000}) => {"failed": true, "item": {"name": "fs.file-max", "value": 1000000}, "msg": "Failed to reload sysctl: net.ipv4.ip_forward = 0\nnet.ipv4.conf.default.rp_filter = 1\nnet.ipv4.conf.default.accept_source_route = 0\nkernel.sysrq = 0\nkernel.core_uses_pid = 1\nnet.ipv4.tcp_syncookies = 0\nkernel.msgmnb = 65536\nkernel.msgmax = 65536\nkernel.printk = 2\nnet.ipv4.conf.all.promote_secondaries = 1\nnet.ipv4.conf.default.promote_secondaries = 1\nnet.ipv4.neigh.default.gc_thresh3 = 4096\nkernel.softlockup_panic = 1\nkernel.watchdog_thresh = 60\nnet.ipv4.tcp_tw_reuse = 1\nnet.ipv4.tcp_tw_recycle = 0\nnet.ipv4.tcp_fin_timeout = 30\nnet.ipv4.tcp_timestamps = 1\nnet.ipv4.tcp_keepalive_time = 1800\nnet.ipv4.tcp_window_scaling = 0\nnet.ipv4.tcp_sack = 1\nnet.ipv4.ip_local_port_range = 10023 61000\nfs.file-max = 1000000\nvm.overcommit_memory = 0\nnet.core.somaxconn = 32768\nnet.ipv4.ip_local_reserved_ports = 20030-20032,40000-40001,50000-50002\nkernel.core_pattern = /tmp/core\nvm.swappiness = 0\nerror: \"net.ipv6.conf.all.disable_ipv6\" is an unknown key\nerror: \"net.ipv6.neigh.default.gc_thresh3\" is an unknown key\n"}

What's more,

$ cat /proc/sys/net/ipv6/neigh/default/gc_thresh3 
cat: /proc/sys/net/ipv6/neigh/default/gc_thresh3: No such file or directory

$ ls /proc/sys/net/ipv6/
ls: cannot access /proc/sys/net/ipv6/: No such file or directory

现有tidb集群加载binlog配置,报错:

TASK [stop pump by supervise] ********************************************************************************************************************************************************************************
failed: [172.19.6.1] (item=pump) => {"changed": true, "cmd": "cd /data/tidb/deploy/scripts && ./stop_pump.sh", "delta": "0:00:00.093877", "end": "2018-02-13 10:30:17.364685", "item": "pump", "msg": "non-zero return code", "rc": 127, "start": "2018-02-13 10:30:17.270808", "stderr": "/bin/sh: ./stop_pump.sh: No such file or directory", "stderr_lines": ["/bin/sh: ./stop_pump.sh: No such file or directory"], "stdout": "", "stdout_lines": []}

FAILED! => {"changed": false, "msg": "AnsibleUndefinedVariable: 'tidb_version' is undefined"}

i get problem when i run following cmd,anyone can help?

# ansible-playbook local_prepare.yml

PLAY [do local preparation] ********************************************************************************************************************************

TASK [local : Stop if ansible version is too low, make sure that the Ansible version is Ansible 2.4.2 or later, otherwise a compatibility issue occurs.] ***
ok: [localhost] => {
    "changed": false,
    "msg": "All assertions passed"
}

TASK [local : create downloads and resources directories] **************************************************************************************************
changed: [localhost] => (item=/opt/tidb-ansible/downloads)
changed: [localhost] => (item=/opt/tidb-ansible/resources)
changed: [localhost] => (item=/opt/tidb-ansible/resources/bin)

TASK [local : create cert directory] ***********************************************************************************************************************

TASK [local : create packages.yml] *************************************************************************************************************************
fatal: [localhost]: FAILED! => {"changed": false, "msg": "AnsibleUndefinedVariable: 'tidb_version' is undefined"}
	to retry, use: --limit @/opt/tidb-ansible/retry_files/local_prepare.retry

PLAY RECAP *************************************************************************************************************************************************
localhost                  : ok=2    changed=1    unreachable=0    failed=1


ERROR MESSAGE SUMMARY **************************************************************************************************************************************
[localhost]: Ansible FAILED! => playbook: local_prepare.yml; TASK: local : create packages.yml; message: {"changed": false, "msg": "AnsibleUndefinedVariable: 'tidb_version' is undefined"}

Ask for help:
Contact us: [email protected]
It seems that you encounter some problems. You can send an email to the above email address, attached with the tidb-ansible/inventory.ini and tidb-ansible/log/ansible.log files and the error message, or new issue on https://github.com/pingcap/tidb-ansible/issues. We'll try our best to help you deploy a TiDB cluster. Thanks. :-)

my inventory file

# cat inventory.ini
## TiDB Cluster Part
[tidb_servers]
10.100.1.26:22222
10.100.1.27:22222

[tikv_servers]
10.100.1.23:22222
10.100.1.24:22222
10.100.1.25:22222

[pd_servers]
10.100.1.26:22222
10.100.1.27:22222
10.100.1.7:22222

## Monitoring Part
# prometheus and pushgateway servers
[monitoring_servers]
10.100.1.26:22222

[grafana_servers]
10.100.1.26:22222

# node_exporter and blackbox_exporter servers
[monitored_servers]
10.100.1.26:22222
10.100.1.27:22222
10.100.1.7:22222
10.100.1.23:22222
10.100.1.24:22222
10.100.1.25:22222

## Global variables
[all:vars]
deploy_dir = /data/deploy

# ssh via normal user
ansible_user = tidb

and ansible log

2018-04-16 17:04:09,316 p=25703 u=root |  PLAY [do local preparation] ********************************************************************************************************************************
2018-04-16 17:04:09,356 p=25703 u=root |  TASK [local : Stop if ansible version is too low, make sure that the Ansible version is Ansible 2.4.2 or later, otherwise a compatibility issue occurs.] ***
2018-04-16 17:04:09,455 p=25703 u=root |  ok: [localhost] => {
    "changed": false,
    "msg": "All assertions passed"
}
2018-04-16 17:04:09,467 p=25703 u=root |  TASK [local : create downloads and resources directories] **************************************************************************************************
2018-04-16 17:04:10,575 p=25703 u=root |  changed: [localhost] => (item=/opt/tidb-ansible/downloads)
2018-04-16 17:04:11,358 p=25703 u=root |  changed: [localhost] => (item=/opt/tidb-ansible/resources)
2018-04-16 17:04:12,117 p=25703 u=root |  changed: [localhost] => (item=/opt/tidb-ansible/resources/bin)
2018-04-16 17:04:12,130 p=25703 u=root |  TASK [local : create cert directory] ***********************************************************************************************************************
2018-04-16 17:04:12,226 p=25703 u=root |  TASK [local : create packages.yml] *************************************************************************************************************************
2018-04-16 17:04:12,366 p=25703 u=root |  fatal: [localhost]: FAILED! => {"changed": false, "msg": "AnsibleUndefinedVariable: 'tidb_version' is undefined"}
2018-04-16 17:04:12,366 fail [localhost]: Ansible FAILED! => playbook: local_prepare.yml; TASK: local : create packages.yml; message: {"changed": false, "msg": "AnsibleUndefinedVariable: 'tidb_version' is undefined"}
2018-04-16 17:04:12,380 p=25703 u=root |        to retry, use: --limit @/opt/tidb-ansible/retry_files/local_prepare.retry

2018-04-16 17:04:12,380 p=25703 u=root |  PLAY RECAP *************************************************************************************************************************************************
2018-04-16 17:04:12,381 p=25703 u=root |  localhost                  : ok=2    changed=1    unreachable=0    failed=1
2018-04-16 17:04:12,382 p=25703 u=root |  ERROR MESSAGE SUMMARY **************************************************************************************************************************************
2018-04-16 17:04:12,382 p=25703 u=root |  [localhost]: Ansible FAILED! => playbook: local_prepare.yml; TASK: local : create packages.yml; message: {"changed": false, "msg": "AnsibleUndefinedVariable: 'tidb_version' is undefined"}

2018-04-16 17:04:12,382 p=25703 u=root |  Ask for help:
2018-04-16 17:04:12,383 p=25703 u=root |  Contact us: [email protected]
2018-04-16 17:04:12,383 p=25703 u=root |  It seems that you encounter some problems. You can send an email to the above email address, attached with the tidb-ansible/inventory.ini and tidb-ansible/log/ansible.log files and the error message, or new issue on https://github.com/pingcap/tidb-ansible/issues. We'll try our best to help you deploy a TiDB cluster. Thanks. :-)

ValueError: No JSON object could be decoded

os version:CentOS Linux release 7.4.1708 (Core)
tidb version: GA1.0
python version:2.7.5
ansible 2.4.2.0

the last step,when run
ansible-playbook start.yml
returned errors:

ERROR MESSAGE SUMMARY *********************************************************************************************************************************************************************************************
[10.65.229.17]: Ansible FAILED! => playbook: start.yml; TASK: import grafana dashboards - run import script; message: {"changed": true, "cmd": "./grafana-config-copy.py", "delta": "0:01:01.202153", "end": "2018-04-26 18:11:47.762065", "msg": "non-zero return code", "rc": 1, "start": "2018-04-26 18:10:46.559912", "stderr": "Traceback (most recent call last):\n File "./grafana-config-copy.py", line 117, in \n ret = import_dashboard_via_user_pass(dest['url'], dest['user'], dest['password'], dashboard)\n File "./grafana-config-copy.py", line 101, in import_dashboard_via_user_pass\n data = json.load(error)\n File "/usr/lib64/python2.7/json/init.py", line 290, in load\n **kw)\n File "/usr/lib64/python2.7/json/init.py", line 338, in loads\n return _default_decoder.decode(s)\n File "/usr/lib64/python2.7/json/decoder.py", line 366, in decode\n obj, end = self.raw_decode(s, idx=_w(s, 0).end())\n File "/usr/lib64/python2.7/json/decoder.py", line 384, in raw_decode\n raise ValueError("No JSON object could be decoded")\nValueError: No JSON object could be decoded", "stderr_lines": ["Traceback (most recent call last):", " File "./grafana-config-copy.py", line 117, in ", " ret = import_dashboard_via_user_pass(dest['url'], dest['user'], dest['password'], dashboard)", " File "./grafana-config-copy.py", line 101, in import_dashboard_via_user_pass", " data = json.load(error)", " File "/usr/lib64/python2.7/json/init.py", line 290, in load", " **kw)", " File "/usr/lib64/python2.7/json/init.py", line 338, in loads", " return _default_decoder.decode(s)", " File "/usr/lib64/python2.7/json/decoder.py", line 366, in decode", " obj, end = self.raw_decode(s, idx=_w(s, 0).end())", " File "/usr/lib64/python2.7/json/decoder.py", line 384, in raw_decode", " raise ValueError("No JSON object could be decoded")", "ValueError: No JSON object could be decoded"], "stdout": "[load] from <node.json>:node", "stdout_lines": ["[load] from <node.json>:node"]}
Ask for help:
Contact us: [email protected]
It seems that you encounter some problems. You can send an email to the above email address, attached with the tidb-ansible/inventory.ini and tidb-ansible/log/ansible.log files and the error message, or new issue on https://github.com/pingcap/tidb-ansible/issues. We'll try our best to help you deploy a TiDB cluster. Thanks. :-)

the result shows that, only the monitor server(10.65.229.17) failed . seems grafana-config-copy.py this script failed.

I have trouble on deploying pre-ga via ansible

The error message is the following:

FAILED! => {"failed": true, "msg": "The conditional check 'use_systemd' failed. The error was: error while evaluating conditional (use_systemd): 'use_systemd' is undefined\n\nThe error appears to have been in '/home/pingcap/zhexuany/tidb-ansible/roles/systemd/tasks/systemd.yml': line 1, column 3, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n\n- name: create systemd service configuration\n  ^ here\n"}

关于tidb DML语句问题

select user.* from (select 1 union select 2) user limit 1

1054 - Unknown table 'user'
Time: 0.006s

select 1 union select 2;
1
---------------
2
---------------
1

(紧急)安装失败

ERROR MESSAGE SUMMARY ********************************************************************************************************************************************************************************************************************************************************
[192.168.1.44]: Ansible FAILED! => playbook: bootstrap.yml; TASK: bootstrap : setting present kernel params; message: {"changed": false, "msg": "All items completed", "results": [{"_ansible_item_result": true, "_ansible_no_log": false, "_ansible_parsed": true, "changed": false, "failed": true, "invocation": {"module_args": {"ignoreerrors": true, "name": "net.core.somaxconn", "reload": true, "state": "present", "sysctl_file": "/etc/sysctl.conf", "sysctl_set": false, "value": "32768"}}, "item": {"name": "net.core.somaxconn", "value": 32768}, "msg": "Failed to reload sysctl: sysctl: setting key "net.core.somaxconn": Read-only file system\n"}, {"_ansible_item_result": true, "_ansible_no_log": false, "_ansible_parsed": true, "changed": false, "failed": true, "invocation": {"module_args": {"ignoreerrors": true, "name": "vm.swappiness", "reload": true, "state": "present", "sysctl_file": "/etc/sysctl.conf", "sysctl_set": false, "value": "0"}}, "item": {"name": "vm.swappiness", "value": 0}, "msg": "Failed to reload sysctl: sysctl: setting key "net.core.somaxconn": Read-only file system\nsysctl: setting key "vm.swappiness": Read-only file system\n"}, {"_ansible_item_result": true, "_ansible_no_log": false, "_ansible_parsed": true, "changed": false, "failed": true, "invocation": {"module_args": {"ignoreerrors": true, "name": "net.ipv4.tcp_syncookies", "reload": true, "state": "present", "sysctl_file": "/etc/sysctl.conf", "sysctl_set": false, "value": "0"}}, "item": {"name": "net.ipv4.tcp_syncookies", "value": 0}, "msg": "Failed to reload sysctl: sysctl: setting key "net.core.somaxconn": Read-only file system\nsysctl: setting key "vm.swappiness": Read-only file system\n"}, {"_ansible_item_result": true, "_ansible_no_log": false, "_ansible_parsed": true, "changed": false, "failed": true, "invocation": {"module_args": {"ignoreerrors": true, "name": "fs.file-max", "reload": true, "state": "present", "sysctl_file": "/etc/sysctl.conf", "sysctl_set": false, "value": "1000000"}}, "item": {"name": "fs.file-max", "value": 1000000}, "msg": "Failed to reload sysctl: sysctl: setting key "net.core.somaxconn": Read-only file system\nsysctl: setting key "vm.swappiness": Read-only file system\nsysctl: setting key "fs.file-max": Read-only file system\n"}]}

-log-slow-query not defined

in the dir /roles/tidb/templates/run_tidb_binary.sh.j2 line29 -log-slow-query has not defined
and tidb defined slow-query-file

"Unable to find '/tidb-ansible-master/downloads/spark-2.1.1-bin-hadoop2.7-all-in-one.tar.gz' in expected paths."

I got this msg during the deployment of TiDB cluster by performing the command "ansible-playbook deploy.yml" :

TASK [tispark : deploy spark-2.1.1-bin-hadoop2.7] ****************************************************************************************************************************
fatal: [192.168.239.69]: FAILED! => {"changed": false, "failed": true, "msg": "Unable to find '/tidb-ansible-master/downloads/spark-2.1.1-bin-hadoop2.7-all-in-one.tar.gz' in expected paths."}
        to retry, use: --limit @retry_files/deploy.retry

PLAY RECAP *******************************************************************************************************************************************************************
192.168.239.66             : ok=38   changed=14   unreachable=0    failed=0   
192.168.239.67             : ok=38   changed=14   unreachable=0    failed=0   
192.168.239.68             : ok=38   changed=14   unreachable=0    failed=0   
192.168.239.69             : ok=80   changed=35   unreachable=0    failed=1   
localhost                  : ok=1    changed=0    unreachable=0    failed=0   

I checked this path, there's a file named "spark-2.1.1-bin-hadoop2.7.tar.gz", I'm not sure if it's the needed file, I renamed this file to "spark-2.1.1-bin-hadoop2.7-all-in-one.tar.gz", and it works.
This is a new deployment, the binaries are all new downloaded.

Version:
Release Version: 0.9.0
Git Commit Hash: 9f040b850c3c316d1b99e769104d165a6a426fd8
Git Commit Branch: master
UTC Build Time: 2017-09-06 04:03:17

TASK [machine_benchmark : Preflight check - Does the write speed of tikv deploy_dir disk meet requirement]

I'm a bit confused.
TASK [machine_benchmark : Preflight check - Does the write speed of tikv deploy_dir disk meet requirement] ******************************************************************************************************************************************************************** fatal: [10.148.0.11]: FAILED! => {"changed": false, "failed": true, "msg": "dd: the write speed of tikv deploy_dir disk is too slow: 63,7 MB/s < 15 MB/s"} fatal: [10.148.0.12]: FAILED! => {"changed": false, "failed": true, "msg": "dd: the write speed of tikv deploy_dir disk is too slow: 62,2 MB/s < 15 MB/s"} fatal: [10.148.0.14]: FAILED! => {"changed": false, "failed": true, "msg": "dd: the write speed of tikv deploy_dir disk is too slow: 64,9 MB/s < 15 MB/s"} to retry, use: --limit @/home/stanfold/tidb/tidb-ansible/retry_files/bootstrap.retry

What I have to do to to make playbook see that 60 is bigger than 15 ?

Docker Compose 快速构建集群 报错啦,请大牛们帮忙

个人在 VMware 中利用虚拟机,进行集群部署TiDB Docker Compose 安装,报如下错误

4.2.0: Pulling from grafana/grafana
6d827a3ef358: Pull complete
Creating tidbdockercompose_grafana_1 ... done
Creating tidbdockercompose_dashboard-installer_1 ... done
Creating tidbdockercompose_pd2_1 ... done
Creating tidbdockercompose_pd1_1 ... done
Creating tidbdockercompose_pd0_1 ... done
Creating tidbdockercompose_pd1_1 ...
Creating tidbdockercompose_pd2_1 ...
Creating tidbdockercompose_pushgateway_1 ...
Creating tidbdockercompose_prometheus_1 ... done
Creating tidbdockercompose_pushgateway_1 ... done
Creating tidbdockercompose_tidb-vision_1 ...
Creating tidbdockercompose_prometheus_1 ...
Creating tidbdockercompose_dashboard-installer_1 ...
Creating tidbdockercompose_tikv2_1 ...
Creating tidbdockercompose_tidb-vision_1 ... done
Creating tidbdockercompose_tikv1_1 ...

ERROR: for tidbdockercompose_tikv1_1 UnixHTTPConnectionPool(host='localhost', port=None): Read timed out. (read timeout=60)

ERROR: for tidbdockercompose_tikv0_1 UnixHTTPConnectionPool(host='localhost', port=None): Read timed out. (read timeout=60)

ERROR: for tidbdockercompose_tikv2_1 UnixHTTPConnectionPool(host='localhost', port=None): Read timed out. (read timeout=60)

ERROR: for tikv2 UnixHTTPConnectionPool(host='localhost', port=None): Read timed out. (read timeout=60)

ERROR: for tikv1 UnixHTTPConnectionPool(host='localhost', port=None): Read timed out. (read timeout=60)

ERROR: for tikv0 UnixHTTPConnectionPool(host='localhost', port=None): Read timed out. (read timeout=60)
ERROR: An HTTP request took too long to complete. Retry with --verbose to obtain debug information.
If you encounter this issue regularly because of slow network conditions, consider setting COMPOSE_HTTP_TIMEOUT to a higher value (current value: 60).

Support deploy multiple pd on the same node

TiKV and TiDB can be deployed on the same node using different port while PD can't, because the systemd service file generated by ansible is always named as pd.service.

Generally pd shouldn't be deployed on the same node for the same cluster, but in tests we may deploy multiple pd services from different cluster on the same node.

deploy grafana error

hi, start grafana failed when i execute ansible-playbook start.yml.
failed info:
fatal: [10.0.0.28 -> localhost]: FAILED! => {"changed": true, "cmd": "./grafana-config-copy.py", "delta": "0:00:00.051874", "end": "2017-10-19 14:43:30.281220", "failed": true, "rc": 1, "start": "2017-10-19 14:43:30.229346", "stderr": "Traceback (most recent call last):\n File "./grafana-config-copy.py", line 108, in \n src['dashboards'][type_], type_))\nValueError: zero length field name in format", "stderr_lines": ["Traceback (most recent call last):", " File "./grafana-config-copy.py", line 108, in ", " src['dashboards'][type_], type_))", "ValueError: zero length field name in format"], "stdout": "", "stdout_lines": []}

I got permission denied when doing TASK [bootstrap : setting present kernel params]

Hi, guys,

I am getting the following error when executing ansible-playbook bootstrap.yml. It says [Errno 13] Permission denied. But ansible -i inventory.ini all -m shell -a 'whoami' -b successfully passed.

TASK [bootstrap : setting present kernel params] ***********************************************************************************************************************************
failed: [tidb-test.jianshu.int] (item={u'name': u'net.core.somaxconn', u'value': 32768}) => {"changed": false, "item": {"name": "net.core.somaxconn", "value": 32768}, "module_stderr": "Shared connection to tidb-test.jianshu.int closed.\r\n", "module_stdout": "Traceback (most recent call last):\r\n  File \"/tmp/ansible_80jEcm/ansible_module_sysctl.py\", line 402, in <module>\r\n    main()\r\n  File \"/tmp/ansible_80jEcm/ansible_module_sysctl.py\", line 396, in main\r\n    result = SysctlModule(module)\r\n  File \"/tmp/ansible_80jEcm/ansible_module_sysctl.py\", line 135, in __init__\r\n    self.process()\r\n  File \"/tmp/ansible_80jEcm/ansible_module_sysctl.py\", line 186, in process\r\n    self.write_sysctl()\r\n  File \"/tmp/ansible_80jEcm/ansible_module_sysctl.py\", line 351, in write_sysctl\r\n    fd, tmp_path = tempfile.mkstemp('.conf', '.ansible_m_sysctl_', os.path.dirname(self.sysctl_file))\r\n  File \"/usr/lib/python2.7/tempfile.py\", line 314, in mkstemp\r\n    return _mkstemp_inner(dir, prefix, suffix, flags)\r\n  File \"/usr/lib/python2.7/tempfile.py\", line 244, in _mkstemp_inner\r\n    fd = _os.open(file, flags, 0600)\r\nOSError: [Errno 13] Permission denied: '/etc/.ansible_m_sysctl_rnZsNo.conf'\r\n", "msg": "MODULE FAILURE", "rc": 1}
failed: [pd-test.jianshu.int] (item={u'name': u'net.core.somaxconn', u'value': 32768}) => {"changed": false, "item": {"name": "net.core.somaxconn", "value": 32768}, "module_stderr": "Shared connection to pd-test.jianshu.int closed.\r\n", "module_stdout": "Traceback (most recent call last):\r\n  File \"/tmp/ansible_R2AX60/ansible_module_sysctl.py\", line 402, in <module>\r\n    main()\r\n  File \"/tmp/ansible_R2AX60/ansible_module_sysctl.py\", line 396, in main\r\n    result = SysctlModule(module)\r\n  File \"/tmp/ansible_R2AX60/ansible_module_sysctl.py\", line 135, in __init__\r\n    self.process()\r\n  File \"/tmp/ansible_R2AX60/ansible_module_sysctl.py\", line 186, in process\r\n    self.write_sysctl()\r\n  File \"/tmp/ansible_R2AX60/ansible_module_sysctl.py\", line 351, in write_sysctl\r\n    fd, tmp_path = tempfile.mkstemp('.conf', '.ansible_m_sysctl_', os.path.dirname(self.sysctl_file))\r\n  File \"/usr/lib/python2.7/tempfile.py\", line 314, in mkstemp\r\n    return _mkstemp_inner(dir, prefix, suffix, flags)\r\n  File \"/usr/lib/python2.7/tempfile.py\", line 244, in _mkstemp_inner\r\n    fd = _os.open(file, flags, 0600)\r\nOSError: [Errno 13] Permission denied: '/etc/.ansible_m_sysctl_OdMPL9.conf'\r\n", "msg": "MODULE FAILURE", "rc": 1}
failed: [tikv02-test.jianshu.int] (item={u'name': u'net.core.somaxconn', u'value': 32768}) => {"changed": false, "item": {"name": "net.core.somaxconn", "value": 32768}, "module_stderr": "Shared connection to tikv02-test.jianshu.int closed.\r\n", "module_stdout": "Traceback (most recent call last):\r\n  File \"/tmp/ansible_C5Hk6o/ansible_module_sysctl.py\", line 402, in <module>\r\n    main()\r\n  File \"/tmp/ansible_C5Hk6o/ansible_module_sysctl.py\", line 396, in main\r\n    result = SysctlModule(module)\r\n  File \"/tmp/ansible_C5Hk6o/ansible_module_sysctl.py\", line 135, in __init__\r\n    self.process()\r\n  File \"/tmp/ansible_C5Hk6o/ansible_module_sysctl.py\", line 186, in process\r\n    self.write_sysctl()\r\n  File \"/tmp/ansible_C5Hk6o/ansible_module_sysctl.py\", line 351, in write_sysctl\r\n    fd, tmp_path = tempfile.mkstemp('.conf', '.ansible_m_sysctl_', os.path.dirname(self.sysctl_file))\r\n  File \"/usr/lib/python2.7/tempfile.py\", line 314, in mkstemp\r\n    return _mkstemp_inner(dir, prefix, suffix, flags)\r\n  File \"/usr/lib/python2.7/tempfile.py\", line 244, in _mkstemp_inner\r\n    fd = _os.open(file, flags, 0600)\r\nOSError: [Errno 13] Permission denied: '/etc/.ansible_m_sysctl_9vgp6a.conf'\r\n", "msg": "MODULE FAILURE", "rc": 1}
failed: [tikv01-test.jianshu.int] (item={u'name': u'net.core.somaxconn', u'value': 32768}) => {"changed": false, "item": {"name": "net.core.somaxconn", "value": 32768}, "module_stderr": "Shared connection to tikv01-test.jianshu.int closed.\r\n", "module_stdout": "Traceback (most recent call last):\r\n  File \"/tmp/ansible_Tvl0Jw/ansible_module_sysctl.py\", line 402, in <module>\r\n    main()\r\n  File \"/tmp/ansible_Tvl0Jw/ansible_module_sysctl.py\", line 396, in main\r\n    result = SysctlModule(module)\r\n  File \"/tmp/ansible_Tvl0Jw/ansible_module_sysctl.py\", line 135, in __init__\r\n    self.process()\r\n  File \"/tmp/ansible_Tvl0Jw/ansible_module_sysctl.py\", line 186, in process\r\n    self.write_sysctl()\r\n  File \"/tmp/ansible_Tvl0Jw/ansible_module_sysctl.py\", line 351, in write_sysctl\r\n    fd, tmp_path = tempfile.mkstemp('.conf', '.ansible_m_sysctl_', os.path.dirname(self.sysctl_file))\r\n  File \"/usr/lib/python2.7/tempfile.py\", line 314, in mkstemp\r\n    return _mkstemp_inner(dir, prefix, suffix, flags)\r\n  File \"/usr/lib/python2.7/tempfile.py\", line 244, in _mkstemp_inner\r\n    fd = _os.open(file, flags, 0600)\r\nOSError: [Errno 13] Permission denied: '/etc/.ansible_m_sysctl_mgTmcF.conf'\r\n", "msg": "MODULE FAILURE", "rc": 1}
failed: [tikv03-test.jianshu.int] (item={u'name': u'net.core.somaxconn', u'value': 32768}) => {"changed": false, "item": {"name": "net.core.somaxconn", "value": 32768}, "module_stderr": "Shared connection to tikv03-test.jianshu.int closed.\r\n", "module_stdout": "Traceback (most recent call last):\r\n  File \"/tmp/ansible_5Tnyh6/ansible_module_sysctl.py\", line 402, in <module>\r\n    main()\r\n  File \"/tmp/ansible_5Tnyh6/ansible_module_sysctl.py\", line 396, in main\r\n    result = SysctlModule(module)\r\n  File \"/tmp/ansible_5Tnyh6/ansible_module_sysctl.py\", line 135, in __init__\r\n    self.process()\r\n  File \"/tmp/ansible_5Tnyh6/ansible_module_sysctl.py\", line 186, in process\r\n    self.write_sysctl()\r\n  File \"/tmp/ansible_5Tnyh6/ansible_module_sysctl.py\", line 351, in write_sysctl\r\n    fd, tmp_path = tempfile.mkstemp('.conf', '.ansible_m_sysctl_', os.path.dirname(self.sysctl_file))\r\n  File \"/usr/lib/python2.7/tempfile.py\", line 314, in mkstemp\r\n    return _mkstemp_inner(dir, prefix, suffix, flags)\r\n  File \"/usr/lib/python2.7/tempfile.py\", line 244, in _mkstemp_inner\r\n    fd = _os.open(file, flags, 0600)\r\nOSError: [Errno 13] Permission denied: '/etc/.ansible_m_sysctl_dNPck1.conf'\r\n", "msg": "MODULE FAILURE", "rc": 1}
ok: [tidb-test.jianshu.int] => (item={u'name': u'vm.swappiness', u'value': 0})
ok: [pd-test.jianshu.int] => (item={u'name': u'vm.swappiness', u'value': 0})
ok: [tikv02-test.jianshu.int] => (item={u'name': u'vm.swappiness', u'value': 0})
ok: [tikv01-test.jianshu.int] => (item={u'name': u'vm.swappiness', u'value': 0})
ok: [tikv03-test.jianshu.int] => (item={u'name': u'vm.swappiness', u'value': 0})

And there's nothing inside the ansible log:

$ cat tidb-ansible/log/ansible.log
cat: tidb-ansible/log/ansible.log: No such file or directory

直接断电,出现脚本问题,问题可重现

直接断电后重新 执行start脚本出错

TASK [import grafana dashboards - run import script] ***************************
fatal: [192.168.0.11 -> localhost]: FAILED! => {"changed": true, "cmd": "./grafana-config-copy.py", "delta": "0:00:00.496868", "end": "2018-03-17 20:49:56.367339", "msg": "non-zero return code", "rc": 1, "start": "2018-03-17 20:49:55.870471", "stderr": "Traceback (most recent call last):\n File "./grafana-config-copy.py", line 120, in \n print(ret['status'])\nKeyError: u'status'", "stderr_lines": ["Traceback (most recent call last):", " File "./grafana-config-copy.py", line 120, in ", " print(ret['status'])", "KeyError: u'status'"], "stdout": "[load] from <node.json>:node\n[import] as to [Devcluster]\t............. ", "stdout_lines": ["[load] from <node.json>:node", "[import] as to [Devcluster]\t............. "]}
to retry, use: --limit @/home/tidb/tidb-ansible/retry_files/start.retry

systemd脚本路径不同导致deploy的时候出错

$ansible-playbook deploy.yml
...
TASK [systemd : create systemd service configuration] ****************************************************************************
fatal: [10.0.0.4]: FAILED! => {"failed": true, "msg": "Failed to get information on remote file (/etc/systemd/system/node_exporter.service): Shared connection to 10.0.0.4 closed.\r\n"}
fatal: [10.0.0.1]: FAILED! => {"failed": true, "msg": "Failed to get information on remote file (/etc/systemd/system/node_exporter.service): Shared connection to 10.0.0.1 closed.\r\n"}
fatal: [10.0.0.2]: FAILED! => {"failed": true, "msg": "Failed to get information on remote file (/etc/systemd/system/node_exporter.service): Shared connection to 10.0.0.2 closed.\r\n"}
fatal: [10.0.0.3]: FAILED! => {"failed": true, "msg": "Failed to get information on remote file (/etc/systemd/system/node_exporter.service): Shared connection to 10.0.0.3 closed.\r\n"}
to retry, use: --limit @/home/tidb/tidb-ansible/retry_files/deploy.retry

...
$ ls /etc/systemd/system
basic.target.wants default.target.wants multi-user.target.wants sysinit.target.wants
default.target getty.target.wants sockets.target.wants system-update.target.wants

$systemctl show -p FragmentPath sshd
FragmentPath=/usr/lib/systemd/system/sshd.service

$ cat /etc/redhat-release
CentOS Linux release 7.4.1708 (Core)

执行:ansible-playbook start.yml 报错,可能是什么问题导致的?

TASK [wait up] ****************************************************************************
fatal: [tidb1]: FAILED! => {"changed": false, "elapsed": 300, "msg": "Timeout when waiting for search string 200 OK in tidb1:2379"}
Ask for help:
Contact us: [email protected]
It seems that you encounter some problems. You can send an email to the above email address, attached with the tidb-ansible/inventory.ini and tidb-ansible/log/ansible.log files and the error message, or new issue on https://github.com/pingcap/tidb-ansible/issues. We'll try our best to help you deploy a TiDB cluster. Thanks. :-)
to retry, use: --limit @/opt/src/tidb-ansible/retry_files/start.retry
PLAY RECAP ********************************************************************************
localhost : ok=1 changed=0 unreachable=0 failed=0
tidb1 : ok=18 changed=0 unreachable=0 failed=1
tidb2 : ok=15 changed=0 unreachable=0 failed=0
tidb3 : ok=15 changed=0 unreachable=0 failed=0
tidb4 : ok=15 changed=0 unreachable=0 failed=0

ERROR MESSAGE SUMMARY *********************************************************************
[tidb1]: Ansible FAILED! => playbook: start.yml; TASK: wait up; message: {"changed": false, "elapsed": 300, "msg": "Timeout when waiting for search string 200 OK in tidb1:2379"}

bootstrap.yml change my hostname

The hostname of all host listed in inventory.ini has been changed after running ansible-playbook bootstrap.yml

The format of changed hostname is: ip-192-168-0-1

Could not find the requested service alertmanager-9093.service: host

TASK [start alertmanager by systemd] **************************************************************************************************************************************
fatal: [127.0.0.1]: FAILED! => {"changed": false, "msg": "Could not find the requested service alertmanager-9093.service: host"}
	to retry, use: --limit @/root/tidb-ansible/retry_files/start.retry

PLAY RECAP ****************************************************************************************************************************************************************
127.0.0.1                  : ok=15   changed=0    unreachable=0    failed=1   
172.31.0.17             : ok=14   changed=0    unreachable=0    failed=0   
172.31.0.18             : ok=14   changed=0    unreachable=0    failed=0   
TiKV1                      : ok=10   changed=0    unreachable=0    failed=0   


ERROR MESSAGE SUMMARY *****************************************************************************************************************************************************
[127.0.0.1]: Ansible FAILED! => playbook: start.yml; TASK: start alertmanager by systemd; message: {"changed": false, "msg": "Could not find the requested service alertmanager-9093.service: host"}

Ask for help:
Contact us: [email protected]
It seems that you encounter some problems. You can send an email to the above email address, attached with the tidb-ansible/inventory.ini and tidb-ansible/log/ansible.log files and the error message, or new issue on https://github.com/pingcap/tidb-ansible/issues. We'll try our best to help you deploy a TiDB cluster. Thanks. :-)

Create systemd service fails

From the documentation, root user is not recommended. However when using a normal user, who can run sudo without password, will fail to create systemd service:

Ansible FAILED! => playbook: deploy.yml; TASK: systemd : create systemd service configuration; message: {"changed": false, "checksum": "49c0a3726b2e5698520d244b50ac8a9a71814426", "msg": "Destination /etc/systemd/system not writable"}

✗ ansible -i inventory.ini all -m shell -a 'whoami'
172.0.0.1 | SUCCESS | rc=0 >>
guest
✗ ansible -i inventory.ini all -m shell -a 'whoami' -b
172.0.0.1 | SUCCESS | rc=0 >>
root

where grafana_collector?

Ansible FAILED! => playbook: deploy.yml; TASK: grafana_collector : deploy grafana_collector binary; message: {"changed": false, "msg": "Could not find or access '/home/tidb/db/tidb-ansible/resources/bin/grafana_collector

where grafana_collector ?

docker安装监控无法检测

修改了docker 的配置文件 依然无法获得数据???

例子:

docker run -d --name pd1
--net WHCA --ip 192.168.1.101
-v /etc/localtime:/etc/localtime:ro
-v /data:/data
-v /data/to/config/pd.toml:/pd.toml:ro
pingcap/pd:v1.0.1
--name="pd1"
--data-dir="/data/pd1"
--client-urls="http://0.0.0.0:2379"
--advertise-client-urls="http://192.168.1.101:2379"
--peer-urls="http://0.0.0.0:2380"
--advertise-peer-urls="http://192.168.1.101:2380"
--initial-cluster="pd1=http://192.168.1.101:2380,pd2=http://192.168.1.102:2380,pd3=http://192.168.1.103:2380"
--config="/pd.toml"

docker run -d --name tikv1
--net WHCA --ip 192.168.1.104
--ulimit nofile=1000000:1000000
-v /etc/localtime:/etc/localtime:ro
-v /data/to/config/tikv.toml:/tikv.toml:ro
-v /data:/data
pingcap/tikv:v1.0.1
--addr="0.0.0.0:20160"
--advertise-addr="192.168.1.104:20160"
--data-dir="/data/tikv1"
--pd="192.168.1.101:2379,192.168.1.102:2379,192.168.1.103:2379"
--config="/tikv.toml"

docker run -d --name tidb
--net WHCA --ip 192.168.1.107
-v /etc/localtime:/etc/localtime:ro
-v /data/to/config/tidb.toml:/tidb.toml:ro
pingcap/tidb:v1.0.1
--store=tikv
--path="192.168.1.101:2379,192.168.1.102:2379,192.168.1.103:2379"
--config="/tidb.toml"

failed to set present kernel params

ansible-playbook bootstrap.yml -k -vvv

PLAY RECAP *****************************************************************************************************************************
192.168.56.101 : ok=13 changed=0 unreachable=0 failed=1
192.168.56.102 : ok=13 changed=0 unreachable=0 failed=1
192.168.56.103 : ok=13 changed=0 unreachable=0 failed=1
192.168.56.104 : ok=13 changed=0 unreachable=0 failed=1
192.168.56.105 : ok=13 changed=0 unreachable=0 failed=1
192.168.56.106 : ok=13 changed=0 unreachable=0 failed=1
localhost : ok=1 changed=0 unreachable=0 failed=0

ERROR MESSAGE SUMMARY ******************************************************************************************************************

[192.168.56.103]: Ansible FAILED! => playbook: bootstrap.yml; TASK: bootstrap : setting present kernel params; message: {

    "changed": false,

    "msg": "All items completed",

    "results": [

        {

            "_ansible_item_result": true,

            "_ansible_no_log": false,

            "_ansible_parsed": false,

            "changed": false,

            "failed": true,

            "item": {

                "name": "net.core.somaxconn",

                "value": 32768

            },

            "module_stderr": "Shared connection to 192.168.56.103 closed.\r\n",

            "module_stdout": "Traceback (most recent call last):\r\n  File \"/tmp/ansible_ojaqCu/ansible_module_sysctl.py\", line 402, in <module>\r\n    main()\r\n  File \"/tmp/ansible_ojaqCu/ansible_module_sysctl.py\", line 396, in main\r\n    result = SysctlModule(module)\r\n  File \"/tmp/ansible_ojaqCu/ansible_module_sysctl.py\", line 135, in __init__\r\n    self.process()\r\n  File \"/tmp/ansible_ojaqCu/ansible_module_sysctl.py\", line 186, in process\r\n    self.write_sysctl()\r\n  File \"/tmp/ansible_ojaqCu/ansible_module_sysctl.py\", line 351, in write_sysctl\r\n    fd, tmp_path = tempfile.mkstemp('.conf', '.ansible_m_sysctl_', os.path.dirname(self.sysctl_file))\r\n  File \"/usr/lib64/python2.7/tempfile.py\", line 304, in mkstemp\r\n    return _mkstemp_inner(dir, prefix, suffix, flags)\r\n  File \"/usr/lib64/python2.7/tempfile.py\", line 239, in _mkstemp_inner\r\n    fd = _os.open(file, flags, 0600)\r\nOSError: [Errno 13] Permission denied: '/etc/.ansible_m_sysctl_AZxO_h.conf'\r\n",

            "msg": "MODULE FAILURE",

            "rc": 1

        },

        {

            "_ansible_item_result": true,

            "_ansible_no_log": false,

            "_ansible_parsed": false,

            "changed": false,

            "failed": true,

            "item": {

                "name": "vm.swappiness",

                "value": 0

            },

            "module_stderr": "Shared connection to 192.168.56.103 closed.\r\n",

            "module_stdout": "Traceback (most recent call last):\r\n  File \"/tmp/ansible_TGBwZJ/ansible_module_sysctl.py\", line 402, in <module>\r\n    main()\r\n  File \"/tmp/ansible_TGBwZJ/ansible_module_sysctl.py\", line 396, in main\r\n    result = SysctlModule(module)\r\n  File \"/tmp/ansible_TGBwZJ/ansible_module_sysctl.py\", line 135, in __init__\r\n    self.process()\r\n  File \"/tmp/ansible_TGBwZJ/ansible_module_sysctl.py\", line 186, in process\r\n    self.write_sysctl()\r\n  File \"/tmp/ansible_TGBwZJ/ansible_module_sysctl.py\", line 351, in write_sysctl\r\n    fd, tmp_path = tempfile.mkstemp('.conf', '.ansible_m_sysctl_', os.path.dirname(self.sysctl_file))\r\n  File \"/usr/lib64/python2.7/tempfile.py\", line 304, in mkstemp\r\n    return _mkstemp_inner(dir, prefix, suffix, flags)\r\n  File \"/usr/lib64/python2.7/tempfile.py\", line 239, in _mkstemp_inner\r\n    fd = _os.open(file, flags, 0600)\r\nOSError: [Errno 13] Permission denied: '/etc/.ansible_m_sysctl_Zfa9I4.conf'\r\n",

            "msg": "MODULE FAILURE",

            "rc": 1

        },

        {

            "_ansible_item_result": true,

            "_ansible_no_log": false,

            "_ansible_parsed": false,

            "changed": false,

            "failed": true,

            "item": {

                "name": "net.ipv4.tcp_syncookies",

                "value": 0

            },

            "module_stderr": "Shared connection to 192.168.56.103 closed.\r\n",

            "module_stdout": "Traceback (most recent call last):\r\n  File \"/tmp/ansible_V_pcIP/ansible_module_sysctl.py\", line 402, in <module>\r\n    main()\r\n  File \"/tmp/ansible_V_pcIP/ansible_module_sysctl.py\", line 396, in main\r\n    result = SysctlModule(module)\r\n  File \"/tmp/ansible_V_pcIP/ansible_module_sysctl.py\", line 135, in __init__\r\n    self.process()\r\n  File \"/tmp/ansible_V_pcIP/ansible_module_sysctl.py\", line 186, in process\r\n    self.write_sysctl()\r\n  File \"/tmp/ansible_V_pcIP/ansible_module_sysctl.py\", line 351, in write_sysctl\r\n    fd, tmp_path = tempfile.mkstemp('.conf', '.ansible_m_sysctl_', os.path.dirname(self.sysctl_file))\r\n  File \"/usr/lib64/python2.7/tempfile.py\", line 304, in mkstemp\r\n    return _mkstemp_inner(dir, prefix, suffix, flags)\r\n  File \"/usr/lib64/python2.7/tempfile.py\", line 239, in _mkstemp_inner\r\n    fd = _os.open(file, flags, 0600)\r\nOSError: [Errno 13] Permission denied: '/etc/.ansible_m_sysctl_tPRSWl.conf'\r\n",

            "msg": "MODULE FAILURE",

            "rc": 1

        },

        {

            "_ansible_item_result": true,

            "_ansible_no_log": false,

            "_ansible_parsed": false,

            "changed": false,

            "failed": true,

            "item": {

                "name": "fs.file-max",

                "value": 1000000

            },

            "module_stderr": "Shared connection to 192.168.56.103 closed.\r\n",

            "module_stdout": "Traceback (most recent call last):\r\n  File \"/tmp/ansible__D6ihH/ansible_module_sysctl.py\", line 402, in <module>\r\n    main()\r\n  File \"/tmp/ansible__D6ihH/ansible_module_sysctl.py\", line 396, in main\r\n    result = SysctlModule(module)\r\n  File \"/tmp/ansible__D6ihH/ansible_module_sysctl.py\", line 135, in __init__\r\n    self.process()\r\n  File \"/tmp/ansible__D6ihH/ansible_module_sysctl.py\", line 186, in process\r\n    self.write_sysctl()\r\n  File \"/tmp/ansible__D6ihH/ansible_module_sysctl.py\", line 351, in write_sysctl\r\n    fd, tmp_path = tempfile.mkstemp('.conf', '.ansible_m_sysctl_', os.path.dirname(self.sysctl_file))\r\n  File \"/usr/lib64/python2.7/tempfile.py\", line 304, in mkstemp\r\n    return _mkstemp_inner(dir, prefix, suffix, flags)\r\n  File \"/usr/lib64/python2.7/tempfile.py\", line 239, in _mkstemp_inner\r\n    fd = _os.open(file, flags, 0600)\r\nOSError: [Errno 13] Permission denied: '/etc/.ansible_m_sysctl_fdUJL6.conf'\r\n",

            "msg": "MODULE FAILURE",

            "rc": 1

        }

    ]

}

[192.168.56.105]: Ansible FAILED! => playbook: bootstrap.yml; TASK: bootstrap : setting present kernel params; message: {

    "changed": false,

    "msg": "All items completed",

    "results": [

        {

            "_ansible_item_result": true,

            "_ansible_no_log": false,

            "_ansible_parsed": false,

            "changed": false,

            "failed": true,

            "item": {

                "name": "net.core.somaxconn",

                "value": 32768

            },

            "module_stderr": "Shared connection to 192.168.56.105 closed.\r\n",

            "module_stdout": "Traceback (most recent call last):\r\n  File \"/tmp/ansible_c6M9YO/ansible_module_sysctl.py\", line 402, in <module>\r\n    main()\r\n  File \"/tmp/ansible_c6M9YO/ansible_module_sysctl.py\", line 396, in main\r\n    result = SysctlModule(module)\r\n  File \"/tmp/ansible_c6M9YO/ansible_module_sysctl.py\", line 135, in __init__\r\n    self.process()\r\n  File \"/tmp/ansible_c6M9YO/ansible_module_sysctl.py\", line 186, in process\r\n    self.write_sysctl()\r\n  File \"/tmp/ansible_c6M9YO/ansible_module_sysctl.py\", line 351, in write_sysctl\r\n    fd, tmp_path = tempfile.mkstemp('.conf', '.ansible_m_sysctl_', os.path.dirname(self.sysctl_file))\r\n  File \"/usr/lib64/python2.7/tempfile.py\", line 304, in mkstemp\r\n    return _mkstemp_inner(dir, prefix, suffix, flags)\r\n  File \"/usr/lib64/python2.7/tempfile.py\", line 239, in _mkstemp_inner\r\n    fd = _os.open(file, flags, 0600)\r\nOSError: [Errno 13] Permission denied: '/etc/.ansible_m_sysctl_fg2_FK.conf'\r\n",

            "msg": "MODULE FAILURE",

            "rc": 1

        },

        {

            "_ansible_item_result": true,

            "_ansible_no_log": false,

            "_ansible_parsed": false,

            "changed": false,

            "failed": true,

            "item": {

                "name": "vm.swappiness",

                "value": 0

            },

            "module_stderr": "Shared connection to 192.168.56.105 closed.\r\n",

            "module_stdout": "Traceback (most recent call last):\r\n  File \"/tmp/ansible_ay5UMg/ansible_module_sysctl.py\", line 402, in <module>\r\n    main()\r\n  File \"/tmp/ansible_ay5UMg/ansible_module_sysctl.py\", line 396, in main\r\n    result = SysctlModule(module)\r\n  File \"/tmp/ansible_ay5UMg/ansible_module_sysctl.py\", line 135, in __init__\r\n    self.process()\r\n  File \"/tmp/ansible_ay5UMg/ansible_module_sysctl.py\", line 186, in process\r\n    self.write_sysctl()\r\n  File \"/tmp/ansible_ay5UMg/ansible_module_sysctl.py\", line 351, in write_sysctl\r\n    fd, tmp_path = tempfile.mkstemp('.conf', '.ansible_m_sysctl_', os.path.dirname(self.sysctl_file))\r\n  File \"/usr/lib64/python2.7/tempfile.py\", line 304, in mkstemp\r\n    return _mkstemp_inner(dir, prefix, suffix, flags)\r\n  File \"/usr/lib64/python2.7/tempfile.py\", line 239, in _mkstemp_inner\r\n    fd = _os.open(file, flags, 0600)\r\nOSError: [Errno 13] Permission denied: '/etc/.ansible_m_sysctl_D_rLBW.conf'\r\n",

            "msg": "MODULE FAILURE",

            "rc": 1

        },

        {

            "_ansible_item_result": true,

            "_ansible_no_log": false,

            "_ansible_parsed": false,

            "changed": false,

            "failed": true,

            "item": {

                "name": "net.ipv4.tcp_syncookies",

                "value": 0

            },

            "module_stderr": "Shared connection to 192.168.56.105 closed.\r\n",

            "module_stdout": "Traceback (most recent call last):\r\n  File \"/tmp/ansible_95FLiz/ansible_module_sysctl.py\", line 402, in <module>\r\n    main()\r\n  File \"/tmp/ansible_95FLiz/ansible_module_sysctl.py\", line 396, in main\r\n    result = SysctlModule(module)\r\n  File \"/tmp/ansible_95FLiz/ansible_module_sysctl.py\", line 135, in __init__\r\n    self.process()\r\n  File \"/tmp/ansible_95FLiz/ansible_module_sysctl.py\", line 186, in process\r\n    self.write_sysctl()\r\n  File \"/tmp/ansible_95FLiz/ansible_module_sysctl.py\", line 351, in write_sysctl\r\n    fd, tmp_path = tempfile.mkstemp('.conf', '.ansible_m_sysctl_', os.path.dirname(self.sysctl_file))\r\n  File \"/usr/lib64/python2.7/tempfile.py\", line 304, in mkstemp\r\n    return _mkstemp_inner(dir, prefix, suffix, flags)\r\n  File \"/usr/lib64/python2.7/tempfile.py\", line 239, in _mkstemp_inner\r\n    fd = _os.open(file, flags, 0600)\r\nOSError: [Errno 13] Permission denied: '/etc/.ansible_m_sysctl_80sSOM.conf'\r\n",

            "msg": "MODULE FAILURE",

            "rc": 1

        },

        {

            "_ansible_item_result": true,

            "_ansible_no_log": false,

            "_ansible_parsed": false,

            "changed": false,

            "failed": true,

            "item": {

                "name": "fs.file-max",

                "value": 1000000

            },

            "module_stderr": "Shared connection to 192.168.56.105 closed.\r\n",

            "module_stdout": "Traceback (most recent call last):\r\n  File \"/tmp/ansible_5WQGPT/ansible_module_sysctl.py\", line 402, in <module>\r\n    main()\r\n  File \"/tmp/ansible_5WQGPT/ansible_module_sysctl.py\", line 396, in main\r\n    result = SysctlModule(module)\r\n  File \"/tmp/ansible_5WQGPT/ansible_module_sysctl.py\", line 135, in __init__\r\n    self.process()\r\n  File \"/tmp/ansible_5WQGPT/ansible_module_sysctl.py\", line 186, in process\r\n    self.write_sysctl()\r\n  File \"/tmp/ansible_5WQGPT/ansible_module_sysctl.py\", line 351, in write_sysctl\r\n    fd, tmp_path = tempfile.mkstemp('.conf', '.ansible_m_sysctl_', os.path.dirname(self.sysctl_file))\r\n  File \"/usr/lib64/python2.7/tempfile.py\", line 304, in mkstemp\r\n    return _mkstemp_inner(dir, prefix, suffix, flags)\r\n  File \"/usr/lib64/python2.7/tempfile.py\", line 239, in _mkstemp_inner\r\n    fd = _os.open(file, flags, 0600)\r\nOSError: [Errno 13] Permission denied: '/etc/.ansible_m_sysctl_imlQ3E.conf'\r\n",

            "msg": "MODULE FAILURE",

            "rc": 1

        }

    ]

}

[192.168.56.104]: Ansible FAILED! => playbook: bootstrap.yml; TASK: bootstrap : setting present kernel params; message: {

    "changed": false,

    "msg": "All items completed",

    "results": [

        {

            "_ansible_item_result": true,

            "_ansible_no_log": false,

            "_ansible_parsed": false,

            "changed": false,

            "failed": true,

            "item": {

                "name": "net.core.somaxconn",

                "value": 32768

            },

            "module_stderr": "Shared connection to 192.168.56.104 closed.\r\n",

            "module_stdout": "Traceback (most recent call last):\r\n  File \"/tmp/ansible_rHEDNY/ansible_module_sysctl.py\", line 402, in <module>\r\n    main()\r\n  File \"/tmp/ansible_rHEDNY/ansible_module_sysctl.py\", line 396, in main\r\n    result = SysctlModule(module)\r\n  File \"/tmp/ansible_rHEDNY/ansible_module_sysctl.py\", line 135, in __init__\r\n    self.process()\r\n  File \"/tmp/ansible_rHEDNY/ansible_module_sysctl.py\", line 186, in process\r\n    self.write_sysctl()\r\n  File \"/tmp/ansible_rHEDNY/ansible_module_sysctl.py\", line 351, in write_sysctl\r\n    fd, tmp_path = tempfile.mkstemp('.conf', '.ansible_m_sysctl_', os.path.dirname(self.sysctl_file))\r\n  File \"/usr/lib64/python2.7/tempfile.py\", line 304, in mkstemp\r\n    return _mkstemp_inner(dir, prefix, suffix, flags)\r\n  File \"/usr/lib64/python2.7/tempfile.py\", line 239, in _mkstemp_inner\r\n    fd = _os.open(file, flags, 0600)\r\nOSError: [Errno 13] Permission denied: '/etc/.ansible_m_sysctl_C7CskL.conf'\r\n",

            "msg": "MODULE FAILURE",

            "rc": 1

        },

        {

            "_ansible_item_result": true,

            "_ansible_no_log": false,

            "_ansible_parsed": false,

            "changed": false,

            "failed": true,

            "item": {

                "name": "vm.swappiness",

                "value": 0

            },

            "module_stderr": "Shared connection to 192.168.56.104 closed.\r\n",

            "module_stdout": "Traceback (most recent call last):\r\n  File \"/tmp/ansible_IY35nN/ansible_module_sysctl.py\", line 402, in <module>\r\n    main()\r\n  File \"/tmp/ansible_IY35nN/ansible_module_sysctl.py\", line 396, in main\r\n    result = SysctlModule(module)\r\n  File \"/tmp/ansible_IY35nN/ansible_module_sysctl.py\", line 135, in __init__\r\n    self.process()\r\n  File \"/tmp/ansible_IY35nN/ansible_module_sysctl.py\", line 186, in process\r\n    self.write_sysctl()\r\n  File \"/tmp/ansible_IY35nN/ansible_module_sysctl.py\", line 351, in write_sysctl\r\n    fd, tmp_path = tempfile.mkstemp('.conf', '.ansible_m_sysctl_', os.path.dirname(self.sysctl_file))\r\n  File \"/usr/lib64/python2.7/tempfile.py\", line 304, in mkstemp\r\n    return _mkstemp_inner(dir, prefix, suffix, flags)\r\n  File \"/usr/lib64/python2.7/tempfile.py\", line 239, in _mkstemp_inner\r\n    fd = _os.open(file, flags, 0600)\r\nOSError: [Errno 13] Permission denied: '/etc/.ansible_m_sysctl_MH8mbG.conf'\r\n",

            "msg": "MODULE FAILURE",

            "rc": 1

        },

        {

            "_ansible_item_result": true,

            "_ansible_no_log": false,

            "_ansible_parsed": false,

            "changed": false,

            "failed": true,

            "item": {

                "name": "net.ipv4.tcp_syncookies",

                "value": 0

            },

            "module_stderr": "Shared connection to 192.168.56.104 closed.\r\n",

            "module_stdout": "Traceback (most recent call last):\r\n  File \"/tmp/ansible_DcFmh8/ansible_module_sysctl.py\", line 402, in <module>\r\n    main()\r\n  File \"/tmp/ansible_DcFmh8/ansible_module_sysctl.py\", line 396, in main\r\n    result = SysctlModule(module)\r\n  File \"/tmp/ansible_DcFmh8/ansible_module_sysctl.py\", line 135, in __init__\r\n    self.process()\r\n  File \"/tmp/ansible_DcFmh8/ansible_module_sysctl.py\", line 186, in process\r\n    self.write_sysctl()\r\n  File \"/tmp/ansible_DcFmh8/ansible_module_sysctl.py\", line 351, in write_sysctl\r\n    fd, tmp_path = tempfile.mkstemp('.conf', '.ansible_m_sysctl_', os.path.dirname(self.sysctl_file))\r\n  File \"/usr/lib64/python2.7/tempfile.py\", line 304, in mkstemp\r\n    return _mkstemp_inner(dir, prefix, suffix, flags)\r\n  File \"/usr/lib64/python2.7/tempfile.py\", line 239, in _mkstemp_inner\r\n    fd = _os.open(file, flags, 0600)\r\nOSError: [Errno 13] Permission denied: '/etc/.ansible_m_sysctl_j2tgCg.conf'\r\n",

            "msg": "MODULE FAILURE",

            "rc": 1

        },

        {

            "_ansible_item_result": true,

            "_ansible_no_log": false,

            "_ansible_parsed": false,

            "changed": false,

            "failed": true,

            "item": {

                "name": "fs.file-max",

                "value": 1000000

            },

            "module_stderr": "Shared connection to 192.168.56.104 closed.\r\n",

            "module_stdout": "Traceback (most recent call last):\r\n  File \"/tmp/ansible__eCqOK/ansible_module_sysctl.py\", line 402, in <module>\r\n    main()\r\n  File \"/tmp/ansible__eCqOK/ansible_module_sysctl.py\", line 396, in main\r\n    result = SysctlModule(module)\r\n  File \"/tmp/ansible__eCqOK/ansible_module_sysctl.py\", line 135, in __init__\r\n    self.process()\r\n  File \"/tmp/ansible__eCqOK/ansible_module_sysctl.py\", line 186, in process\r\n    self.write_sysctl()\r\n  File \"/tmp/ansible__eCqOK/ansible_module_sysctl.py\", line 351, in write_sysctl\r\n    fd, tmp_path = tempfile.mkstemp('.conf', '.ansible_m_sysctl_', os.path.dirname(self.sysctl_file))\r\n  File \"/usr/lib64/python2.7/tempfile.py\", line 304, in mkstemp\r\n    return _mkstemp_inner(dir, prefix, suffix, flags)\r\n  File \"/usr/lib64/python2.7/tempfile.py\", line 239, in _mkstemp_inner\r\n    fd = _os.open(file, flags, 0600)\r\nOSError: [Errno 13] Permission denied: '/etc/.ansible_m_sysctl_X08Fzg.conf'\r\n",

            "msg": "MODULE FAILURE",

            "rc": 1

        }

    ]

}

[192.168.56.102]: Ansible FAILED! => playbook: bootstrap.yml; TASK: bootstrap : setting present kernel params; message: {

    "changed": false,

    "msg": "All items completed",

    "results": [

        {

            "_ansible_item_result": true,

            "_ansible_no_log": false,

            "_ansible_parsed": false,

            "changed": false,

            "failed": true,

            "item": {

                "name": "net.core.somaxconn",

                "value": 32768

            },

            "module_stderr": "Shared connection to 192.168.56.102 closed.\r\n",

            "module_stdout": "Traceback (most recent call last):\r\n  File \"/tmp/ansible_d6F1fX/ansible_module_sysctl.py\", line 402, in <module>\r\n    main()\r\n  File \"/tmp/ansible_d6F1fX/ansible_module_sysctl.py\", line 396, in main\r\n    result = SysctlModule(module)\r\n  File \"/tmp/ansible_d6F1fX/ansible_module_sysctl.py\", line 135, in __init__\r\n    self.process()\r\n  File \"/tmp/ansible_d6F1fX/ansible_module_sysctl.py\", line 186, in process\r\n    self.write_sysctl()\r\n  File \"/tmp/ansible_d6F1fX/ansible_module_sysctl.py\", line 351, in write_sysctl\r\n    fd, tmp_path = tempfile.mkstemp('.conf', '.ansible_m_sysctl_', os.path.dirname(self.sysctl_file))\r\n  File \"/usr/lib64/python2.7/tempfile.py\", line 304, in mkstemp\r\n    return _mkstemp_inner(dir, prefix, suffix, flags)\r\n  File \"/usr/lib64/python2.7/tempfile.py\", line 239, in _mkstemp_inner\r\n    fd = _os.open(file, flags, 0600)\r\nOSError: [Errno 13] Permission denied: '/etc/.ansible_m_sysctl_k01qgX.conf'\r\n",

            "msg": "MODULE FAILURE",

            "rc": 1

        },

        {

            "_ansible_item_result": true,

            "_ansible_no_log": false,

            "_ansible_parsed": false,

            "changed": false,

            "failed": true,

            "item": {

                "name": "vm.swappiness",

                "value": 0

            },

            "module_stderr": "Shared connection to 192.168.56.102 closed.\r\n",

            "module_stdout": "Traceback (most recent call last):\r\n  File \"/tmp/ansible_jUibFY/ansible_module_sysctl.py\", line 402, in <module>\r\n    main()\r\n  File \"/tmp/ansible_jUibFY/ansible_module_sysctl.py\", line 396, in main\r\n    result = SysctlModule(module)\r\n  File \"/tmp/ansible_jUibFY/ansible_module_sysctl.py\", line 135, in __init__\r\n    self.process()\r\n  File \"/tmp/ansible_jUibFY/ansible_module_sysctl.py\", line 186, in process\r\n    self.write_sysctl()\r\n  File \"/tmp/ansible_jUibFY/ansible_module_sysctl.py\", line 351, in write_sysctl\r\n    fd, tmp_path = tempfile.mkstemp('.conf', '.ansible_m_sysctl_', os.path.dirname(self.sysctl_file))\r\n  File \"/usr/lib64/python2.7/tempfile.py\", line 304, in mkstemp\r\n    return _mkstemp_inner(dir, prefix, suffix, flags)\r\n  File \"/usr/lib64/python2.7/tempfile.py\", line 239, in _mkstemp_inner\r\n    fd = _os.open(file, flags, 0600)\r\nOSError: [Errno 13] Permission denied: '/etc/.ansible_m_sysctl_c_2_Ao.conf'\r\n",

            "msg": "MODULE FAILURE",

            "rc": 1

        },

        {

            "_ansible_item_result": true,

            "_ansible_no_log": false,

            "_ansible_parsed": false,

            "changed": false,

            "failed": true,

            "item": {

                "name": "net.ipv4.tcp_syncookies",

                "value": 0

            },

            "module_stderr": "Shared connection to 192.168.56.102 closed.\r\n",

            "module_stdout": "Traceback (most recent call last):\r\n  File \"/tmp/ansible_N3UxJ9/ansible_module_sysctl.py\", line 402, in <module>\r\n    main()\r\n  File \"/tmp/ansible_N3UxJ9/ansible_module_sysctl.py\", line 396, in main\r\n    result = SysctlModule(module)\r\n  File \"/tmp/ansible_N3UxJ9/ansible_module_sysctl.py\", line 135, in __init__\r\n    self.process()\r\n  File \"/tmp/ansible_N3UxJ9/ansible_module_sysctl.py\", line 186, in process\r\n    self.write_sysctl()\r\n  File \"/tmp/ansible_N3UxJ9/ansible_module_sysctl.py\", line 351, in write_sysctl\r\n    fd, tmp_path = tempfile.mkstemp('.conf', '.ansible_m_sysctl_', os.path.dirname(self.sysctl_file))\r\n  File \"/usr/lib64/python2.7/tempfile.py\", line 304, in mkstemp\r\n    return _mkstemp_inner(dir, prefix, suffix, flags)\r\n  File \"/usr/lib64/python2.7/tempfile.py\", line 239, in _mkstemp_inner\r\n    fd = _os.open(file, flags, 0600)\r\nOSError: [Errno 13] Permission denied: '/etc/.ansible_m_sysctl_qOrR14.conf'\r\n",

            "msg": "MODULE FAILURE",

            "rc": 1

        },

        {

            "_ansible_item_result": true,

            "_ansible_no_log": false,

            "_ansible_parsed": false,

            "changed": false,

            "failed": true,

            "item": {

                "name": "fs.file-max",

                "value": 1000000

            },

            "module_stderr": "Shared connection to 192.168.56.102 closed.\r\n",

            "module_stdout": "Traceback (most recent call last):\r\n  File \"/tmp/ansible_7ziK0j/ansible_module_sysctl.py\", line 402, in <module>\r\n    main()\r\n  File \"/tmp/ansible_7ziK0j/ansible_module_sysctl.py\", line 396, in main\r\n    result = SysctlModule(module)\r\n  File \"/tmp/ansible_7ziK0j/ansible_module_sysctl.py\", line 135, in __init__\r\n    self.process()\r\n  File \"/tmp/ansible_7ziK0j/ansible_module_sysctl.py\", line 186, in process\r\n    self.write_sysctl()\r\n  File \"/tmp/ansible_7ziK0j/ansible_module_sysctl.py\", line 351, in write_sysctl\r\n    fd, tmp_path = tempfile.mkstemp('.conf', '.ansible_m_sysctl_', os.path.dirname(self.sysctl_file))\r\n  File \"/usr/lib64/python2.7/tempfile.py\", line 304, in mkstemp\r\n    return _mkstemp_inner(dir, prefix, suffix, flags)\r\n  File \"/usr/lib64/python2.7/tempfile.py\", line 239, in _mkstemp_inner\r\n    fd = _os.open(file, flags, 0600)\r\nOSError: [Errno 13] Permission denied: '/etc/.ansible_m_sysctl_RMl2RV.conf'\r\n",

            "msg": "MODULE FAILURE",

            "rc": 1

        }

    ]

}

[192.168.56.101]: Ansible FAILED! => playbook: bootstrap.yml; TASK: bootstrap : setting present kernel params; message: {

    "changed": false,

    "msg": "All items completed",

    "results": [

        {

            "_ansible_item_result": true,

            "_ansible_no_log": false,

            "_ansible_parsed": false,

            "changed": false,

            "failed": true,

            "item": {

                "name": "net.core.somaxconn",

                "value": 32768

            },

            "module_stderr": "Shared connection to 192.168.56.101 closed.\r\n",

            "module_stdout": "Traceback (most recent call last):\r\n  File \"/tmp/ansible_XAGiF5/ansible_module_sysctl.py\", line 402, in <module>\r\n    main()\r\n  File \"/tmp/ansible_XAGiF5/ansible_module_sysctl.py\", line 396, in main\r\n    result = SysctlModule(module)\r\n  File \"/tmp/ansible_XAGiF5/ansible_module_sysctl.py\", line 135, in __init__\r\n    self.process()\r\n  File \"/tmp/ansible_XAGiF5/ansible_module_sysctl.py\", line 186, in process\r\n    self.write_sysctl()\r\n  File \"/tmp/ansible_XAGiF5/ansible_module_sysctl.py\", line 351, in write_sysctl\r\n    fd, tmp_path = tempfile.mkstemp('.conf', '.ansible_m_sysctl_', os.path.dirname(self.sysctl_file))\r\n  File \"/usr/lib64/python2.7/tempfile.py\", line 304, in mkstemp\r\n    return _mkstemp_inner(dir, prefix, suffix, flags)\r\n  File \"/usr/lib64/python2.7/tempfile.py\", line 239, in _mkstemp_inner\r\n    fd = _os.open(file, flags, 0600)\r\nOSError: [Errno 13] Permission denied: '/etc/.ansible_m_sysctl_oDKBTU.conf'\r\n",

            "msg": "MODULE FAILURE",

            "rc": 1

        },

        {

            "_ansible_item_result": true,

            "_ansible_no_log": false,

            "_ansible_parsed": false,

            "changed": false,

            "failed": true,

            "item": {

                "name": "vm.swappiness",

                "value": 0

            },

            "module_stderr": "Shared connection to 192.168.56.101 closed.\r\n",

            "module_stdout": "Traceback (most recent call last):\r\n  File \"/tmp/ansible_Pi6U_I/ansible_module_sysctl.py\", line 402, in <module>\r\n    main()\r\n  File \"/tmp/ansible_Pi6U_I/ansible_module_sysctl.py\", line 396, in main\r\n    result = SysctlModule(module)\r\n  File \"/tmp/ansible_Pi6U_I/ansible_module_sysctl.py\", line 135, in __init__\r\n    self.process()\r\n  File \"/tmp/ansible_Pi6U_I/ansible_module_sysctl.py\", line 186, in process\r\n    self.write_sysctl()\r\n  File \"/tmp/ansible_Pi6U_I/ansible_module_sysctl.py\", line 351, in write_sysctl\r\n    fd, tmp_path = tempfile.mkstemp('.conf', '.ansible_m_sysctl_', os.path.dirname(self.sysctl_file))\r\n  File \"/usr/lib64/python2.7/tempfile.py\", line 304, in mkstemp\r\n    return _mkstemp_inner(dir, prefix, suffix, flags)\r\n  File \"/usr/lib64/python2.7/tempfile.py\", line 239, in _mkstemp_inner\r\n    fd = _os.open(file, flags, 0600)\r\nOSError: [Errno 13] Permission denied: '/etc/.ansible_m_sysctl_eNhMmC.conf'\r\n",

            "msg": "MODULE FAILURE",

            "rc": 1

        },

        {

            "_ansible_item_result": true,

            "_ansible_no_log": false,

            "_ansible_parsed": false,

            "changed": false,

            "failed": true,

            "item": {

                "name": "net.ipv4.tcp_syncookies",

                "value": 0

            },

            "module_stderr": "Shared connection to 192.168.56.101 closed.\r\n",

            "module_stdout": "Traceback (most recent call last):\r\n  File \"/tmp/ansible_5XB6rF/ansible_module_sysctl.py\", line 402, in <module>\r\n    main()\r\n  File \"/tmp/ansible_5XB6rF/ansible_module_sysctl.py\", line 396, in main\r\n    result = SysctlModule(module)\r\n  File \"/tmp/ansible_5XB6rF/ansible_module_sysctl.py\", line 135, in __init__\r\n    self.process()\r\n  File \"/tmp/ansible_5XB6rF/ansible_module_sysctl.py\", line 186, in process\r\n    self.write_sysctl()\r\n  File \"/tmp/ansible_5XB6rF/ansible_module_sysctl.py\", line 351, in write_sysctl\r\n    fd, tmp_path = tempfile.mkstemp('.conf', '.ansible_m_sysctl_', os.path.dirname(self.sysctl_file))\r\n  File \"/usr/lib64/python2.7/tempfile.py\", line 304, in mkstemp\r\n    return _mkstemp_inner(dir, prefix, suffix, flags)\r\n  File \"/usr/lib64/python2.7/tempfile.py\", line 239, in _mkstemp_inner\r\n    fd = _os.open(file, flags, 0600)\r\nOSError: [Errno 13] Permission denied: '/etc/.ansible_m_sysctl_z1PuBT.conf'\r\n",

            "msg": "MODULE FAILURE",

            "rc": 1

        },

        {

            "_ansible_item_result": true,

            "_ansible_no_log": false,

            "_ansible_parsed": false,

            "changed": false,

            "failed": true,

            "item": {

                "name": "fs.file-max",

                "value": 1000000

            },

            "module_stderr": "Shared connection to 192.168.56.101 closed.\r\n",

            "module_stdout": "Traceback (most recent call last):\r\n  File \"/tmp/ansible_4cofcH/ansible_module_sysctl.py\", line 402, in <module>\r\n    main()\r\n  File \"/tmp/ansible_4cofcH/ansible_module_sysctl.py\", line 396, in main\r\n    result = SysctlModule(module)\r\n  File \"/tmp/ansible_4cofcH/ansible_module_sysctl.py\", line 135, in __init__\r\n    self.process()\r\n  File \"/tmp/ansible_4cofcH/ansible_module_sysctl.py\", line 186, in process\r\n    self.write_sysctl()\r\n  File \"/tmp/ansible_4cofcH/ansible_module_sysctl.py\", line 351, in write_sysctl\r\n    fd, tmp_path = tempfile.mkstemp('.conf', '.ansible_m_sysctl_', os.path.dirname(self.sysctl_file))\r\n  File \"/usr/lib64/python2.7/tempfile.py\", line 304, in mkstemp\r\n    return _mkstemp_inner(dir, prefix, suffix, flags)\r\n  File \"/usr/lib64/python2.7/tempfile.py\", line 239, in _mkstemp_inner\r\n    fd = _os.open(file, flags, 0600)\r\nOSError: [Errno 13] Permission denied: '/etc/.ansible_m_sysctl_09W832.conf'\r\n",

            "msg": "MODULE FAILURE",

            "rc": 1

        }

    ]

}

[192.168.56.106]: Ansible FAILED! => playbook: bootstrap.yml; TASK: bootstrap : setting present kernel params; message: {

    "changed": false,

    "msg": "All items completed",

    "results": [

        {

            "_ansible_item_result": true,

            "_ansible_no_log": false,

            "_ansible_parsed": false,

            "changed": false,

            "failed": true,

            "item": {

                "name": "net.core.somaxconn",

                "value": 32768

            },

            "module_stderr": "Shared connection to 192.168.56.106 closed.\r\n",

            "module_stdout": "Traceback (most recent call last):\r\n  File \"/tmp/ansible_h1Qnpc/ansible_module_sysctl.py\", line 402, in <module>\r\n    main()\r\n  File \"/tmp/ansible_h1Qnpc/ansible_module_sysctl.py\", line 396, in main\r\n    result = SysctlModule(module)\r\n  File \"/tmp/ansible_h1Qnpc/ansible_module_sysctl.py\", line 135, in __init__\r\n    self.process()\r\n  File \"/tmp/ansible_h1Qnpc/ansible_module_sysctl.py\", line 186, in process\r\n    self.write_sysctl()\r\n  File \"/tmp/ansible_h1Qnpc/ansible_module_sysctl.py\", line 351, in write_sysctl\r\n    fd, tmp_path = tempfile.mkstemp('.conf', '.ansible_m_sysctl_', os.path.dirname(self.sysctl_file))\r\n  File \"/usr/lib64/python2.7/tempfile.py\", line 304, in mkstemp\r\n    return _mkstemp_inner(dir, prefix, suffix, flags)\r\n  File \"/usr/lib64/python2.7/tempfile.py\", line 239, in _mkstemp_inner\r\n    fd = _os.open(file, flags, 0600)\r\nOSError: [Errno 13] Permission denied: '/etc/.ansible_m_sysctl_kanr62.conf'\r\n",

            "msg": "MODULE FAILURE",

            "rc": 1

        },

        {

            "_ansible_item_result": true,

            "_ansible_no_log": false,

            "_ansible_parsed": false,

            "changed": false,

            "failed": true,

            "item": {

                "name": "vm.swappiness",

                "value": 0

            },

            "module_stderr": "Shared connection to 192.168.56.106 closed.\r\n",

            "module_stdout": "Traceback (most recent call last):\r\n  File \"/tmp/ansible_cfmPkC/ansible_module_sysctl.py\", line 402, in <module>\r\n    main()\r\n  File \"/tmp/ansible_cfmPkC/ansible_module_sysctl.py\", line 396, in main\r\n    result = SysctlModule(module)\r\n  File \"/tmp/ansible_cfmPkC/ansible_module_sysctl.py\", line 135, in __init__\r\n    self.process()\r\n  File \"/tmp/ansible_cfmPkC/ansible_module_sysctl.py\", line 186, in process\r\n    self.write_sysctl()\r\n  File \"/tmp/ansible_cfmPkC/ansible_module_sysctl.py\", line 351, in write_sysctl\r\n    fd, tmp_path = tempfile.mkstemp('.conf', '.ansible_m_sysctl_', os.path.dirname(self.sysctl_file))\r\n  File \"/usr/lib64/python2.7/tempfile.py\", line 304, in mkstemp\r\n    return _mkstemp_inner(dir, prefix, suffix, flags)\r\n  File \"/usr/lib64/python2.7/tempfile.py\", line 239, in _mkstemp_inner\r\n    fd = _os.open(file, flags, 0600)\r\nOSError: [Errno 13] Permission denied: '/etc/.ansible_m_sysctl_4zrOwP.conf'\r\n",

            "msg": "MODULE FAILURE",

            "rc": 1

        },

        {

            "_ansible_item_result": true,

            "_ansible_no_log": false,

            "_ansible_parsed": false,

            "changed": false,

            "failed": true,

            "item": {

                "name": "net.ipv4.tcp_syncookies",

                "value": 0

            },

            "module_stderr": "Shared connection to 192.168.56.106 closed.\r\n",

            "module_stdout": "Traceback (most recent call last):\r\n  File \"/tmp/ansible_w7pn0o/ansible_module_sysctl.py\", line 402, in <module>\r\n    main()\r\n  File \"/tmp/ansible_w7pn0o/ansible_module_sysctl.py\", line 396, in main\r\n    result = SysctlModule(module)\r\n  File \"/tmp/ansible_w7pn0o/ansible_module_sysctl.py\", line 135, in __init__\r\n    self.process()\r\n  File \"/tmp/ansible_w7pn0o/ansible_module_sysctl.py\", line 186, in process\r\n    self.write_sysctl()\r\n  File \"/tmp/ansible_w7pn0o/ansible_module_sysctl.py\", line 351, in write_sysctl\r\n    fd, tmp_path = tempfile.mkstemp('.conf', '.ansible_m_sysctl_', os.path.dirname(self.sysctl_file))\r\n  File \"/usr/lib64/python2.7/tempfile.py\", line 304, in mkstemp\r\n    return _mkstemp_inner(dir, prefix, suffix, flags)\r\n  File \"/usr/lib64/python2.7/tempfile.py\", line 239, in _mkstemp_inner\r\n    fd = _os.open(file, flags, 0600)\r\nOSError: [Errno 13] Permission denied: '/etc/.ansible_m_sysctl_GqWDeJ.conf'\r\n",

            "msg": "MODULE FAILURE",

            "rc": 1

        },

        {

            "_ansible_item_result": true,

            "_ansible_no_log": false,

            "_ansible_parsed": false,

            "changed": false,

            "failed": true,

            "item": {

                "name": "fs.file-max",

                "value": 1000000

            },

            "module_stderr": "Shared connection to 192.168.56.106 closed.\r\n",

            "module_stdout": "Traceback (most recent call last):\r\n  File \"/tmp/ansible_bzOJsR/ansible_module_sysctl.py\", line 402, in <module>\r\n    main()\r\n  File \"/tmp/ansible_bzOJsR/ansible_module_sysctl.py\", line 396, in main\r\n    result = SysctlModule(module)\r\n  File \"/tmp/ansible_bzOJsR/ansible_module_sysctl.py\", line 135, in __init__\r\n    self.process()\r\n  File \"/tmp/ansible_bzOJsR/ansible_module_sysctl.py\", line 186, in process\r\n    self.write_sysctl()\r\n  File \"/tmp/ansible_bzOJsR/ansible_module_sysctl.py\", line 351, in write_sysctl\r\n    fd, tmp_path = tempfile.mkstemp('.conf', '.ansible_m_sysctl_', os.path.dirname(self.sysctl_file))\r\n  File \"/usr/lib64/python2.7/tempfile.py\", line 304, in mkstemp\r\n    return _mkstemp_inner(dir, prefix, suffix, flags)\r\n  File \"/usr/lib64/python2.7/tempfile.py\", line 239, in _mkstemp_inner\r\n    fd = _os.open(file, flags, 0600)\r\nOSError: [Errno 13] Permission denied: '/etc/.ansible_m_sysctl_oQnTEq.conf'\r\n",

            "msg": "MODULE FAILURE",

            "rc": 1

        }

    ]

}

ansible --version

ansible 2.4.2.0
config file = /home/tidb/tidb-ansible/ansible.cfg
configured module search path = [u'/root/.ansible/plugins/modules',u'/usr/share/ansible/plugins/modules']
ansible python module location = /usr/lib/python2.7/site-packages/ansible
executable location = /usr/bin/ansible
python version = 2.7.5 (default, Aug 4 2017, 00:39:18) [GCC 4.8.5 20150623 (Red Hat 4.8.5-16)]

ansible -i inventory.ini all -m shell -a 'whoami'

192.168.56.102 | SUCCESS | rc=0 >>
root

192.168.56.105 | SUCCESS | rc=0 >>
root

192.168.56.103 | SUCCESS | rc=0 >>
root

192.168.56.104 | SUCCESS | rc=0 >>
root

192.168.56.101 | SUCCESS | rc=0 >>
root

192.168.56.106 | SUCCESS | rc=0 >>
root

ansible -i inventory.ini all -m shell -a 'whoami' -b

192.168.56.105 | SUCCESS | rc=0 >>
tidb

192.168.56.104 | SUCCESS | rc=0 >>
tidb

192.168.56.103 | SUCCESS | rc=0 >>
tidb

192.168.56.102 | SUCCESS | rc=0 >>
tidb

192.168.56.101 | SUCCESS | rc=0 >>
tidb

192.168.56.106 | SUCCESS | rc=0 >>
tidb

cat inventory.ini

TiDB Cluster Part

[tidb_servers]
192.168.56.101
192.168.56.102

[tikv_servers]
192.168.56.104
192.168.56.105
192.168.56.106

[pd_servers]
192.168.56.101
192.168.56.102
192.168.56.103

[spark_master]

[spark_slaves]

Monitoring Part

prometheus and pushgateway servers

[monitoring_servers]
192.168.56.101

[grafana_servers]
192.168.56.101

node_exporter and blackbox_exporter servers

[monitored_servers]
192.168.56.101
192.168.56.102
192.168.56.103
192.168.56.104
192.168.56.105
192.168.56.106

[alertmanager_servers]

Binlog Part

[pump_servers:children]
tidb_servers

Group variables

[pd_servers:vars]

location_labels = ["zone","rack","host"]

Global variables

[all:vars]
deploy_dir = /home/tidb/deploy

Connection

ssh via @@root:

ansible_user = root

ansible_become = true

ansible_become_user = tidb

Ansible FAILED! => playbook: deploy.yml; TASK: tikv : create config file;

centos 7.3
how can i fix this problem?thx a lot

TASK [tikv : create config file] **************************************************************************************************************************************************************
fatal: [192.168.4.248]: FAILED! => {"changed": false, "msg": "AttributeError: 'unicode' object has no attribute 'items'"}
fatal: [192.168.4.250]: FAILED! => {"changed": false, "msg": "AttributeError: 'unicode' object has no attribute 'items'"}
fatal: [192.168.4.252]: FAILED! => {"changed": false, "msg": "AttributeError: 'unicode' object has no attribute 'items'"}
fatal: [192.168.4.253]: FAILED! => {"changed": false, "msg": "AttributeError: 'unicode' object has no attribute 'items'"}
to retry, use: --limit @/home/tidb/tidb-ansible/retry_files/deploy.retry

PLAY RECAP ************************************************************************************************************************************************************************************
192.168.4.248 : ok=102 changed=7 unreachable=0 failed=1
192.168.4.250 : ok=37 changed=3 unreachable=0 failed=1
192.168.4.252 : ok=37 changed=3 unreachable=0 failed=1
192.168.4.253 : ok=37 changed=3 unreachable=0 failed=1
localhost : ok=1 changed=0 unreachable=0 failed=0

ERROR MESSAGE SUMMARY *************************************************************************************************************************************************************************
[192.168.4.248]: Ansible FAILED! => playbook: deploy.yml; TASK: tikv : create config file; message: {"changed": false, "msg": "AttributeError: 'unicode' object has no attribute 'items'"}

[192.168.4.250]: Ansible FAILED! => playbook: deploy.yml; TASK: tikv : create config file; message: {"changed": false, "msg": "AttributeError: 'unicode' object has no attribute 'items'"}

[192.168.4.252]: Ansible FAILED! => playbook: deploy.yml; TASK: tikv : create config file; message: {"changed": false, "msg": "AttributeError: 'unicode' object has no attribute 'items'"}

[192.168.4.253]: Ansible FAILED! => playbook: deploy.yml; TASK: tikv : create config file; message: {"changed": false, "msg": "AttributeError: 'unicode' object has no attribute 'items'"}

ansible启动的时候[import grafana dashboards - run import script] 这个过程报错

moniter server安装在1921.168.200.192 这个任务在这个ip上执行时就报错,url 404,哪位大佬知道为什么啊
fatal: [192.168.200.192 -> localhost]: FAILED! => {"changed": true, "cmd": "./grafana-config-copy.py", "delta": "0:00:00.085828", "end": "2018-03-14 16:48:53.771198", "msg": "non-zero return code", "rc": 1, "start": "2018-03-14 16:48:53.685370","stderr": "Traceback (most recent call last):\n File "./grafana-config-copy.py", line 119, in \n ret = import_dashboard_via_user_pass(dest['url'], dest['user'], dest['password'], dashboard)\n File "./grafana-config-copy.py", line 103, in import_dashboard_via_user_pass\n data = json.load(error)\n File "/usr/lib64/python2.7/json/init.py", line 290, in load\n **kw)\n File "/usr/lib64/python2.7/json/init.py", line 338, in loads\n return _default_decoder.decode(s)\n File "/usr/lib64/python2.7/json/decoder.py", line 366, in decode\n obj, end = self.raw_decode(s, idx=_w(s, 0).end())\n File "/usr/lib64/python2.7/json/decoder.py", line 384, in raw_decode\n raise ValueError("No JSON object could be decoded")\nValueError: No JSON object could be decoded", "stderr_lines": ["Traceback (most recent call last):", " File "./grafana-config-copy.py", line 119, in ", " ret = import_dashboard_via_user_pass(dest['url'], dest['user'], dest['password'], dashboard)", " File "./grafana-config-copy.py", line 103, in import_dashboard_via_user_pass", " data = json.load(error)", " File "/usr/lib64/python2.7/json/init.py", line 290, in load", " **kw)", " File "/usr/lib64/python2.7/json/init.py", line 338, in loads", " return _default_decoder.decode(s)", " File "/usr/lib64/python2.7/json/decoder.py", line 366, in decode", " obj, end = self.raw_decode(s, idx=_w(s, 0).end())", " File "/usr/lib64/python2.7/json/decoder.py", line 384, in raw_decode", " raise ValueError("No JSON object could be decoded")", "ValueError: No JSON object could be decoded"], "stdout": "[load] from <node.json>:node\n[import] as to [Insight-Tidb-Cluster]\t............. ", "stdout_lines": ["[load] from <node.json>:node", "[import] as to [Insight-Tidb-Cluster]\t............. "]}

Destination /etc/systemd/system not writable

## TASK [systemd : create systemd service configuration] @weekface ******************************************************************************************************************
fatal: [192.168.56.103]: FAILED! => {"changed": false, "checksum": "257c7e68b864ff58e80665287ece3944f49a5596", "msg": "Destination /etc/systemd/system not writable"}
fatal: [192.168.56.105]: FAILED! => {"changed": false, "checksum": "257c7e68b864ff58e80665287ece3944f49a5596", "msg": "Destination /etc/systemd/system not writable"}
fatal: [192.168.56.102]: FAILED! => {"changed": false, "checksum": "257c7e68b864ff58e80665287ece3944f49a5596", "msg": "Destination /etc/systemd/system not writable"}

grafana config does not support specifying ansible_host

Due to

url: "http://{{ inventory_hostname }}:{{ grafana_port }}/"
it is now impossible to specify ansible_host for grafana config, like this:

[grafana_servers]
grafana_my ansible_host=127.0.0.1

start will fail because grafana-config-copy.py tries to import grafana dashboard to url http://grafana_my:xxxx instead of http://127.0.0.1:xxx.

similar issues exist in unsafe_restart.yml as well.

roles/systemd/tasks/systemd.yml don't work without "become: true"

I have an error on deploy stage of tidb (ansible-playbook deploy.yml)

TASK [systemd : create systemd service configuration] ***************************************************************************************************************************************************************************************
fatal: [172.31.38.2]: FAILED! => {"changed": false, "checksum": "0ede0e6cbea0ba6dfe7049cc32c12724896dffb9", "msg": "Destination /etc/systemd/system not writable"}
fatal: [172.31.27.109]: FAILED! => {"changed": false, "checksum": "0ede0e6cbea0ba6dfe7049cc32c12724896dffb9", "msg": "Destination /etc/systemd/system not writable"}
fatal: [172.31.29.164]: FAILED! => {"changed": false, "checksum": "0ede0e6cbea0ba6dfe7049cc32c12724896dffb9", "msg": "Destination /etc/systemd/system not writable"}
fatal: [172.31.20.249]: FAILED! => {"changed": false, "checksum": "0ede0e6cbea0ba6dfe7049cc32c12724896dffb9", "msg": "Destination /etc/systemd/system not writable"}
fatal: [127.0.0.1]: FAILED! => {"changed": false, "checksum": "0ede0e6cbea0ba6dfe7049cc32c12724896dffb9", "msg": "Destination /etc/systemd/system not writable"}
to retry, use: --limit @/home/ubuntu/tidb-ansible/retry_files/deploy.retry

ERROR MESSAGE SUMMARY ***********************************************************************************************************************************************************************************************************************
[172.31.38.2]: Ansible FAILED! => playbook: deploy.yml; TASK: systemd : create systemd service configuration; message: {"changed": false, "checksum": "0ede0e6cbea0ba6dfe7049cc32c12724896dffb9", "msg": "Destination /etc/systemd/system not writable"}

[172.31.27.109]: Ansible FAILED! => playbook: deploy.yml; TASK: systemd : create systemd service configuration; message: {"changed": false, "checksum": "0ede0e6cbea0ba6dfe7049cc32c12724896dffb9", "msg": "Destination /etc/systemd/system not writable"}

[172.31.29.164]: Ansible FAILED! => playbook: deploy.yml; TASK: systemd : create systemd service configuration; message: {"changed": false, "checksum": "0ede0e6cbea0ba6dfe7049cc32c12724896dffb9", "msg": "Destination /etc/systemd/system not writable"}

[172.31.20.249]: Ansible FAILED! => playbook: deploy.yml; TASK: systemd : create systemd service configuration; message: {"changed": false, "checksum": "0ede0e6cbea0ba6dfe7049cc32c12724896dffb9", "msg": "Destination /etc/systemd/system not writable"}

[127.0.0.1]: Ansible FAILED! => playbook: deploy.yml; TASK: systemd : create systemd service configuration; message: {"changed": false, "checksum": "0ede0e6cbea0ba6dfe7049cc32c12724896dffb9", "msg": "Destination /etc/systemd/system not writable"}

I fix this errors with become: true in systemd.yml

What I'm doing wrong ?

machine_benchmark does not work

It's expected fio benchmark will be skipped when set machine_benchmark to false. However it keeps running task "TASK [machine_benchmark : Benchmark randread iops of deploy_dir disk with fio command]".

Should we separate preflight-check from check_config_dynamic?

Every time we deploy or start or do some other things, preflight-check always run. It slows down the whole process, when the tikv cluster become large, say 50 nodes.

Maybe it's better to opt out the check into a separate role, make the callers choose to run if this is wanted.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.