Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

git error when running github-bot playbook #1015

Closed
phillipj opened this issue Nov 27, 2017 · 4 comments
Closed

git error when running github-bot playbook #1015

phillipj opened this issue Nov 27, 2017 · 4 comments

Comments

@phillipj
Copy link
Member

While rolling out github-bot changes introduced in #985, I got this git related error when running the ansible playbook:

$ setup/github-bot
$ ansible-playbook -i ../ansible-inventory ansible-playbook.yaml

..

TASK [Git | Prepare for compilation by running configure] **********************
fatal: [infra-rackspace-debian8-x64-1]: FAILED! => {"changed": false, "failed": true, "module_stderr": "", "module_stdout": "Traceback (most recent call last):\r\n  File \"/root/.ansible/tmp/ansible-tmp-1511775745.02-247532749580743/command\", line 2385, in <module>\r\n    main()\r\n  File \"/root/.ansible/tmp/ansible-tmp-1511775745.02-247532749580743/command\", line 188, in main\r\n    os.chdir(chdir)\r\nOSError: [Errno 2] No such file or directory: '/tmp/git-2.11.0'\r\n", "msg": "MODULE FAILURE", "parsed": false}

Related playbook: https://github.com/nodejs/build/blob/master/setup/github-bot/ansible-playbook.yaml#L37

Full bash output for reference
$ ansible-playbook -i ../ansible-inventory ansible-playbook.yaml

PLAY ***************************************************************************

TASK [Bootstrap | Install baseline packages] ***********************************
ok: [infra-rackspace-debian8-x64-1]

PLAY ***************************************************************************

TASK [setup] *******************************************************************
ok: [infra-rackspace-debian8-x64-1]

TASK [include_vars] ************************************************************
ok: [infra-rackspace-debian8-x64-1]

TASK [General | Add the NodeSource GPG key] ************************************
ok: [infra-rackspace-debian8-x64-1]

TASK [General | Add the NodeSource Node.js repo] *******************************
ok: [infra-rackspace-debian8-x64-1]

TASK [General | APT Update and upgrade] ****************************************
ok: [infra-rackspace-debian8-x64-1]

TASK [General | Install required packages] *************************************
ok: [infra-rackspace-debian8-x64-1] => (item=[u'nodejs'])

TASK [include] *****************************************************************
included: /build/setup/ansible-tasks/git.yaml for infra-rackspace-debian8-x64-1

TASK [Git | Check git --version] ***********************************************
changed: [infra-rackspace-debian8-x64-1]
 [WARNING]: Consider using git module rather than running git


TASK [Git | Compare installed version matches] *********************************
ok: [infra-rackspace-debian8-x64-1]

TASK [Git | Install required packages for git compile] *************************
ok: [infra-rackspace-debian8-x64-1] => (item=[u'gcc', u'make', u'gettext', u'libcurl4-openssl-dev', u'zlib1g-dev'])

TASK [Git | Download git-2.11.0] ***********************************************
ok: [infra-rackspace-debian8-x64-1]

TASK [Git | Extract git-2.11.0] ************************************************
skipping: [infra-rackspace-debian8-x64-1]

TASK [Git | Prepare for compilation by running configure] **********************
fatal: [infra-rackspace-debian8-x64-1]: FAILED! => {"changed": false, "failed": true, "module_stderr": "", "module_stdout": "Traceback (most recent call last):\r\n  File \"/root/.ansible/tmp/ansible-tmp-1511775745.02-247532749580743/command\", line 2385, in <module>\r\n    main()\r\n  File \"/root/.ansible/tmp/ansible-tmp-1511775745.02-247532749580743/command\", line 188, in main\r\n    os.chdir(chdir)\r\nOSError: [Errno 2] No such file or directory: '/tmp/git-2.11.0'\r\n", "msg": "MODULE FAILURE", "parsed": false}

PLAY RECAP *********************************************************************
infra-rackspace-debian8-x64-1 : ok=12   changed=1    unreachable=0    failed=1
@maclover7
Copy link
Contributor

@phillipj Has this come up recently?

@phillipj
Copy link
Member Author

phillipj commented Jun 2, 2018 via email

@phillipj
Copy link
Member Author

phillipj commented Jun 4, 2018

Still getting an error with the code as is in master, though different than what I reported back in November:

$ cd setup/github-bot
$ ansible-playbook -C -i ../ansible-inventory ansible-playbook.yaml

