Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Done
-
0.3.0
-
None
-
None
Description
ozone command to create a volume with owner being any username runs successfully even if it is not part of unix users.
The command throws a security warning (security.ShellBasedUnixGroupsMapping) but still creates the volume.
As a result we can't list the volume, and volume listing with root returns an empty string.
ozone cli Command run :
ozone sh volume create testvolume -u=hdfs
WARNING thrown :
2018-10-30 10:19:38,268 WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable 2018-10-30 10:19:39,061 WARN security.ShellBasedUnixGroupsMapping: unable to return groups for user hdfs PartialGroupNameException The user name 'hdfs' is not found. id: hdfs: no such user id: hdfs: no such user at org.apache.hadoop.security.ShellBasedUnixGroupsMapping.resolvePartialGroupNames(ShellBasedUnixGroupsMapping.java:294) at org.apache.hadoop.security.ShellBasedUnixGroupsMapping.getUnixGroups(ShellBasedUnixGroupsMapping.java:207) at org.apache.hadoop.security.ShellBasedUnixGroupsMapping.getGroups(ShellBasedUnixGroupsMapping.java:97) at org.apache.hadoop.security.JniBasedUnixGroupsMappingWithFallback.getGroups(JniBasedUnixGroupsMappingWithFallback.java:51) at org.apache.hadoop.security.Groups$GroupCacheLoader.fetchGroupList(Groups.java:387) at org.apache.hadoop.security.Groups$GroupCacheLoader.load(Groups.java:321) at org.apache.hadoop.security.Groups$GroupCacheLoader.load(Groups.java:270) at com.google.common.cache.LocalCache$LoadingValueReference.loadFuture(LocalCache.java:3568) at com.google.common.cache.LocalCache$Segment.loadSync(LocalCache.java:2350) at com.google.common.cache.LocalCache$Segment.lockedGetOrLoad(LocalCache.java:2313) at com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2228) at com.google.common.cache.LocalCache.get(LocalCache.java:3965) at com.google.common.cache.LocalCache.getOrLoad(LocalCache.java:3969) at com.google.common.cache.LocalCache$LocalManualCache.get(LocalCache.java:4829) at org.apache.hadoop.security.Groups.getGroups(Groups.java:228) at org.apache.hadoop.security.UserGroupInformation.getGroups(UserGroupInformation.java:1588) at org.apache.hadoop.security.UserGroupInformation.getGroupNames(UserGroupInformation.java:1576) at org.apache.hadoop.ozone.client.rpc.RpcClient.createVolume(RpcClient.java:187) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.apache.hadoop.ozone.client.OzoneClientInvocationHandler.invoke(OzoneClientInvocationHandler.java:54) at com.sun.proxy.$Proxy15.createVolume(Unknown Source) at org.apache.hadoop.ozone.client.ObjectStore.createVolume(ObjectStore.java:82) at org.apache.hadoop.ozone.web.ozShell.volume.CreateVolumeHandler.call(CreateVolumeHandler.java:103) at org.apache.hadoop.ozone.web.ozShell.volume.CreateVolumeHandler.call(CreateVolumeHandler.java:41) at picocli.CommandLine.execute(CommandLine.java:919) at picocli.CommandLine.access$700(CommandLine.java:104) at picocli.CommandLine$RunLast.handle(CommandLine.java:1083) at picocli.CommandLine$RunLast.handle(CommandLine.java:1051) at picocli.CommandLine$AbstractParseResultHandler.handleParseResult(CommandLine.java:959) at picocli.CommandLine.parseWithHandlers(CommandLine.java:1242) at picocli.CommandLine.parseWithHandler(CommandLine.java:1181) at org.apache.hadoop.hdds.cli.GenericCli.execute(GenericCli.java:61) at org.apache.hadoop.hdds.cli.GenericCli.run(GenericCli.java:52) at org.apache.hadoop.ozone.web.ozShell.Shell.main(Shell.java:80) 2018-10-30 10:19:39,073 INFO rpc.RpcClient: Creating Volume: testvolume, with hdfs as owner and quota set to 1152921504606846976 bytes.
Volume list empty return :
[root@ctr-e138-1518143905142-552728-01-000002 ~]# ozone sh volume list 2018-10-30 10:20:03,275 WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable [ ]
Attachments
Issue Links
- is superceded by
-
HDDS-3056 Allow users to list volumes they have access to, and optionally allow all users to list all volumes
- Resolved