Coder Social home page Coder Social logo

thirdparty-ops's People

Contributors

jomenxiao avatar linuxgit avatar walterwj avatar wangxiangustc avatar wsabc01 avatar zhouqiang-cl 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

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

thirdparty-ops's Issues

add kafka package checksum when downloading

When kafka package's checksum is not correct, the following task will fail.
TASK [kafka : extract kafka package] *************************************************************************************************************************
failed: [kafka2] (item={u'url': u'http://mirrors.tuna.tsinghua.edu.cn/apache/kafka/1.0.0/kafka_2.12-1.0.0.tgz', u'version': u'2.12-1.0.0', u'name': u'kafka'}) => {"failed": true, "item": {"name": "kafka", "url": "http://mirrors.tuna.tsinghua.edu.cn/apache/kafka/1.0.0/kafka_2.12-1.0.0.tgz", "version": "2.12-1.0.0"}, "msg": "Failed to find handler for "/home/pingcap/.ansible/tmp/ansible-tmp-1517294944.77-72928158880522/source". Make sure the required command to extract the file is installed. Command "/bin/tar" could not handle archive. Command "/usr/bin/unzip" could not handle archive."}

Check ansible_user variable

  • name: Check ansible_user variable
    fail: msg="ansible_user == 'root' is not supported, please ssh via normal user"
    when: ansible_user == 'root'

请问为什么要判断ansible_user不能是root?

remove useless dependent packages

https://github.com/pingcap/thirdparty-ops/tree/master/kafka-ansible/roles/packages/packagesfiles
Customer reported issues on CentOS6:

failed: [kafka1] (item=[u’epel-release’, u’java-1.8.0-openjdk-devel’, u’python-simplejson’, u’python-httplib2’, u’man’, u’man-pages’, u’vim-enhanced’, u’sysstat’, u’lsof’, u’jwhois’, u’nc’, u’libselinux-python’, u’ntp’, u’parted’, u’openssh-clients’, u’iotop’, u’unzip’, u’curl’, u’wget’, u’xfsprogs’]) => {“changed”: false, “item”: [“epel-release”, “java-1.8.0-openjdk-devel”, “python-simplejson”, “python-httplib2”, “man”, “man-pages”, “vim-enhanced”, “sysstat”, “lsof”, “jwhois”, “nc”, “libselinux-python”, “ntp”, “parted”, “openssh-clients”, “iotop”, “unzip”, “curl”, “wget”, “xfsprogs”], “msg”: “No package matching ‘python-httplib2’ found available, installed or updated”, “rc”: 126, “results”: [“No package matching ‘python-httplib2’ found available, installed or updated”]}

failed on deploy.yml

I have internet connection, and set offline_deployment: False, yum has been installed on all 3 servers
but during ansible-playbook -i inventory.ini deploy.yml I got below error msg,

TASK [packages : Ensure required packages are installed (yum)] ***********************************************************************************************************************************************
failed: [zk1] (item=[u'epel-release', u'java-1.8.0-openjdk-devel', u'java-1.8.0-openjdk', u'unzip', u'tar']) => {"changed": false, "item": ["epel-release", "java-1.8.0-openjdk-devel", "java-1.8.0-openjdk", "unzip", "tar"], "msg": "Failure talking to yum: Cannot find a valid baseurl for repo: base/7/x86_64"}
failed: [zk2] (item=[u'epel-release', u'java-1.8.0-openjdk-devel', u'java-1.8.0-openjdk', u'unzip', u'tar']) => {"changed": false, "item": ["epel-release", "java-1.8.0-openjdk-devel", "java-1.8.0-openjdk", "unzip", "tar"], "msg": "Failure talking to yum: Cannot find a valid baseurl for repo: base/7/x86_64"}
failed: [zk3] (item=[u'epel-release', u'java-1.8.0-openjdk-devel', u'java-1.8.0-openjdk', u'unzip', u'tar']) => {"changed": false, "item": ["epel-release", "java-1.8.0-openjdk-devel", "java-1.8.0-openjdk", "unzip", "tar"], "msg": "Failure talking to yum: Cannot find a valid baseurl for repo: base/7/x86_64"}

