diff --git a/modules/dcache-info/src/main/java/org/dcache/services/info/base/StatePersistentMetadata.java b/modules/dcache-info/src/main/java/org/dcache/services/info/base/StatePersistentMetadata.java index 6522aaa60c7..e1f554f33c8 100644 --- a/modules/dcache-info/src/main/java/org/dcache/services/info/base/StatePersistentMetadata.java +++ b/modules/dcache-info/src/main/java/org/dcache/services/info/base/StatePersistentMetadata.java @@ -132,6 +132,8 @@ protected void addDefault() { branchMetadata("queue", "name")); this.add(StatePath.parsePath("poolgroups.*"), branchMetadata("poolgroup", "name")); + this.add(StatePath.parsePath("poolgroups.*.nestedgroups.*"), branchMetadata("nestedgroups", "name")); + this.add(StatePath.parsePath("poolgroups.*.links.*"), branchMetadata("linkref", "name")); this.add(StatePath.parsePath("poolgroups.*.pools.*"), branchMetadata("poolref", "name")); diff --git a/modules/dcache-info/src/main/java/org/dcache/services/info/gathers/poolmanager/PoolGroupInfoMsgHandler.java b/modules/dcache-info/src/main/java/org/dcache/services/info/gathers/poolmanager/PoolGroupInfoMsgHandler.java index 9f92becd970..8071603ca56 100644 --- a/modules/dcache-info/src/main/java/org/dcache/services/info/gathers/poolmanager/PoolGroupInfoMsgHandler.java +++ b/modules/dcache-info/src/main/java/org/dcache/services/info/gathers/poolmanager/PoolGroupInfoMsgHandler.java @@ -32,7 +32,7 @@ public void process(Object msgPayload, long metricLifetime) { Object array[] = (Object[]) msgPayload; - if (array.length != 4) { + if (array.length != 5) { LOGGER.error("Pool group info, unexpected array size: {}", array.length); return; } @@ -42,15 +42,18 @@ public void process(Object msgPayload, long metricLifetime) { Object poolNames[] = (Object[]) array[1]; Object linkNames[] = (Object[]) array[2]; Boolean resilient = (Boolean) array[3]; + Object nestedPolls[] = (Object[]) array[4]; StateUpdate update = new StateUpdate(); StatePath thisPoolGroupPath = POOLGROUPS_PATH.newChild(poolgroupName); - if (poolNames.length + linkNames.length == 0) { - // Add an entry, even though this poolgroup is empty. + if (poolNames.length + linkNames.length + nestedPolls.length == 0) { + // Add an entry, even though this poolgroup is empty update.appendUpdate(thisPoolGroupPath, new StateComposite(metricLifetime)); } else { + addItems(update, thisPoolGroupPath.newChild("nestedgroups"), nestedPolls, + metricLifetime); addItems(update, thisPoolGroupPath.newChild("pools"), poolNames, metricLifetime); addItems(update, thisPoolGroupPath.newChild("links"), linkNames, metricLifetime); update.appendUpdate(thisPoolGroupPath.newChild("resilient"), diff --git a/modules/dcache/src/main/java/diskCacheV111/poolManager/PoolSelectionUnitV2.java b/modules/dcache/src/main/java/diskCacheV111/poolManager/PoolSelectionUnitV2.java index 51fd2b2a209..5b1999e3bf1 100644 --- a/modules/dcache/src/main/java/diskCacheV111/poolManager/PoolSelectionUnitV2.java +++ b/modules/dcache/src/main/java/diskCacheV111/poolManager/PoolSelectionUnitV2.java @@ -1532,11 +1532,13 @@ public Object listPoolGroupXml(String groupName) { + groupName); } - Object[] result = new Object[4]; + Object[] result = new Object[5]; result[0] = groupName; result[1] = group._poolList.keySet().toArray(); result[2] = group._linkList.keySet().toArray(); result[3] = group.isPrimary(); + result[4] = group._pgroupList.stream().sorted(comparing(PGroup::getName)) + .map(PGroup::getName).toArray(); xlsResult = result; } } finally {