Git clone no working after upgrade

48 views
Skip to first unread message

James Goodhouse

unread,
May 12, 2014, 2:11:39 PM5/12/14
to ansible...@googlegroups.com
Hey All,

I just upgraded from 1.5.5 to 1.6.1 and am seeing the following error happen when trying to clone a repo:

failed: [w4.website.net] => {"failed": true, "item": "", "parsed": false}
invalid output was: Traceback (most recent call last):
  File "<stdin>", line 1911, in <module>
  File "<stdin>", line 503, in main
  File "<stdin>", line 184, in write_ssh_wrapper
  File "/usr/lib/python2.7/tempfile.py", line 300, in mkstemp
    return _mkstemp_inner(dir, prefix, suffix, flags)
  File "/usr/lib/python2.7/tempfile.py", line 235, in _mkstemp_inner
    fd = _os.open(file, flags, 0600)
OSError: [Errno 13] Permission denied: '/home/my_ansible_user/OKKarN'

My Ansible task for is as follows:

- name: copy code from repository
  sudo_user: my_git_user
  git: repo={{ git['repo_url'] }}
       dest={{ install_dir }}
       key_file="/home/my_git_user/.ssh/deploy.key"
       version={{ git['branch'] }}
       depth=1
       accept_hostkey=yes
  register: clone_result
  notify: restart php5-fpm

I see no reason why I'm now getting a permission denied error when I didn't before.

Any ideas?

Thanks!

James

Michael DeHaan

unread,
May 13, 2014, 11:34:25 AM5/13/14
to ansible...@googlegroups.com
I'm not sure why you are getting this either.

If you can come up with a way to replicate this on a clean system, can you please run this in "-vvvv" mode and file this as a bug ticket with steps to reproduce?

Either way, a traceback in Ansbile is always a bug, so I'd like a bug ticket even if the system was in a state where it didn't have legitimate permissions.

We just need more info about how how to reproduce this.




--
You received this message because you are subscribed to the Google Groups "Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ansible-proje...@googlegroups.com.
To post to this group, send email to ansible...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/d6b09b4c-6c68-4104-8871-e01de83a8e37%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

James Goodhouse

unread,
May 13, 2014, 11:59:11 AM5/13/14
to ansible...@googlegroups.com
The best I could do was fire up a clean Vagrant instance and run through things from the start. The result was the same.

Here is the output from the task that failed with "-vvvv" set:

TASK: [deploy | copy code from repository] ************************************
<33.33.33.71> ESTABLISH CONNECTION FOR USER: vagrant
<33.33.33.71> REMOTE_MODULE git repo=g...@github.com:company/project.git dest=/srv/project key_file="/home/deploy_user/.ssh/deploy.key" version=master depth=1 accept_hostkey=yes
<33.33.33.71> EXEC ['ssh', '-C', '-vvv', '-o', 'ControlMaster=auto', '-o', 'ControlPersist=60s', '-o', 'ControlPath=/Users/james/.ansible/cp/ansible-ssh-%h-%p-%r', '-o', 'IdentityFile=/Users/james/.vagrant.d/insecure_private_key', '-o', 'KbdInteractiveAuthentication=no', '-o', 'PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey', '-o', 'PasswordAuthentication=no', '-o', 'User=vagrant', '-o', 'ConnectTimeout=10', '33.33.33.71', u'/bin/sh -c \'sudo -k && sudo -H -S -p "[sudo via ansible, key=bjabkvmkprzchfetqhbbnzyubjbrjjoq] password: " -u deploy_user /bin/sh -c \'"\'"\'echo SUDO-SUCCESS-bjabkvmkprzchfetqhbbnzyubjbrjjoq; LC_CTYPE=en_US.UTF-8 LANG=en_US.UTF-8 /usr/bin/python\'"\'"\'\'']
failed: [prod.project.dev] => {"failed": true, "item": "", "parsed": false}
invalid output was: Traceback (most recent call last):
  File "<stdin>", line 1911, in <module>
  File "<stdin>", line 503, in main
  File "<stdin>", line 184, in write_ssh_wrapper
  File "/usr/lib/python2.7/tempfile.py", line 300, in mkstemp
    return _mkstemp_inner(dir, prefix, suffix, flags)
  File "/usr/lib/python2.7/tempfile.py", line 235, in _mkstemp_inner
    fd = _os.open(file, flags, 0600)
OSError: [Errno 13] Permission denied: '/home/vagrant/ysynAz'
debug3: mux_client_read_packet: read header failed: Broken pipe
debug2: Received exit status from master 1


FATAL: all hosts have already failed -- aborting


I will file an official bug ticket shortly. Thanks!

James

James Goodhouse

unread,
May 13, 2014, 12:11:38 PM5/13/14
to ansible...@googlegroups.com
Here's a link to the bug I filed.



On Tuesday, May 13, 2014 8:34:25 AM UTC-7, Michael DeHaan wrote:

Adam Heath

unread,
May 13, 2014, 12:52:52 PM5/13/14
to ansible...@googlegroups.com
The sudo_user is my_git_user, but I'm guessing the connection user is
my_ansible_user. When ansible calls sudo, the temp dir value is passed
on unchanged. So, it then tried to create a temp file in the wrong
location.

I seem to recall reading in the documentation that direct user->user
sudo was problematic, due to permission issues with the incoming
script+payload; it would end up making the file word readable
temporarily. This could be a similar problem.

On 05/13/2014 11:11 AM, James Goodhouse wrote:
> Here's a link to the bug I filed.
>
> https://github.com/ansible/ansible/issues/7383
>
> On Tuesday, May 13, 2014 8:34:25 AM UTC-7, Michael DeHaan wrote:
>
> I'm not sure why you are getting this either.
>
> If you can come up with a way to replicate this on a clean system,
> can you please run this in "-vvvv" mode and file this as a bug
> ticket with steps to reproduce?
>
> Either way, a traceback in Ansbile is always a bug, so I'd like a
> bug ticket even if the system was in a state where it didn't have
> legitimate permissions.
>
> We just need more info about how how to reproduce this.
>
>
>
>
> On Mon, May 12, 2014 at 2:11 PM, James Goodhouse
> <jamg...@gmail.com <javascript:>> wrote:
>
> Hey All,
>
> I just upgraded from 1.5.5 to 1.6.1 and am seeing the
> following error happen when trying to clone a repo:
>
> failed: [w4.website.net <http://w4.website.net>] => {"failed":
> <javascript:>.
> To post to this group, send email to
> ansible...@googlegroups.com <javascript:>.
> <https://groups.google.com/d/msgid/ansible-project/d6b09b4c-6c68-4104-8871-e01de83a8e37%40googlegroups.com?utm_medium=email&utm_source=footer>.
> For more options, visit https://groups.google.com/d/optout
> <https://groups.google.com/d/optout>.
>
>
> --
> You received this message because you are subscribed to the Google
> Groups "Ansible Project" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to ansible-proje...@googlegroups.com
> <mailto:ansible-proje...@googlegroups.com>.
> To post to this group, send email to ansible...@googlegroups.com
> <mailto:ansible...@googlegroups.com>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/ansible-project/a768750b-de0b-417a-b14e-04b92bd73e9b%40googlegroups.com
> <https://groups.google.com/d/msgid/ansible-project/a768750b-de0b-417a-b14e-04b92bd73e9b%40googlegroups.com?utm_medium=email&utm_source=footer>.
Reply all
Reply to author
Forward
0 new messages