Could not find a version that satisfies the requirement jmespath>=0.9.0

cat requirements.txt 
ansible>=2.4.2,<2.7.0
jinja2>=2.9.6
jmespath>=0.9.0

install requirements
sudo pip install -r requirements.txt Collecting ansible<2.7.0,>=2.4.2 (from -r requirements.txt (line 1)) Downloading https://files.pythonhosted.org/packages/b1/da/6c8f2daff9b776a85eff1ab1ac9bbf3bc67f9e55fa616b4d45dab76fef90/ansible-2.6.20.tar.gz (10.8MB) 100% |████████████████████████████████| 10.8MB 113kB/s Requirement already satisfied (use --upgrade to upgrade): jinja2>=2.9.6 in /usr/lib64/python2.7/site-packages (from -r requirements.txt (line 2)) Collecting jmespath>=0.9.0 (from -r requirements.txt (line 3)) Could not fetch URL https://pypi.python.org/simple/jmespath/: There was a problem confirming the ssl certificate: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:618) - skipping Could not find a version that satisfies the requirement jmespath>=0.9.0 (from -r requirements.txt (line 3)) (from versions: ) No matching distribution found for jmespath>=0.9.0 (from -r requirements.txt (line 3)) You are using pip version 8.1.2, however version 19.3.1 is available. You should consider upgrading via the 'pip install --upgrade pip' command.

/bin/sh: ntpstat command not found

fatal: [kafka2]: FAILED! => {"changed": false, "cmd": "ntpstat | grep -w synchronised | wc -l", "delta": "0:00:00.539018", "end": "2019-11-02 11:28:22.724829", "failed_when_result": true, "rc": 0, "start": "2019-11-02 11:28:22.185811", "stderr": "/bin/sh: ntpstat: команда не найдена", "stderr_lines": ["/bin/sh: ntpstat: команда не найдена"], "stdout": "0", "stdout_lines": ["0"]}
fatal: [kafka1]: FAILED! => {"changed": false, "cmd": "ntpstat | grep -w synchronised | wc -l", "delta": "0:00:00.598372", "end": "2019-11-02 11:28:22.782902", "failed_when_result": true, "rc": 0, "start": "2019-11-02 11:28:22.184530", "stderr": "/bin/sh: ntpstat: команда не найдена", "stderr_lines": ["/bin/sh: ntpstat: команда не найдена"], "stdout": "0", "stdout_lines": ["0"]}
fatal: [kafka3]: FAILED! => {"changed": false, "cmd": "ntpstat | grep -w synchronised | wc -l", "delta": "0:00:00.601710", "end": "2019-11-02 11:28:22.797225", "failed_when_result": true, "rc": 0, "start": "2019-11-02 11:28:22.195515", "stderr": "/bin/sh: ntpstat: команда не найдена", "stderr_lines": ["/bin/sh: ntpstat: команда не найдена"], "stdout": "0", "stdout_lines": ["0"]}```

OS CentOS 7

Stop if ansible version is too low, make sure that the Ansible version is Ansible 2.4.2 or later on Ansible 2.9.0

ansible-playbook -i inventory.ini local_prepare.yml

PLAY [initializing deployment environment] ******************************************************************************************************

TASK [download : 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.] ***
fatal: [localhost]: FAILED! => {"msg": "The conditional check 'ansible_version.full|version_compare('2.4.2', '>=')' failed. The error was: template error while templating string: no filter named 'version_compare'. String: {% if ansible_version.full|version_compare('2.4.2', '>=') %} True {% else %} False {% endif %}"}

PLAY RECAP **************************************************************************************************************************************
localhost                  : ok=0    changed=0    unreachable=0    failed=1    skipped=0    rescued=0    ignored=0   

[centos@ansible-apatsev kafka-ansible]$ ansible --version
ansible 2.9.0
  config file = /home/centos/thirdparty-ops/kafka-ansible/ansible.cfg
  configured module search path = [u'/home/centos/.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, Oct 30 2018, 23:45:53) [GCC 4.8.5 20150623 (Red Hat 4.8.5-36)]

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.