Closed vitalii-lebedev closed 2 years ago
Thanks for reporting. We will look into it.
Hi @vitalii-lebedev , as your log shows:
Id : 19004189917e4a489eef28803e6e8392
ProvisioningState : Succeeded
ExitCode : 0
StartedAt : 03/12/2022 10:37:32
FinishedAt : 03/12/2022 10:37:32
Logs : total 24
drwxr-xr-x 3 nonroot aks 4096 Mar 12 10:37 .
drwxr-xr-x 3 nonroot aks 4096 Mar 12 10:37 ..
---------- 1 nonroot aks 349 Mar 12 2022 .helmignore
---------- 1 nonroot aks 1146 Mar 12 2022 Chart.yaml
drwxr-xr-x 2 nonroot aks 4096 Mar 12 10:37 templates
---------- 1 nonroot aks 1877 Mar 12 2022 values.yaml
Reason :
nonroot
doesn't have permission to access .helmignore
. I think you need to grant the permission for the file first.
Hi, we're sending this friendly reminder because we haven't heard back from you in a while. We need more information about this issue to help address it. Please be sure to give us your input within the next 7 days. If we don't hear back from you within 14 days of this comment the issue will be automatically closed. Thank you!
Hi @wyunchi-ms. Sorry, but I don't understand how your advice can help me to solve the issue. Locally I have all the required permissions. The output you see is from the remote AKS.
1) So, again, locally I have all the permissions.
2) Execution of the Invoke-AzAksRunCommand
command with -CommandContextAttachment
parameters copied the folder defined in this parameter to the server.
3) But after copying from the local machine to the remote host the permissions are lost.
Again, I don't copy this folder manually. Everything is done by Invoke-AzAksRunCommand
and -CommandContextAttachment
parameter.
I am also having this issue. Locally everyone has permissions to read (this is ran from Microsoft hosted agent running in an Azure DevOps pipeline):
However on using Invoke-AzAksRunCommand
the files lose read permissions (ran Invoke-AzAksRunCommand
with the command ls -la
and also attempted a helm install
in the same line)
It does seem to be an issue with transferring files to wherever this runs from.
Hey @Zaldos! I found a workaround. It looks ugly but at least it works.
Invoke-AzAksRunCommand -ResourceGroupName resource-group -Name cluster-name -Command "chmod -R 777 namespace && $cmd" -Force -CommandContextAttachment "yamls"
Hi @vitalii-lebedev & @Zaldos, sorry for causing trouble for you. As I investigated that the zip API we used in DotNet Standard doesn't support well in Linux. And we don't have a plan to migrate it to DotNet Core in recently.
I will add a new parameter CommandContextAttachmentZip
to supply a workaround for Linux users. You can zip your folder locally and pass the path to this parameter.
This feature will be published around next release.
Description
I'm using Powershell on Linux in the Ubuntu subsystem. I have a helm chart in the folder. This folder is attached with the CommandContextAttachment parameter.
Invoke-AzAksRunCommand -ResourceGroupName $DestinationResourceGroupName -Name $ClusterName -Command "helm install new-tenant new-tenant" -Force -CommandContextAttachment "yamls"
The response:
Execution of
Invoke-AzAksRunCommand -ResourceGroupName $DestinationResourceGroupName -Name $ClusterName -Command "ls new-tenant -la" -Force -CommandContextAttachment "yamls"
Shows
Command:
Invoke-AzAksRunCommand -ResourceGroupName $DestinationResourceGroupName -Name $ClusterName -Command "whoami" -Force -CommandContextAttachment "yamls"
Returns:
Issue script & Debug output
Environment data
Module versions
Error output
No response