Giter VIP home page Giter VIP logo

Comments (8)

ajf8 avatar ajf8 commented on July 17, 2024 1

Reproduced at home on Fedora 34. Compiled and installed master (c23a145), set my shell to /usr/bin/tlog-rec-session. Ansible version below from Fedora 34 RPM but also earlier 2.8.

[alan@fedora tlog]$ ansible --version
ansible 2.9.27
  config file = /etc/ansible/ansible.cfg
  configured module search path = ['/home/alan/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/lib/python3.9/site-packages/ansible
  executable location = /usr/bin/ansible
  python version = 3.9.4 (default, Apr  6 2021, 00:00:00) [GCC 11.0.1 20210324 (Red Hat 11.0.1-0)]
[alan@fedora tlog]$ 

Pipelining enabled (ansible.cfg in directory running playbook from)

[alan@fedora ~]$ cat ansible.cfg 
[ssh_connection]
pipelining=True

Simple playbook that runs a command and copies a file

[alan@fedora ~]$ cat test.yaml 
---
  - hosts: all
    gather_facts: false
    tasks:
      - name: run a command
        command: dmesg
      - name: copy a file
        copy:
          src: test.yaml
          dest: /tmp/test_file.yaml

Run the playbook.

[alan@fedora ~]$ ansible-playbook -l 127.0.0.1, -i 127.0.0.1, test.yaml 

PLAY [all] ***********************************************************************************************************************************************************************************************

TASK [run a command] *************************************************************************************************************************************************************************************
[DEPRECATION WARNING]: Distribution fedora 34 on host 127.0.0.1 should use /usr/bin/python3, but is using /usr/bin/python for backward compatibility with prior Ansible releases. A future Ansible 
release will default to using the discovered platform python for this host. See https://docs.ansible.com/ansible/2.9/reference_appendices/interpreter_discovery.html for more information. This feature 
will be removed in version 2.12. Deprecation warnings can be disabled by setting deprecation_warnings=False in ansible.cfg.
changed: [127.0.0.1]

TASK [copy a file] ***************************************************************************************************************************************************************************************

And it's stuck. Here we can the ansible controller process running, and the connection over local SSH.

root       81444  0.0  0.2  45148 10972 ?        Ss   21:11   0:00  \_ sshd: alan [priv]
alan       81447  0.0  0.1  45148  5920 ?        S    21:11   0:00  |   \_ sshd: alan@pts/1
alan       81448  0.0  0.2  30104  8204 pts/1    Ss+  21:11   0:00  |       \_ -tlog-rec-session
alan       81449  0.0  0.1  17412  5548 pts/2    Ss   21:11   0:00  |           \_ -bash
alan       84225 14.8  1.2 132548 51224 pts/2    Sl+  21:39   0:11  |               \_ /usr/bin/python3 /usr/bin/ansible-playbook -l 127.0.0.1, -i 127.0.0.1, test.yaml
alan       84287  0.0  1.0 131508 41668 pts/2    S+   21:39   0:00  |                   \_ /usr/bin/python3 /usr/bin/ansible-playbook -l 127.0.0.1, -i 127.0.0.1, test.yaml
alan       84288  0.0  0.1  18740  6392 pts/2    S+   21:39   0:00  |                       \_ ssh -C -o ControlMaster=auto -o ControlPersist=60s -o KbdInteractiveAuthentication=no -o PreferredAuthentic
root       84230  0.0  0.2  45148 10856 ?        Ss   21:39   0:00  \_ sshd: alan [priv]
alan       84236  0.0  0.1  45416  6488 ?        S    21:39   0:00      \_ sshd: alan@notty
alan       84289  0.0  0.1  29976  7844 ?        Ss   21:39   0:00          \_ tlog-rec-session -c /bin/sh -c 'echo ~ && sleep 0'
alan       84290  0.0  0.0      0     0 ?        Z    21:39   0:00              \_ [sleep] <defunct>

This reproduces what I saw earlier when it was getting stuck specifically on a copy task but some other tasks were running OK. SSH pipelining was enabled. Interestingly, when I remove SSH pipelining, the first command doesn't work either.

[alan@fedora ~]$ rm ansible.cfg 
[alan@fedora ~]$ ansible-playbook -l 127.0.0.1, -i 127.0.0.1, test.yaml 


PLAY [all] ***********************************************************************************************************************************************************************************************

TASK [run a command] *************************************************************************************************************************************************************************************

from tlog.

justin-stephenson avatar justin-stephenson commented on July 17, 2024

Hi, thank you for reporting this issue. The https://github.com/Scribery/tlog/releases/tag/v12 release should already include that commit f03ff12 so I'm not exactly sure what is happening. The only difference between v12 and master are CI related things (nothing that would affect tlog functionality)

Reproducer steps with exact package versions would be great.

from tlog.

ajf8 avatar ajf8 commented on July 17, 2024

Sorry I guess I have the wrong idea of what the 12 release is :)

I mean this commit from 20 Jan 2021 31f198c

from tlog.

justin-stephenson avatar justin-stephenson commented on July 17, 2024

Okay then yes f03ff12 is most likely the culprit.

If you can provide a minimal ansible reproducer that would be great.

from tlog.

justin-stephenson avatar justin-stephenson commented on July 17, 2024

This should be fixed in the latest release v12.1, can you please check it @ajf8 ?

from tlog.

ajf8 avatar ajf8 commented on July 17, 2024

Hi @justin-stephenson I've just encountered the same or similar issue on a Ubuntu 20.04 host, using a package built from master a few weeks ago. I'll try to get another reproducer together. To test I was running "dmesg" using ansible in a loop, it got stuck on the 9th iteration. Pipelining enabled.

from tlog.

justin-stephenson avatar justin-stephenson commented on July 17, 2024

@ajf8 Okay thanks for letting me know, I was hoping this was taken care of once and for all. Do you see it fail frequently? I'll try to reproduce on my end with Fedora/RHEL

from tlog.

Related Issues (20)

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.