-
Notifications
You must be signed in to change notification settings - Fork 9.2k
HADOOP-16826. ABFS: update abfs.md to include config keys for identity transformation #1785
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
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -857,6 +857,48 @@ signon page for humans, even though it is a machine calling. | |
| 1. The URL is wrong —it is pointing at a web page unrelated to OAuth2.0 | ||
| 1. There's a proxy server in the way trying to return helpful instructions. | ||
|
|
||
| ### `java.io.IOException: The ownership on the staging directory /tmp/hadoop-yarn/staging/user1/.staging is not as expected. It is owned by <principal_id>. The directory must be owned by the submitter user1 or user1` | ||
|
|
||
| When using [Azure Managed Identities](https://docs.microsoft.com/en-us/azure/active-directory/managed-identities-azure-resources/overview), the files/directories in ADLS Gen2 are by default owned by the service principal object id i.e. principal ID & submitting jobs as the local OS user 'user1' results in the above exception. | ||
|
|
||
| The following configurations have to be added to core-site.xml to resolve this issue | ||
|
|
||
| ``` | ||
steveloughran marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| <property> | ||
| <name>fs.azure.identity.transformer.service.principal.id</name> | ||
| <value>service principal object id</value> | ||
| <description> | ||
| An Azure Active Directory object ID (oid) used as the replacement for names contained | ||
| in the list specified by “fs.azure.identity.transformer.service.principal.substitution.list”. | ||
| Notice that instead of setting oid, you can also set $superuser here. | ||
| </description> | ||
| </property> | ||
|
|
||
| <property> | ||
| <name>fs.azure.identity.transformer.service.principal.substitution.list</name> | ||
| <value>user1</value> | ||
| <description> | ||
| A comma separated list of names to be replaced with the service principal ID specified by | ||
| “fs.azure.identity.transformer.service.principal.id”. This substitution occurs | ||
| when setOwner, setAcl, modifyAclEntries, or removeAclEntries are invoked with identities | ||
| contained in the substitution list. Notice that when in non-secure cluster, asterisk symbol * | ||
| can be used to match all user/group. | ||
| </description> | ||
| </property> | ||
|
|
||
| <property> | ||
| <name>fs.azure.use.upn</name> | ||
|
||
| <value>true</value> | ||
| <description> | ||
| User principal names (UPNs) have the format “{alias}@{domain}”. If true, | ||
| only {alias} is included when a UPN would otherwise appear in the output | ||
| of APIs like getFileStatus, getOwner, getAclStatus, etc. Default is false. | ||
| </description> | ||
| </property> | ||
| ``` | ||
|
|
||
| Once the above properties are configured, `hdfs dfs -ls abfs://[email protected]/` shows the ADLS Gen2 files/directories are now owned by 'user1'. | ||
|
|
||
| ## <a name="testing"></a> Testing ABFS | ||
|
|
||
| See the relevant section in [Testing Azure](testing_azure.html). | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are a couple of options to deal with the issue like deleting staging dir before running the job or changing the staging directory in config before running the job. The configs identity.transformer listed here are also providing a workaround specific to ABFS driver to let the client assume the ownership is with current local user.
As this is not really a store issue, please reword to highlight that this is a workaround.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@snvijaya The options suggested are not a suitable fix for the exception. I think
identity.transformeris more of a fix rather to be considered as a workaround. I have added a short message on the fix in my last commit. Let me know for any further comments?