dlmarion commented on code in PR #5865:
URL: https://github.com/apache/accumulo/pull/5865#discussion_r2356388917


##########
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:
   I can make this change, but I think it's going to effect the user 
experience. The user will configure `cluster.yaml` and run `accumulo-cluster 
start`, then when `ClusterConfigParser.validateConfiguredGroups` is called it 
will fail because the resource group have not been created. I can no longer 
create them in `accumulo-cluster` because I can't parse `cluster.yaml`. We'll 
have to kick out an error telling the user to go run `ZooPropEditor` to create 
the resource groups. Removing `ClusterConfigParser.validateConfiguredGroups` is 
likely not an option because if the `cluster.yaml` is misconfigured, then a 
bunch of resources won't start.



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to