Skip to content

test(tmachine): Ansible warns about OSC 3008 junk after JSON on Fedora guests #5306

Closed

Description

@elezar

User Story

I develop and run the OpenShell tmachine test environments. I directly encountered Ansible warnings on every task against the Fedora guests, in local runs and in CI.

Problem Statement

Ansible tasks against tmachine Fedora guests emit [WARNING]: Module invocation had junk after the JSON data: ESC]3008;end=<id>ESC\. The text is an OSC 3008 shell-integration marker. The Fedora guest's systemd (259) installs /etc/profile.d/80-systemd-osc-context.sh, which makes bash write start=/end= markers to stdout around every command. Ansible runs modules through that shell and finds the marker after the module's JSON. The Ubuntu guests do not ship the script and are unaffected.

Impact / Why This Matters

The tasks still succeed, but the warnings add dozens of lines per job and can hide real warnings. A recent Branch E2E run (run 42027404535) logged 24 warnings in podman-e2e-integration (fedora-podman-rootless, binaries, e2e-podman) and 19 in conformance (fedora-podman-rootless, rpm), and none in the Ubuntu k3s jobs.

Acceptance Criteria

  • Ansible runs against the Fedora tmachine guests no longer print "Module invocation had junk after the JSON data".
  • Ubuntu guests continue to work unchanged.

Reproduction Steps

  1. Run a tmachine Fedora environment, for example nix run .#tmachine -- test fedora-podman-rootless binaries e2e-podman.
  2. Watch the Ansible output for the warning.

Environment

tmachine Fedora 44 cloud image (systemd 259.5).

Logs

TASK [Download cargo-nextest] ****
[WARNING]: Module invocation had junk after the JSON data: ESC]3008;end=ba34b6726edb4546856c5a1bcdb70650ESC\
changed: [tmachine]

Activity

  1. added 2 commits that reference this issue on Nov 5, 2026
    571bbab
    2ed91d3
  2. elezar commented on Nov 5, 2026

    @elezar
    MemberAuthor

    Root cause, from inspecting a Fedora 44 guest (systemd 259.5): two emitters print the OSC 3008 markers.

    1. /etc/profile.d/80-systemd-osc-context.sh, which systemd-tmpfiles recreates on every boot via /usr/lib/tmpfiles.d/20-systemd-osc-context.conf. Deleting it during provisioning does not survive a reboot.
    2. pam_systemd.so, in sudo's PAM session. Ansible runs become over ssh -tt, so the session has a pty and the marker follows the module's JSON.

    Both skip a dumb terminal. Setting TERM=dumb for ansible-playbook removes the warnings without changing the guest image; the fix is in #5307.

  3. added a commit that references this issue on Nov 6, 2026
    11fa5f0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions