Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Azure/CLI@V1 Error on Self-Hosted Runner on Azure AKS #116

Open
moulidz opened this issue Sep 13, 2023 · 4 comments
Open

Azure/CLI@V1 Error on Self-Hosted Runner on Azure AKS #116

moulidz opened this issue Sep 13, 2023 · 4 comments
Assignees
Labels
question Requiring some clarification

Comments

@moulidz
Copy link

moulidz commented Sep 13, 2023

Hi,

I am facing an error while using Azure/CLI@V1 on my self-hosted runner on Azure Kubernetes Service.

The error:
ERROR: Please run 'az login' to setup account.
Error: Error: az cli script failed.

CLi version: 2.52.0 pre-installed on the AKS actions-runner image along with Azure powershell modules.

The Azure/Login@V1 is successful and Azure/Powershell@V1 is also successful. Only the Azure/CLI@V1 has the error.

On inspecting the docker image for the CLI, I found that the .azure folder is empty.

image

When I run the same workflow on an Azure VM self-hosted runner instead of AKS, the Azure/CLI@V1 works and it is the same version - 2.52.0

image

Is the error because of the latest version of CLI? Should I revert to 2.30.0?

Thanks
Mouli

@MoChilia MoChilia self-assigned this Sep 20, 2023
@MoChilia
Copy link
Member

Hi @moulidz,
Sorry for the delay. This issue could be due to docker incorrectly mounting the .azure folder created by the azure/login action. From my understanding, this issue is specific to self-hosted runners in AKS and appears to be a bug in the azure/cli action, unrelated to the Azure CLI version. I'll need some time to investigate and resolve this. Thank you for your patience.

@moulidz
Copy link
Author

moulidz commented Sep 29, 2023

Hi @MoChilia,

Sure. I will also test on my side with different configurations and update here if i find anything.

@MoChilia MoChilia added the question Requiring some clarification label Dec 8, 2023
@spowser
Copy link

spowser commented Feb 9, 2024

Hello @MoChilia ,

This may be related. I am also getting an error when running the agent from an attached disk in Azure. The agent runs on a Linux VM from a mounted drive at /mnt/blah/whatever/action-runner. The error I'm seeing is

Starting script execution via docker image mcr.microsoft.com/azure-cli:2.57.0
Error: Error: docker: Error response from daemon: create undefined/.azure: "undefined/.azure" includes invalid characters for a local volume name, only "[a-zA-Z0-9][a-zA-Z0-9_.-]" are allowed. If you intended to pass a host directory, use absolute path.

Hope this helps either reproduce it or narrow down the root cause

@moulidz
Copy link
Author

moulidz commented Feb 12, 2024

Hi,

I tried the az cli action from a new self-hosted runner using the github arc runner. Got a different error here:

Starting script execution via docker image mcr.microsoft.com/azure-cli:2.57.0 Error: Error: docker: Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?.

Thanks
mouli

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Requiring some clarification
Projects
None yet
Development

No branches or pull requests

3 participants