error (Inappropriate ioctl for device) on "az container exec" from GitHub action
- Dominant language
- Python
- Stars
- 4.6k
- Forks
- 3.5k
- Avg merge
- 3d 2h
- Merged PRs (30d)
- 60
Description
### Describe the bug
On executing az container exec from a GitHub runner, we encounter this error:

### Related command
az container exec
### Errors
ERROR: (25, 'Inappropriate ioctl for device')
### Issue script & Debug output
ERROR: The command failed with an unexpected error. Here is the traceback:
ERROR: (25, 'Inappropriate ioctl for device')
Traceback (most recent call last):
File "/opt/az/lib/python3.10/site-packages/knack/cli.py", line 233, in invoke
cmd_result = self.invocation.execute(args)
File "/opt/az/lib/python3.10/site-packages/azure/cli/core/commands/__init__.py", line 663, in execute
raise ex
File "/opt/az/lib/python3.10/site-packages/azure/cli/core/commands/__init__.py", line 726, in _run_jobs_serially
results.append(self._run_job(expanded_arg, cmd_copy))
File "/opt/az/lib/python3.10/site-packages/azure/cli/core/commands/__init__.py", line 697, in _run_job
result = cmd_copy(params)
File "/opt/az/lib/python3.10/site-packages/azure/cli/core/commands/__init__.py", line 333, in __call__
return self.handler(*args, **kwargs)
File "/opt/az/lib/python3.10/site-packages/azure/cli/core/commands/command_operation.py", line [121](https://github.com/chili-publish/delivery-infrastructure/actions/runs/5119557895/jobs/9206147929#step:3:129), in handler
return op(**command_args)
File "/opt/az/lib/python3.10/site-packages/azure/cli/command_modules/container/custom.py", line 695, in container_exec
_start_exec_pipe_linux(execContainerResponse.web_socket_uri, execContainerResponse.password)
File "/opt/az/lib/python3.10/site-packages/azure/cli/command_modules/container/custom.py", line 731, in _start_exec_pipe_linux
old_tty = termios.tcgetattr(stdin_fd)
termios.error: (25, 'Inappropriate ioctl for device')
To check existing issues, please visit: https://github.com/Azure/azure-cli/issues
To open a new issue, please run `az feedback`
### Expected behavior
return value 0
### Environment Summary

### Additional context
_No response_
Contributor guide
Assessment
This issue has not been assessed yet.