ctubbsii commented on code in PR #5865: URL: https://github.com/apache/accumulo/pull/5865#discussion_r2356674655
########## server/base/src/main/java/org/apache/accumulo/server/conf/cluster/ClusterConfigParser.java: ########## @@ -159,8 +159,12 @@ private static void validateConfiguredGroups(final ServerContext ctx, final Set< if (!zkGroups.contains(cg)) { if (createMissingRG) { try { - ctx.resourceGroupOperations().create(ResourceGroupId.of(cg)); - } catch (AccumuloException | AccumuloSecurityException e) { + // cant use API as servers may not be up when this is called + // from accumulo-cluster + final ResourceGroupId rgid = ResourceGroupId.of(cg); + final ResourceGroupPropKey key = ResourceGroupPropKey.of(rgid); + key.createZNode(ctx.getZooSession().asReaderWriter()); + } catch (KeeperException | InterruptedException e) { Review Comment: Okay, I didn't realize that the RG nodes in ZK need to be present before a service can start up in that RG. So in that case, I think we need to add an option to `Initialize`, similar to `--add-volumes`, like `--add-resource-group <NAME> [<configFile>]`. The script can call that if it needs to, or it can do some validation, and instruct the user to call that themselves first, if they specify a RG that doesn't exist yet. `init` is the appropriate place, because this should be a capability that anybody can use, even if they aren't using our reference scripts for cluster management. For the validation piece, I think it should still be removed from the ClusterConfigParser, but I think it would be appropriate to add something that it can use (if it doesn't already exist) to the `admin serviceStatus` (or whatever it is currently named) to list configured RGs, or one of the `ZooProp*` commands that looks in ZK directly. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: notifications-unsubscr...@accumulo.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org