Uploaded image for project: 'OpenNMS'
  1. OpenNMS
  2. NMS-8671

Any SNMP error-status > 5 treated as unrecognized, aborts AggregateTracker

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Blocker
    • Resolution: Fixed
    • Affects Version/s: Meridian-2015.1.2, 18.0.1
    • Component/s: Data Collection - SNMP
    • Security Level: Default (Default Security Scheme)
    • Labels:
    • Environment:
    • Sprint:
      Horizon - Nov 2nd, Horizon - Dec 7th, Horizon - Dec 14th

      Description

      The AggregateTracker code is unaware of SNMP error-status values greater than 5 (the original set). Higher values are treated as unknown and invariably fatal to the tracker's operation. RFC3416 defines values 0-18. We need to put in the work to understand which of these values are actually show-stoppers, which can be ignored and which may require some kind of adaptive behavior as in the case of TOO_BIG_ERR.

              public boolean processErrors(int errorStatus, int errorIndex) {
                  if (errorStatus == TOO_BIG_ERR) {
                      int maxVarsPerPdu = m_pduBuilder.getMaxVarsPerPdu();
                      if (maxVarsPerPdu <= 1) {
                          throw new IllegalArgumentException("Unable to handle tooBigError when maxVarsPerPdu = "+maxVarsPerPdu);
                      }
                      m_pduBuilder.setMaxVarsPerPdu(maxVarsPerPdu/2);
                      reportTooBigErr("Reducing maxVarsPerPdu for this request to "+m_pduBuilder.getMaxVarsPerPdu());
                      return true;
                  } else if (errorStatus == GEN_ERR) {
                      return processChildError(errorStatus, errorIndex);
                  } else if (errorStatus == NO_SUCH_NAME_ERR) {
                      return processChildError(errorStatus, errorIndex);
                  } else if (errorStatus != NO_ERR){
                      throw new IllegalArgumentException("Unrecognized errorStatus "+errorStatus);
                  } else {
                      // Continue on.. no need to retry
                      return false;
                  }
              }
      

        Attachments

          Activity

            People

            • Assignee:
              ranger Benjamin Reed
              Reporter:
              jeffg Jeff Gehlbach
            • Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: