Azure with multiple matching groups gives error "Searched for 1 but retrieved 0 maybe a config is off?"

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: Major
    • None
    • Affects Version/s: 4.16.0
    • Component/s: provisioning
    • None

      Trying to debug an issue with Azure provisioning. The client ran the Azure provisioner to create a group, but the settings may have been off. The second run, it created the group, but then returned error "Searched for 1 but retrieved 0 maybe a config is off?"

      I can see with log commands on, it finds multiple copies of the group. I think this source code is the problem, as it quietly ignores the result when multiple are returned. It does log it to LOG.error, but it doesn't set any provisioning error that would make the user aware of the issue.

      edu/internet2/middleware/grouper/app/azure/GrouperAzureApiCommands.java:1749

                if (value != null && value.size() > 0) {
                  if (value.size() == 1) {
                    groupNode = value.get(0);
                  } else {
                    hasError = true;
                    LOG.error("Query returned multiple results for field name: "+fieldName +" and fieldValue: "+fieldValue);
                  }
                }
      

      These should signal back to the provisioner the actual issue, so that it doesn't keep creating new versions of the same group.

            Assignee:
            Chris Hyzer (upenn.edu)
            Reporter:
            Chad Redman
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: