-
Notifications
You must be signed in to change notification settings - Fork 52
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
Ansible pipelining breaks with tlog #349
Comments
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 |
@roth-wine does this issue happen only when using |
Hello @justin-stephenson, |
@justin-stephenson 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 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
|
Hi !
I've encountered an issue with Ansible in combination with Tlog on multiple Ubuntu 20.04 hosts. We need to delegate some tasks in several playbooks to other hosts. If the option
pipelining=True
is set and we try to perform a task with thedelegate_to
option on a host, which uses thetlog-rec-session
shell, the task will fail. If we set the optionpipelining=False
the task will proceed as expected.The behavior in relation to the pipelining option will also only happen, when the task get performed via
delegate_to
.If the same task, get's processed without
delegate_to
, but on the same host and the optionpipelining=True
, everything will proceed as expected.We manage the server with Ansible version 2.12.7 and option
pipelining=True
The Playbook for testing is the following:
To test and reproduce the issue we have set up two hosts with Tlog
v12.1
, which has been build from the master branch.The playbook will then get started as the following:
The error message is the following:
When setting
pipelining
toFalse
, the playbook will proceed as expected.The text was updated successfully, but these errors were encountered: