Azure / Azure/azure-cli

error (Inappropriate ioctl for device) on "az container exec" from GitHub action

Open
#26,564 11 comments 4 reactions 0 assignees View on GitHub
act-observability-squad Auto-Assign Auto-Resolve bug Container Instances customer-reported Service Attention Similar-Issue
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:
![image](https://github.com/Azure/azure-cli/assets/78357766/efd3c193-a3a2-405d-bcc4-b5130deb54aa)

### 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

![image](https://github.com/Azure/azure-cli/assets/78357766/26fec69a-26e6-4a37-a8d8-23e2980ca297)

### Additional context

_No response_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.