puppetlabs / puppetlabs/bolt

Apply fails when tty mode enabled on podman target

Open
#3,370 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Bug
Dominant language
Ruby
Stars
558
Forks
224
Avg merge
1h 4m
Merged PRs (30d)
1

Description

Describe the Bug

Enabling the tty mode for Podman exec commands results in bolt apply and apply blocks failing with:

> bolt apply -e 'notify { "Hello": }' -t podman://nest-stage1-haswell-workstation --log-level=debug
...
Starting: plan
Starting: install puppet and gather facts on podman://nest-stage1-haswell-workstation
Starting: install puppet and gather facts on podman://nest-stage1-haswell-workstation
Starting: task apply_helpers::custom_facts on podman://nest-stage1-haswell-workstation
Running task apply_helpers::custom_facts with '{"plugins":"Sensitive [value redacted]","_task":"apply_helpers::custom_facts"}' on ["podman://nest-stage1-haswell-workstation"]
Running task 'apply_helpers::custom_facts' on podman://nest-stage1-haswell-workstation
{"target":"podman://nest-stage1-haswell-workstation","action":"task","object":null,"status":"failure","value":{"_error":{"details":{},"kind":"puppetlabs.tasks/task_file_error","msg":"no implicit conversion of StringIO into String","issue_code":"WRITE_ERROR"}}}
Finished: task apply_helpers::custom_facts with 1 failure in 0.55 sec
Finished: install puppet and gather facts with 1 failure in 0.68 sec
Finished: install puppet and gather facts with 1 failure in 0.68 sec
Starting: apply catalog on
Starting: apply catalog on
Finished: apply catalog with 0 failures in 0.0 sec
Finished: apply catalog with 0 failures in 0.0 sec
Failed on 1 target: podman://nest-stage1-haswell-workstation
Ran on 1 target in 0.73 sec

Expected Behavior

Apply mode should not be affected by a setting that should only affect run_command.

Steps to Reproduce

Steps to reproduce the behavior:

  1. Define inventory with:
    config:
      podman:
        tty: true
    
  2. Apply code to a container target.
    bolt apply -e 'notify { "Hello": }' -t podman://container-name
    

Environment

  • Bolt 4.0.0 (gem)
  • Podman 5.1.1
  • Gentoo

Additional Context

I want to use TTY mode to signal to commands that they can output in color.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the provided bolt apply command with Podman tty enabled, then trace how the Podman transport applies tty settings during apply and run_command operations. Done means apply and apply blocks succeed with tty enabled while run_command retains the intended TTY behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
ruby
Domain
cli, devops
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.