az container exec in azure devops throws (25, 'Inappropriate ioctl for device')
See original GitHub issueAz version 2.3.1
Describe the bug
When trying to use Azure DevOps Pipelines Azure CLI task az container exec
the shell outputs errors.
To Reproduce
az container exec --resource-group myRG --name myImageName --exec-command ./run.sh
Expected behavior
To be able to display the output of the container.
Environment summary
Azure Devops free agent running Ubuntu 18.04
Additional context
This error message is thrown:
[command]/bin/bash /home/vsts/work/_temp/azureclitaskscript1588671209398.sh
The command failed with an unexpected error. Here is the traceback:
(25, 'Inappropriate ioctl for device')
Traceback (most recent call last):
File "/opt/az/lib/python3.6/site-packages/knack/cli.py", line 215, in invoke
cmd_result = self.invocation.execute(args)
File "/opt/az/lib/python3.6/site-packages/azure/cli/core/commands/__init__.py", line 625, in execute
raise ex
File "/opt/az/lib/python3.6/site-packages/azure/cli/core/commands/__init__.py", line 689, in _run_jobs_serially
results.append(self._run_job(expanded_arg, cmd_copy))
File "/opt/az/lib/python3.6/site-packages/azure/cli/core/commands/__init__.py", line 682, in _run_job
six.reraise(*sys.exc_info())
File "/opt/az/lib/python3.6/site-packages/six.py", line 693, in reraise
raise value
File "/opt/az/lib/python3.6/site-packages/azure/cli/core/commands/__init__.py", line 659, in _run_job
result = cmd_copy(params)
File "/opt/az/lib/python3.6/site-packages/azure/cli/core/commands/__init__.py", line 324, in __call__
return self.handler(*args, **kwargs)
File "/opt/az/lib/python3.6/site-packages/azure/cli/core/__init__.py", line 531, in default_command_handler
return op(**command_args)
File "/opt/az/lib/python3.6/site-packages/azure/cli/command_modules/container/custom.py", line 621, in container_exec
_start_exec_pipe(execContainerResponse.web_socket_uri, execContainerResponse.password)
File "/opt/az/lib/python3.6/site-packages/azure/cli/command_modules/container/custom.py", line 655, in _start_exec_pipe
oldtty = termios.tcgetattr(sys.stdin)
termios.error: (25, 'Inappropriate ioctl for device')
To open an issue, please run: 'az feedback'
Issue Analytics
- State:
- Created 3 years ago
- Reactions:11
- Comments:22 (2 by maintainers)
Top Results From Across the Web
When trying to use Azure DevOps Pipelines Azure CLI task az ...
az container exec --resource-group myRG --name myImageName --exec-command ... Here is the traceback: (25, 'Inappropriate ioctl for device') ...
Read more >Execute a command in a running Azure container instance
Run a command with Azure CLI. Execute a command in a running container with az container exec in the Azure CLI: Azure CLI...
Read more >Dynamic Deployment of SonarQube in Azure Container ...
In this session, I will demonstrate how to Dynamically Deploy SonarQube in Azure Container Instance Using Azure DevOps.
Read more >Security update for the Linux Kernel | SUSE Support
CVE-2019-15216: There was a NULL pointer dereference caused by a malicious USB device in the drivers/usb/misc/yurex.c driver (bnc#1146361). CVE-2019 ...
Read more >Hundreds of Millions of Dell Users at Risk from Kernel-Privilege Bugs
“Hundreds of millions of Dell devices have updates pushed on a regular basis, ... Exploit for Improper Authentication in Pulsesecure Pulse Connect Secure....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@navba-MSFT this is still an issue, please reopen this issue.
In the end I emulated tty using the following