..

TASK [Git | Extract version string] **************************************************************************************************************************
fatal: [infra-rackspace-debian8-x64-1]: FAILED! => {"msg": "The task includes an option with an undefined variable. The error was: 'dict object' has no attribute 'stdout'\n\nThe error appears to have been in '/github/build/setup/ansible-tasks/git.yaml': line 9, 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: Git | Extract version string\n  ^ here\n\nexception type: <class 'ansible.errors.AnsibleUndefinedVariable'>\nexception: 'dict object' has no attribute 'stdout'"}
	to retry, use: --limit @/github/build/setup/github-bot/ansible-playbook.retry

I'm currently running ansible v2.4.2.0.

Full bash output for reference
$ ansible-playbook -C -i ../ansible-inventory ansible-playbook.yaml
 [WARNING]:  * Failed to parse /github/build/setup/ansible-inventory with yaml plugin: Syntax Error while loading YAML.   The error appears
to have been in '/github/build/setup/ansible-inventory': line 2, column 1, but may be elsewhere in the file depending on the exact syntax
problem.  The offending line appears to be:  [iojs-build-centos5] iojs-build-centos5-64-1 ^ here  exception type: <class 'yaml.parser.ParserError'>
exception: did not find expected <document start>   in "<unicode string>", line 2, column 1

 [WARNING]:  * Failed to parse /github/build/setup/ansible-inventory with ini plugin: /github/build/setup/ansible-
inventory:91: Section [iojs-centos:children] includes undefined group: iojs-build-centos6

 [WARNING]: Unable to parse /github/build/setup/ansible-inventory as an inventory source

 [WARNING]: No inventory was parsed, only implicit localhost is available

 [WARNING]: Could not match supplied host pattern, ignoring: all

 [WARNING]: provided hosts list is empty, only localhost is available

[DEPRECATION WARNING]: The use of 'include' for tasks has been deprecated. Use 'import_tasks' for static inclusions or 'include_tasks' for dynamic
inclusions. This feature will be removed in a future release. Deprecation warnings can be disabled by setting deprecation_warnings=False in ansible.cfg.
[DEPRECATION WARNING]: include is kept for backwards compatibility but usage is discouraged. The module documentation details page may explain more about
this rationale.. This feature will be removed in a future release. Deprecation warnings can be disabled by setting deprecation_warnings=False in ansible.cfg.

PLAY [github-bot] ********************************************************************************************************************************************

TASK [Bootstrap | Install baseline packages] *****************************************************************************************************************
skipping: [infra-rackspace-debian8-x64-1]

PLAY [github-bot] ********************************************************************************************************************************************

TASK [Gathering Facts] ***************************************************************************************************************************************
ok: [infra-rackspace-debian8-x64-1]

TASK [include_vars] ******************************************************************************************************************************************
ok: [infra-rackspace-debian8-x64-1]

TASK [General | Add the NodeSource GPG key] ******************************************************************************************************************
changed: [infra-rackspace-debian8-x64-1]

TASK [General | Add the NodeSource Node.js repo] *************************************************************************************************************
ok: [infra-rackspace-debian8-x64-1]

TASK [General | APT Update and upgrade] **********************************************************************************************************************
changed: [infra-rackspace-debian8-x64-1]

TASK [General | Install required packages] *******************************************************************************************************************
changed: [infra-rackspace-debian8-x64-1] => (item=[u'nodejs'])

TASK [Git | Latest git release version] **********************************************************************************************************************
skipping: [infra-rackspace-debian8-x64-1]

TASK [Git | Extract version string] **************************************************************************************************************************
fatal: [infra-rackspace-debian8-x64-1]: FAILED! => {"msg": "The task includes an option with an undefined variable. The error was: 'dict object' has no attribute 'stdout'\n\nThe error appears to have been in '/github/build/setup/ansible-tasks/git.yaml': line 9, 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: Git | Extract version string\n  ^ here\n\nexception type: <class 'ansible.errors.AnsibleUndefinedVariable'>\nexception: 'dict object' has no attribute 'stdout'"}
    to retry, use: --limit @/github/build/setup/github-bot/ansible-playbook.retry

PLAY RECAP ***************************************************************************************************************************************************
infra-rackspace-debian8-x64-1 : ok=6    changed=3    unreachable=0    failed=1

@maclover7
Copy link
Contributor

Closing due to #1067 landing, please reopen if appears again!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants