Giter VIP home page Giter VIP logo

Comments (4)

justin-stephenson avatar justin-stephenson commented on August 16, 2024

Hi,

Thanks for reporting this issue and providing the simple reproducer.

We tried to fix this problem already in RHEL, we validated the fix was working in RHEL/Fedora environments. I need to investigate further what is different in your environment compared to the RHEL environment for the ansible pipelining=True problem.

from tlog.

justin-stephenson avatar justin-stephenson commented on August 16, 2024

@roth-wine does this issue happen only when using delegate_to , or can it be reproduced simply with pipelining=True ?

from tlog.

roth-wine avatar roth-wine commented on August 16, 2024

Hello @justin-stephenson,
this issue only happens when using delegate_to in combination with pipelining=True. If you use the Playbook above without delegate_to everything will work as expected.

from tlog.

roth-wine avatar roth-wine commented on August 16, 2024

@justin-stephenson
I have created the following Dockerfile to reproduce the Issue more easily without ansible.

FROM ubuntu:jammy
ARG ARCH

RUN apt-get update && \
  apt-get install -y build-essential pkg-config vim \
  libjson-c-dev libsystemd-dev libcurl4-openssl-dev \
  libutempter-dev autoconf automake libtool openssh-server \
  whois

RUN useradd -ms /bin/bash tloguser
RUN mkdir -p /var/log/tlog && mkdir -p /var/run/tlog
RUN touch /var/log/tlog/session.log
RUN chown tloguser:tloguser /var/log/tlog/session.log
RUN chown -R tloguser:tloguser /var/run/tlog

RUN passroot=$(echo date +%s | sha256sum | base64 | head -c 32) && \
    echo "root:${passroot}" | chpasswd && echo "root: ${passroot}" > /passroot
RUN passtloguser=$(echo date +%s | sha256sum | base64 | head -c 32) && \
    echo "tloguser:${passtloguser}" | chpasswd && echo "tloguser: ${passtloguser}" > /passtloguser

RUN sed -i 's/#Port 22/Port 2222/g' /etc/ssh/sshd_config
RUN sed -i 's/#ListenAddress 0.0.0.0/ListenAddress 127.0.0.1/g' /etc/ssh/sshd_config
RUN sed -i '/AcceptEnv\ LANG\ LC_\*/d' /etc/ssh/sshd_config
RUN service ssh start

RUN git clone https://github.com/Scribery/tlog.git
WORKDIR /tlog
RUN git checkout main
RUN autoreconf -i -f
RUN ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var && make
RUN make install

RUN sed -i 's/\/\/."path".:.""/"path"\ :\ "\/var\/log\/tlog\/session.log"/g' /etc/tlog/tlog-rec-session.conf
RUN sed -i 's/\/\/."writer".:."journal"/"writer"\ :\ "file"/g' /etc/tlog/tlog-rec-session.conf
RUN sed -i 's/\/\/."window".:.true/"window"\ :\ false/g' /etc/tlog/tlog-rec-session.conf
RUN sed -i 's/\/\/."input".:.false/"input"\ :\ true/g' /etc/tlog/tlog-rec-session.conf
RUN sed -i 's/\/\/."output".:.true/"output"\ :\ true/g' /etc/tlog/tlog-rec-session.conf
RUN usermod -s /usr/bin/tlog-rec-session tloguser
ENTRYPOINT cat /passroot && cat /passtloguser && service ssh restart && tail -f /var/log/tlog/session.log
EXPOSE 2222
WORKDIR /root

You could build the Dockerfile docker build -t tlog-debug:main .
and then run the docker container afterwards docker run -it --network=host tlog-debug:main

Then the docker container will print the credentials for the root and tloguser and shows the output for the tlog session log:

root: ZDgzZjMyMGNiMWJiMDA3MWYxZjQzODJi
tloguser: ZDgzZjMyMGNiMWJiMDA3MWYxZjQzODJi
 * Restarting OpenBSD Secure Shell server sshd                                                                                                                                                                                                          [ OK ] 

Then i could start with the one-liner to reproduce issue:

➜ ssh tloguser@localhost -p2222 sh -c 'echo "Hello world"' 
tloguser@localhost's password: 
Locale charset is ANSI_X3.4-1968 (ASCII)
Assuming locale environment is lost and charset is UTF-8

ATTENTION! Your session is being recorded!

The stdout is empty, that's the reason why ansible breaks.

In the log file we could also see, that in_txt,in_bin,out_txt and out_bin is empty.

{"ver":"2.3","host":"thinkpad","rec":"de9598fe77594144b6a278887763d35d-37-11d189c","user":"tloguser","term":"","session":67,"id":1,"pos":0,"time":1667554409.541,"timing":">1","in_txt":"","in_bin":[],"out_txt":"\n","out_bin":[]}

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.