tenv: Failure during tofu call : fork/exec /usr/bin/tenv: inappropriate ioctl for device
Describe the bug After new version (v4.0.0) released my github actions have started failing during installation and running tofu
To Reproduce
Steps to reproduce the behavior:
Just try to install tenv v4.0.0 and run tenv tofu install && tofu version
Reverted to v3.2.11 and it works again
Expected behavior Expect to install and run tofu without any errors
Screenshots
Environment (please complete the following information):
- OS: ubuntu-22.04
- tenv version: 4.0.1
Additional context Add any other context about the problem here.
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Reactions: 5
- Comments: 35 (19 by maintainers)
@dvaumoron I have tested it on Azure DevOps with the default host pool given by Microsoft. and this works. Also it works for our self-hosted docker containers. (Ubuntu 22:04)
Tested on: Azure DevOps Ubuntu based agent (Microsoft Hosted)
Below a very quick example Azure DevOps pipeline to test this:
@tspearconquest , @ego93 , @ThibaultNocchi , @dyegoe , @iam-take , @mykyta-martsevyi
can you test https://github.com/tofuutils/tenv/releases/tag/v4.2.0-beta1 ? With information on which environement
Great, thanks, I will use that on top level proxy (
tenvbinary as intermediate proxy has already it’s input and output redirected)https://rderik.com/blog/identify-if-output-goes-to-the-terminal-or-is-being-redirected-in-golang/ this looks promising for possibly detecting a TTY. WDYT?
Found this while googling for a way to detect the presence of a TTY.
I confirm that Gitlab CI has the $CI variable set to true.
It’s all good for me in Gitlab CI without any added environment variable.
@dvaumoron I downloaded the
v4.2.0-beta1, and it still doesn’t work forpre-commitIf
export TENV_DETACHED_PROXY=false, then everything looks fine as the previous version4.0.1. Let me know if you need further tests.I’m away for the holidays, I’ll be back to work on Thursday 😃
I’m having a similar issue to this main issue, getting
Failure during terraform call : fork/exec /opt/homebrew/bin/tenv: operation not supported by devicewith pre-commit using antonbabenko/pre-commit-terraform 1.96.3 terraform_validate hookI’m on tenv 4.1.0
Hi, unfortunately this fix wasn’t sufficient for Azure DevOps after all. I’m getting this error when setting PIPELINE_WORKSPACE to a path (as Azure DevOps does, and I failed to notice/test, instead assuming a boolean check of the variable would be sufficient):
I set it in a manual run as below to produce the above:
cd /tmp; PIPELINE_WORKSPACE=/tmp tenv tofu installPlease accept my apologies.
accepted #308, improved it with #309, and created a new release (v4.1.0)
for further discussion on breaking change management, please go to #310
Whilst I do understand that a Major release can contain breaking changes @tspearconquest the release notes do not seem to reflect or indicate these changes are breaking. I noticed a while back this was the same for another release as well. It would be greatly appriciated if the release notes give a upgrade notice of these breaking changes. As currently we need to dig through the issue’s / pr’s to see what has been changed.
For Azure DevOps I can confirm that this is not a default variable being set.
#308 should hopefully fix this – assuming that I’m correct in that
CI=trueis used across all of the big CI players.Also can confirm that setting
TENV_DETACHED_PROXYtofalsefixes my pipelines.Same error, but in another setup. I am getting it from
pre-commit.OS: Fedora 41 tenv version: 4.0.1