azure-powershell icon indicating copy to clipboard operation
azure-powershell copied to clipboard

Issues with Azure Data-lake store applying the permissions.

Open thunderfalcon opened this issue 7 years ago • 23 comments

Issues with Azure Data-lake store applying the permissions.

The new Az module have issues applying permissions.

Set-AzDataLakeStoreItemAclEntry -AccountName "storename" -Path /-AceType User -Id (ID)-Permissions All -Default -Recurse

AzDatalakeStoreItemAclEntry is throwing error

<# Set-AzDataLakeStoreItemAclEntry : Error in modifying ACL entries default:user::rwx for path /. Operation: MODIFYACLENTRIES failed with Unknown Error: The 'User-Agent' header must be modified using the appropriate property or method. Parameter name: name Source: System StackTrace: at System.Net.WebHeaderCollection.ThrowOnRestrictedHeader(String headerName) at System.Net.WebHeaderCollection.Set(String name, String value) at Microsoft.Azure.DataLake.Store.WebTransport.AssignCommonHttpHeaders(HttpWebRequest webReq, AdlsClient client, RequestOptions req, String token, String opMethod, IDictionary`2 customHeaders, Int32 postRequestLength) at Microsoft.Azure.DataLake.Store.WebTransport.d__22.MoveNext(). Last encountered exception thrown after 5 tries. [The 'User-Agent' header must be modified using the appropriate property or method. Parameter name: name,The 'User-Agent' header must be modified using the appropriate property or method. Parameter name: name,The 'User-Agent' header must be modified using the appropriate property or method. Parameter name: name,The 'User-Agent' header must be modified using the appropriate property or method. Parameter name: name,The 'User-Agent' header must be modified using the appropriate property or method. Parameter name: name] [ServerRequestId:] At line:1 char:1

  • Set-AzDataLakeStoreItemAclEntry -AccountName "" -Pa ...
  •   + CategoryInfo          : CloseError: (:) [Set-AzDataLakeStoreItemAclEntry], AdlsException
      + FullyQualifiedErrorId : Microsoft.Azure.Commands.DataLakeStore.SetAzureDataLakeStoreItemAclEntry #>
    
    

I reverted back to AzureRm module and everything works smooth. This fix needs to be deployed.

thunderfalcon avatar Jan 18 '19 20:01 thunderfalcon

@rahuldutta90 Can you take a look?

markcowl avatar Jan 18 '19 22:01 markcowl

@thunderfalcon please refer this: https://github.com/Azure/azure-powershell/issues/8141

To use datalake az module you have to use it in netcore powershell (not windows powershell)

rahuldutta90 avatar Jan 18 '19 22:01 rahuldutta90

This is a blocker for me right now. It's not practical to require netcore PowerShell for the users that will be running the script I'm writing. Can this be resolved?

migrande avatar Apr 02 '19 19:04 migrande

@migrande What is the blocker for you in using netcore powershell?

Otherwise you can use AzureRm.DataLakeStore module in windows powershell.

Currently we have a SDK that can fix it, but it is beta version: https://www.nuget.org/packages/Microsoft.Azure.DataLake.Store/1.2.0-alpha , This is alpha not a major release because of a .net issue with one of the core components (whicn wont be fixed).

Powershell team wont allow the alpha version to be merged to major release. WE can do a beta release of the Az.DataLakeStore module. Will that work for you?

rahuldutta90 avatar Apr 02 '19 20:04 rahuldutta90

@rahuldutta90 We are passing off a script to a client for use in DR scenarios. Requiring that they procure and install netcore PowerShell isn't really viable. Outside of hardcore PowerShell/Azure folks, I don't think netcore PS is widely known.

I could revert these scripts to AzureRM but that presents a development issue. I intentionally don't have the AzureRM modules anymore, and the scripts are already written to use the Az modules. I could switch them back to AzureRM, but that isn't worth it for this one bug. I can have the customer manually apply the Data Lake Store ACLs for now.

However, it's frustrating to come across issues that are a regression in Az from AzureRM. This type of issue should make it to the Breaking Changes page in the Az migration documentation.

migrande avatar Apr 02 '19 21:04 migrande

@migrande we have fixed this issue. Apologize for the inconvenience. It will be released as part of next release.

rahuldutta90 avatar Apr 25 '19 18:04 rahuldutta90

Was this issue fixed? I'm getting 'The 'User-Agent' header must be modified using the appropriate property or method.' for Get-AzDataLakeStoreChildItem.

guntaled avatar May 17 '19 23:05 guntaled

@guntaled The fix was made but it was not released as May build because I missed updating the changelog. I fixed that (https://github.com/Azure/azure-powershell/pull/9153) and now the changes will be released as 05-21 build. I am assuming you will see a change in https://www.powershellgallery.com/packages/Az.DataLakeStore/ after 05-21.

rahuldutta90 avatar May 17 '19 23:05 rahuldutta90

@guntaled @migrande Can you please try https://www.powershellgallery.com/packages/Az.DataLakeStore/1.2.1

rahuldutta90 avatar May 21 '19 19:05 rahuldutta90

@rahuldutta90, it works on my local machine, but not on Automation runbooks.

guntaled avatar May 23 '19 23:05 guntaled

@guntaled Can you please check the version of Az.DataLakeStore in automation runbooks?

rahuldutta90 avatar May 24 '19 06:05 rahuldutta90

@rahuldutta90 , it is 1.2.1, and it works. It was another issue this time, but the error it threw was the same, so I just assumed. It seems to all be working now.

Thanks!

guntaled avatar May 24 '19 17:05 guntaled

I am closing the issue. @migrande if the new version does not resolve the issue, please reopen it.

rahuldutta90 avatar May 24 '19 17:05 rahuldutta90

Is this issue supposed to have been fixed by now? I am still getting the same error as previously reported.

darrenstilesag avatar Feb 07 '20 14:02 darrenstilesag

@darrenstilesag this should have been fixed. Which version of az.datalakestore module you are facing issue with?

rahuldutta90 avatar Feb 10 '20 20:02 rahuldutta90

@rahuldutta90 i am using version 1.2.3

darrenstilesag avatar Feb 11 '20 09:02 darrenstilesag

@rahuldutta90 any update on this issue? thanks

darrenstilesag avatar Feb 14 '20 07:02 darrenstilesag

@darrenstilesag Do you have other versions installed? Meaning do you have other versions of Az.datalakestore or Azurerm.Datalakestore installed? You can check "Get-Module -Name AzM.DataLakeStore –ListAvailable". Make sure all otehr versions are uninstalled.

After that Can you also paste what error you are facing? Run the commandlet in "-debug" mode

rahuldutta90 avatar Feb 14 '20 07:02 rahuldutta90

Hi Rahul,

I am now running just version 1.2.6 of az.datalakestore, older and other versions have now been removed.

Can I you send me your email address so I can send you the debug output, otherwise I’ll have to redact loads of information before sending (company policy).

Thanks

Darren

darrenstilesag avatar Feb 14 '20 09:02 darrenstilesag

@darrenstilesag is this the same error as "Unknown Error: The 'User-Agent' header must be modified using the appropriate property or method."? Or is it some thing like "Could not load file or assembly 'System.Buffers, Version=4.0.1.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51' or one of its dependencies."

You do not have to paste all the debug lines. Basically paste the stacktrace from our code.

rahuldutta90 avatar Feb 14 '20 18:02 rahuldutta90