Apply fails when tty mode enabled on podman target
Open
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:
- Define inventory with:
config: podman: tty: true - 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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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