bench
bench copied to clipboard
Cannot install under easy install script on CentOS7
Issue: Easy Install
Do the checklist before filing an issue:
- [x] Did you retain the logfile (path of logfile is shared while the script is run)? We definitely need the logfile to debug any easy install related issues.
- [ ] Is this something you can debug and fix? Send a pull request! Bug fixes and documentation fixes are welcome
Distro Information (Required) Linux I-THH-ERP01 5.3.10-1-pve #1 SMP PVE 5.3.10-1 (Thu, 14 Nov 2019 10:43:13 +0100) x86_64 x86_64 x86_64 GNU/Linux
CentOS Linux release 7.8.2003 (Core) NAME="CentOS Linux" VERSION="7 (Core)" ID="centos" ID_LIKE="rhel fedora" VERSION_ID="7" PRETTY_NAME="CentOS Linux 7 (Core)" ANSI_COLOR="0;31" CPE_NAME="cpe:/o:centos:centos:7" HOME_URL="https://www.centos.org/" BUG_REPORT_URL="https://bugs.centos.org/"
CENTOS_MANTISBT_PROJECT="CentOS-7" CENTOS_MANTISBT_PROJECT_VERSION="7" REDHAT_SUPPORT_PRODUCT="centos" REDHAT_SUPPORT_PRODUCT_VERSION="7"
CentOS Linux release 7.8.2003 (Core) CentOS Linux release 7.8.2003 (Core)
Command Run (Required) python3 install.py --production
Log File (Required) cat /tmp/logs/easy-install__2020-06-16__08-27.log Collecting setuptools Downloading https://files.pythonhosted.org/packages/c4/f9/15ec4639c50f54043a6d385a89447f69b3ee3601f65cc7c17ab8c178f0a6/setuptools-47.3.0-py3-none-any.whl (583kB) Collecting cryptography Downloading https://files.pythonhosted.org/packages/58/95/f1282ca55649b60afcf617e1e2ca384a2a3e7a5cf91f724cf83c8fbe76a1/cryptography-2.9.2-cp35-abi3-manylinux1_x86_64.whl (2.7MB) Collecting ansible==2.8.5 Downloading https://files.pythonhosted.org/packages/04/25/48fee5f8048360d9375e01846fcf395dda58242ed1f25a2106b6794452eb/ansible-2.8.5.tar.gz (14.4MB) Collecting pip Downloading https://files.pythonhosted.org/packages/43/84/23ed6a1796480a6f1a2d38f2802901d078266bda38388954d01d3f2e821d/pip-20.1.1-py2.py3-none-any.whl (1.5MB) Collecting six>=1.4.1 (from cryptography) Downloading https://files.pythonhosted.org/packages/ee/ff/48bde5c0f013094d729fe4b0316ba2a24774b3ff1c52d924a8a4cb04078a/six-1.15.0-py2.py3-none-any.whl Collecting cffi!=1.11.3,>=1.8 (from cryptography) Downloading https://files.pythonhosted.org/packages/f1/c7/72abda280893609e1ddfff90f8064568bd8bcb2c1770a9d5bb5edb2d1fea/cffi-1.14.0-cp36-cp36m-manylinux1_x86_64.whl (399kB) Collecting jinja2 (from ansible==2.8.5) Downloading https://files.pythonhosted.org/packages/30/9e/f663a2aa66a09d838042ae1a2c5659828bb9b41ea3a6efa20a20fd92b121/Jinja2-2.11.2-py2.py3-none-any.whl (125kB) Collecting PyYAML (from ansible==2.8.5) Downloading https://files.pythonhosted.org/packages/64/c2/b80047c7ac2478f9501676c988a5411ed5572f35d1beff9cae07d321512c/PyYAML-5.3.1.tar.gz (269kB) Collecting pycparser (from cffi!=1.11.3,>=1.8->cryptography) Downloading https://files.pythonhosted.org/packages/ae/e7/d9c3a176ca4b02024debf82342dab36efadfc5776f9c8db077e8f6e71821/pycparser-2.20-py2.py3-none-any.whl (112kB) Collecting MarkupSafe>=0.23 (from jinja2->ansible==2.8.5) Downloading https://files.pythonhosted.org/packages/b2/5f/23e0023be6bb885d00ffbefad2942bc51a620328ee910f64abe5a8d18dd1/MarkupSafe-1.1.1-cp36-cp36m-manylinux1_x86_64.whl Installing collected packages: setuptools, six, pycparser, cffi, cryptography, MarkupSafe, jinja2, PyYAML, ansible, pip Running setup.py install for PyYAML: started Running setup.py install for PyYAML: finished with status 'done' Running setup.py install for ansible: started Running setup.py install for ansible: finished with status 'done' Successfully installed MarkupSafe-1.1.1 PyYAML-5.3.1 ansible-2.8.5 cffi-1.14.0 cryptography-2.9.2 jinja2-2.11.2 pip-20.1.1 pycparser-2.20 setuptools-47.3.0 six-1.15.0 ansible-playbook 2.8.5 config file = None configured module search path = ['/root/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules'] ansible python module location = /usr/local/lib/python3.6/site-packages/ansible executable location = /usr/local/bin/ansible-playbook python version = 3.6.8 (default, Apr 2 2020, 13:34:55) [GCC 4.8.5 20150623 (Red Hat 4.8.5-39)] No config file found; using defaults setting up inventory plugins host_list declined parsing /etc/ansible/hosts as it did not pass it's verify_file() method Skipping due to inventory source not existing or not being readable by the current user script declined parsing /etc/ansible/hosts as it did not pass it's verify_file() method auto declined parsing /etc/ansible/hosts as it did not pass it's verify_file() method Skipping due to inventory source not existing or not being readable by the current user yaml declined parsing /etc/ansible/hosts as it did not pass it's verify_file() method Skipping due to inventory source not existing or not being readable by the current user ini declined parsing /etc/ansible/hosts as it did not pass it's verify_file() method Skipping due to inventory source not existing or not being readable by the current user toml declined parsing /etc/ansible/hosts as it did not pass it's verify_file() method Loading callback plugin default of type stdout, v2.0 from /usr/local/lib/python3.6/site-packages/ansible/plugins/callback/default.py
PLAYBOOK: create_user.yml ****************************************************** Positional arguments: create_user.yml verbosity: 4 connection: local timeout: 10 become_method: sudo tags: ('all',) inventory: ('/etc/ansible/hosts',) extra_vars: ('@/tmp/extra_vars.json',) forks: 5 1 plays in create_user.yml
PLAY [localhost] ***************************************************************
TASK [Gathering Facts] *********************************************************
task path: /tmp/.bench/playbooks/create_user.yml:3
<127.0.0.1> ESTABLISH LOCAL CONNECTION FOR USER: root
<127.0.0.1> EXEC /bin/sh -c 'echo ~root && sleep 0'
<127.0.0.1> EXEC /bin/sh -c '( umask 77 && mkdir -p "echo /root/.ansible/tmp/ansible-tmp-1592296096.9400597-169517418479742
" && echo ansible-tmp-1592296096.9400597-169517418479742="echo /root/.ansible/tmp/ansible-tmp-1592296096.9400597-169517418479742
" ) && sleep 0'
Using module file /usr/local/lib/python3.6/site-packages/ansible/modules/system/setup.py
<127.0.0.1> PUT /root/.ansible/tmp/ansible-local-13437ezewz80l/tmp45fzf9j6 TO /root/.ansible/tmp/ansible-tmp-1592296096.9400597-169517418479742/AnsiballZ_setup.py
<127.0.0.1> EXEC /bin/sh -c 'chmod u+x /root/.ansible/tmp/ansible-tmp-1592296096.9400597-169517418479742/ /root/.ansible/tmp/ansible-tmp-1592296096.9400597-169517418479742/AnsiballZ_setup.py && sleep 0'
<127.0.0.1> EXEC /bin/sh -c '/bin/python3 /root/.ansible/tmp/ansible-tmp-1592296096.9400597-169517418479742/AnsiballZ_setup.py && sleep 0'
<127.0.0.1> EXEC /bin/sh -c 'rm -f -r /root/.ansible/tmp/ansible-tmp-1592296096.9400597-169517418479742/ > /dev/null 2>&1 && sleep 0'
ok: [localhost]
META: ran handlers
TASK [Create user] *************************************************************
task path: /tmp/.bench/playbooks/create_user.yml:7
<127.0.0.1> ESTABLISH LOCAL CONNECTION FOR USER: root
<127.0.0.1> EXEC /bin/sh -c 'echo ~root && sleep 0'
<127.0.0.1> EXEC /bin/sh -c '( umask 77 && mkdir -p "echo /root/.ansible/tmp/ansible-tmp-1592296098.536142-250657114375603
" && echo ansible-tmp-1592296098.536142-250657114375603="echo /root/.ansible/tmp/ansible-tmp-1592296098.536142-250657114375603
" ) && sleep 0'
Using module file /usr/local/lib/python3.6/site-packages/ansible/modules/system/user.py
<127.0.0.1> PUT /root/.ansible/tmp/ansible-local-13437ezewz80l/tmpaf_krrgx TO /root/.ansible/tmp/ansible-tmp-1592296098.536142-250657114375603/AnsiballZ_user.py
<127.0.0.1> EXEC /bin/sh -c 'chmod u+x /root/.ansible/tmp/ansible-tmp-1592296098.536142-250657114375603/ /root/.ansible/tmp/ansible-tmp-1592296098.536142-250657114375603/AnsiballZ_user.py && sleep 0'
<127.0.0.1> EXEC /bin/sh -c '/bin/python3 /root/.ansible/tmp/ansible-tmp-1592296098.536142-250657114375603/AnsiballZ_user.py && sleep 0'
<127.0.0.1> EXEC /bin/sh -c 'rm -f -r /root/.ansible/tmp/ansible-tmp-1592296098.536142-250657114375603/ > /dev/null 2>&1 && sleep 0'
changed: [localhost] => {
"changed": true,
"comment": "",
"create_home": true,
"group": 1001,
"home": "/home/frappe",
"invocation": {
"module_args": {
"append": false,
"authorization": null,
"comment": null,
"create_home": true,
"expires": null,
"force": false,
"generate_ssh_key": true,
"group": null,
"groups": null,
"hidden": null,
"home": null,
"local": null,
"login_class": null,
"move_home": false,
"name": "frappe",
"non_unique": false,
"password": null,
"password_lock": null,
"profile": null,
"remove": false,
"role": null,
"seuser": null,
"shell": null,
"skeleton": null,
"ssh_key_bits": 0,
"ssh_key_comment": "ansible-generated on I-THH-ERP01",
"ssh_key_file": null,
"ssh_key_passphrase": null,
"ssh_key_type": "rsa",
"state": "present",
"system": false,
"uid": null,
"update_password": "always"
}
},
"name": "frappe",
"shell": "/bin/bash",
"ssh_fingerprint": "2048 SHA256:FLOBt2/p6deqtKr6IjnrI1XWuo6iXdx1ZuMokcmoZdM ansible-generated on I-THH-ERP01 (RSA)",
"ssh_key_file": "/home/frappe/.ssh/id_rsa",
"ssh_public_key": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDE6YxEYgv8ru4btWqjKbv3wbPCvNsB5Fj4kh3PQJ+DVrpvW73TQFE4s8a+6zllHfde6IbwlNSpvnuH0jJ51ah07YxB+6umnmBLG9qchIWMcmzthNX0uHj98SswqND0i3yd8xemgsqkFY8jODNRTZUzC/d7mi15mz99604GFbvDLYXWhZZRGL+dIWl7fNnj1u22VDKWWO+o5QYpupFknbPVNt2UYjRu7d5f4maW2BvXq5mGmmn8M6e0tDlV59sbn6Tdk21kJOR1hBpCdduZJkcffHW+Kc4EQk86Iu8GichstqMkphLJsG7lKws1C10iWehCHiiIPSGVsVdXhe7Aiu+p ansible-generated on I-THH-ERP01",
"state": "present",
"system": false,
"uid": 1001
}
TASK [Set home folder perms] ***************************************************
task path: /tmp/.bench/playbooks/create_user.yml:12
<127.0.0.1> ESTABLISH LOCAL CONNECTION FOR USER: root
<127.0.0.1> EXEC /bin/sh -c 'echo ~root && sleep 0'
<127.0.0.1> EXEC /bin/sh -c '( umask 77 && mkdir -p "echo /root/.ansible/tmp/ansible-tmp-1592296099.3615003-174544324200329
" && echo ansible-tmp-1592296099.3615003-174544324200329="echo /root/.ansible/tmp/ansible-tmp-1592296099.3615003-174544324200329
" ) && sleep 0'
Using module file /usr/local/lib/python3.6/site-packages/ansible/modules/files/file.py
<127.0.0.1> PUT /root/.ansible/tmp/ansible-local-13437ezewz80l/tmpd67grjek TO /root/.ansible/tmp/ansible-tmp-1592296099.3615003-174544324200329/AnsiballZ_file.py
<127.0.0.1> EXEC /bin/sh -c 'chmod u+x /root/.ansible/tmp/ansible-tmp-1592296099.3615003-174544324200329/ /root/.ansible/tmp/ansible-tmp-1592296099.3615003-174544324200329/AnsiballZ_file.py && sleep 0'
<127.0.0.1> EXEC /bin/sh -c '/bin/python3 /root/.ansible/tmp/ansible-tmp-1592296099.3615003-174544324200329/AnsiballZ_file.py && sleep 0'
<127.0.0.1> EXEC /bin/sh -c 'rm -f -r /root/.ansible/tmp/ansible-tmp-1592296099.3615003-174544324200329/ > /dev/null 2>&1 && sleep 0'
changed: [localhost] => {
"changed": true,
"diff": {
"after": {
"mode": "0705",
"path": "/home/frappe"
},
"before": {
"mode": "0700",
"path": "/home/frappe"
}
},
"gid": 1001,
"group": "frappe",
"invocation": {
"module_args": {
"_diff_peek": null,
"_original_basename": null,
"access_time": null,
"access_time_format": "%Y%m%d%H%M.%S",
"attributes": null,
"backup": null,
"content": null,
"delimiter": null,
"directory_mode": null,
"follow": true,
"force": false,
"group": "frappe",
"mode": "o+rx",
"modification_time": null,
"modification_time_format": "%Y%m%d%H%M.%S",
"owner": "frappe",
"path": "/home/frappe",
"recurse": true,
"regexp": null,
"remote_src": null,
"selevel": null,
"serole": null,
"setype": null,
"seuser": null,
"src": null,
"state": "directory",
"unsafe_writes": null
}
},
"mode": "0705",
"owner": "frappe",
"path": "/home/frappe",
"size": 4096,
"state": "directory",
"uid": 1001
}
TASK [Set /tmp/.bench folder perms] ********************************************
task path: /tmp/.bench/playbooks/create_user.yml:20
<127.0.0.1> ESTABLISH LOCAL CONNECTION FOR USER: root
<127.0.0.1> EXEC /bin/sh -c 'echo ~root && sleep 0'
<127.0.0.1> EXEC /bin/sh -c '( umask 77 && mkdir -p "echo /root/.ansible/tmp/ansible-tmp-1592296099.9345188-234795354696185
" && echo ansible-tmp-1592296099.9345188-234795354696185="echo /root/.ansible/tmp/ansible-tmp-1592296099.9345188-234795354696185
" ) && sleep 0'
Using module file /usr/local/lib/python3.6/site-packages/ansible/modules/files/file.py
<127.0.0.1> PUT /root/.ansible/tmp/ansible-local-13437ezewz80l/tmp5xbdcp66 TO /root/.ansible/tmp/ansible-tmp-1592296099.9345188-234795354696185/AnsiballZ_file.py
<127.0.0.1> EXEC /bin/sh -c 'chmod u+x /root/.ansible/tmp/ansible-tmp-1592296099.9345188-234795354696185/ /root/.ansible/tmp/ansible-tmp-1592296099.9345188-234795354696185/AnsiballZ_file.py && sleep 0'
<127.0.0.1> EXEC /bin/sh -c '/bin/python3 /root/.ansible/tmp/ansible-tmp-1592296099.9345188-234795354696185/AnsiballZ_file.py && sleep 0'
<127.0.0.1> EXEC /bin/sh -c 'rm -f -r /root/.ansible/tmp/ansible-tmp-1592296099.9345188-234795354696185/ > /dev/null 2>&1 && sleep 0'
changed: [localhost] => {
"changed": true,
"diff": {
"after": {
"group": 1001,
"owner": 1001,
"path": "/tmp/.bench"
},
"before": {
"group": 0,
"owner": 0,
"path": "/tmp/.bench"
}
},
"gid": 1001,
"group": "frappe",
"invocation": {
"module_args": {
"_diff_peek": null,
"_original_basename": null,
"access_time": null,
"access_time_format": "%Y%m%d%H%M.%S",
"attributes": null,
"backup": null,
"content": null,
"delimiter": null,
"directory_mode": null,
"follow": true,
"force": false,
"group": "frappe",
"mode": null,
"modification_time": null,
"modification_time_format": "%Y%m%d%H%M.%S",
"owner": "frappe",
"path": "/tmp/.bench",
"recurse": true,
"regexp": null,
"remote_src": null,
"selevel": null,
"serole": null,
"setype": null,
"seuser": null,
"src": null,
"state": "directory",
"unsafe_writes": null
}
},
"mode": "0755",
"owner": "frappe",
"path": "/tmp/.bench",
"size": 4096,
"state": "directory",
"uid": 1001
}
TASK [Change default shell to bash] ********************************************
task path: /tmp/.bench/playbooks/create_user.yml:27
<127.0.0.1> ESTABLISH LOCAL CONNECTION FOR USER: root
<127.0.0.1> EXEC /bin/sh -c 'echo ~root && sleep 0'
<127.0.0.1> EXEC /bin/sh -c '( umask 77 && mkdir -p "echo /root/.ansible/tmp/ansible-tmp-1592296100.3323405-69677363692641
" && echo ansible-tmp-1592296100.3323405-69677363692641="echo /root/.ansible/tmp/ansible-tmp-1592296100.3323405-69677363692641
" ) && sleep 0'
Using module file /usr/local/lib/python3.6/site-packages/ansible/modules/commands/command.py
<127.0.0.1> PUT /root/.ansible/tmp/ansible-local-13437ezewz80l/tmpysh3bcum TO /root/.ansible/tmp/ansible-tmp-1592296100.3323405-69677363692641/AnsiballZ_command.py
<127.0.0.1> EXEC /bin/sh -c 'chmod u+x /root/.ansible/tmp/ansible-tmp-1592296100.3323405-69677363692641/ /root/.ansible/tmp/ansible-tmp-1592296100.3323405-69677363692641/AnsiballZ_command.py && sleep 0'
<127.0.0.1> EXEC /bin/sh -c '/bin/python3 /root/.ansible/tmp/ansible-tmp-1592296100.3323405-69677363692641/AnsiballZ_command.py && sleep 0'
<127.0.0.1> EXEC /bin/sh -c 'rm -f -r /root/.ansible/tmp/ansible-tmp-1592296100.3323405-69677363692641/ > /dev/null 2>&1 && sleep 0'
fatal: [localhost]: FAILED! => {
"changed": true,
"cmd": "chsh frappe -s $(which bash)",
"delta": "0:00:00.007323",
"end": "2020-06-16 08:28:20.733558",
"invocation": {
"module_args": {
"_raw_params": "chsh frappe -s $(which bash)",
"_uses_shell": true,
"argv": null,
"chdir": null,
"creates": null,
"executable": null,
"removes": null,
"stdin": null,
"stdin_add_newline": true,
"strip_empty_ends": true,
"warn": true
}
},
"msg": "non-zero return code",
"rc": 1,
"start": "2020-06-16 08:28:20.726235",
"stderr": "/bin/sh: which: command not found\nchsh: option requires an argument -- 's'\n\nUsage:\n chsh [options] [username]\n\nOptions:\n -s, --shell
PLAY RECAP ********************************************************************* localhost : ok=4 changed=3 unreachable=0 failed=1 skipped=0 rescued=0 ignored=0
Install script run at 08:27 on 2020-06-16
Additional context
Logs are saved under /tmp/logs/easy-install__2020-06-16__08-35.log
Checking System Compatibility...
centos 7 is compatible!
Maybe run: yum groups mark install (see man yum)
curl already installed!
wget already installed!
git already installed!
pip3 already installed!
[WARNING]: No inventory was parsed, only implicit localhost is available
[WARNING]: provided hosts list is empty, only localhost is available. Note
that the implicit localhost does not match 'all'
Traceback (most recent call last):
File "install.py", line 440, in
Possible Solution
Thanks
Logs are saved under /tmp/logs/easy-install__2020-06-16__08-50.log
Checking System Compatibility...
centos 7 is compatible!
Maybe run: yum groups mark install (see man yum)
curl already installed!
wget already installed!
git already installed!
pip3 already installed!
Traceback (most recent call last):
File "install.py", line 440, in <module>
install_bench(args)
File "install.py", line 211, in install_bench
run_playbook('create_user.yml', extra_vars=extra_vars)
File "install.py", line 365, in run_playbook
success = subprocess.check_call(args, cwd=playbooks_folder, stdout=log_stream, stderr=sys.stderr)
File "/usr/lib64/python3.6/subprocess.py", line 306, in check_call
retcode = call(*popenargs, **kwargs)
File "/usr/lib64/python3.6/subprocess.py", line 287, in call
with Popen(*popenargs, **kwargs) as p:
File "/usr/lib64/python3.6/subprocess.py", line 729, in __init__
restore_signals, start_new_session)
File "/usr/lib64/python3.6/subprocess.py", line 1364, in _execute_child
raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: 'ansible-playbook': 'ansible-playbook'
It seem that sudo dnf install ansible
fixed the issue. Hope this helps anyone who are facing the same issue.