This is an issue we hit a long time ago, but unfortunately it looks like I didn't get the chance to log a PR about it at the time, and only recently when setting up some new hosts have I been running into it again. Sorry about that.
Background: We have RBAC subusers that manage subdirectories of the /pkgsrc account, posting bulk build reports under /pkgsrc/public/reports. The directory that they manage has the correct role-tag applied.
In short, the environment is correctly configured, and the subuser is able to create a directory successfully within their managed directory, and that directory has the appropriate role-tag applied to it:
But if I try to use a Manta client such as muntar or manta-sync to upload directory contents, I get NoMatchingRoleTagError errors:
$ mkdir test
$ echo test >test/file
$ tar cf test.tar test
$ muntar -f test.tar /pkgsrc/public/reports/Linux/test
muntar: NoMatchingRoleTagError: None of your active roles are present on the resource.
This is specific to creating subdirectories. If I create a tar that contains just a file, then it works fine.
$ echo test >file
$ tar cf file.tar file
$ muntar -f file.tar /pkgsrc/public/reports/Linux/test
/pkgsrc/public/reports/Linux/test/file
The patch I've been using to fix this is as follows (against version 4.0.0):
I can't find any logs which discusses exactly why this change fixes the issue, but I'm wondering if it's related to similar issues around mkdirp and role tags being wiped.
I've applied this patch to my newer hosts running the latest node-manta and it resolves the issue there too:
This is an issue we hit a long time ago, but unfortunately it looks like I didn't get the chance to log a PR about it at the time, and only recently when setting up some new hosts have I been running into it again. Sorry about that.
Background: We have RBAC subusers that manage subdirectories of the /pkgsrc account, posting bulk build reports under /pkgsrc/public/reports. The directory that they manage has the correct
role-tag
applied.In short, the environment is correctly configured, and the subuser is able to create a directory successfully within their managed directory, and that directory has the appropriate
role-tag
applied to it:But if I try to use a Manta client such as
muntar
ormanta-sync
to upload directory contents, I getNoMatchingRoleTagError
errors:This is specific to creating subdirectories. If I create a tar that contains just a file, then it works fine.
The patch I've been using to fix this is as follows (against version 4.0.0):
I can't find any logs which discusses exactly why this change fixes the issue, but I'm wondering if it's related to similar issues around
mkdirp
and role tags being wiped.I've applied this patch to my newer hosts running the latest node-manta and it resolves the issue there too: