Uploaded image for project: 'Observium'
  1. Observium
  2. OBS-4873

Oops during discovery of Dell N4000 Series Switches

Details

    • Bug
    • Resolution: Fixed
    • Major
    • None
    • None
    • Discovery
    • Production

    Description

      Getting error when trying to discover Dell Switches (N4000 Series).

      Output attached.

       

      Attachments

        1. discovery_error.txt
          570 kB
          Mark Williams
        2. image-2024-07-31-21-19-46-550.png
          171 kB
          Adam Armstrong
        3. oops_error.txt
          13 kB
          Mark Williams

        Activity

          [OBS-4873] Oops during discovery of Dell N4000 Series Switches

          That FIXED it...

          THANKS....

           

          mwilliamsr-net Mark Williams added a comment - That FIXED it... THANKS....  

          Hi Mark,

          It seems that this was caused by recent PHP8 changes turning an old non-fatal bug into a new fatal bug.

          We were sending one too many arguments to the sensor discovery function, shifting multiplier/scale, current value, and the options array up one, resulting in the current value being set as the options array, which would previously not have had any effect beyond breaking some old compatibility code, but now produces a fatal error because in newer versions trying to get an array value from a string/integer is fatal!

          I think this code is pretty old, so this has been there since 2019.

          If you want to see how bugs are formed, here you go. When I migrated this code in 2019, the $descr argument shared a line, so I suppose I must have inserted the NULL somehow to replace the "missing" argument, and then when reformatting moved the $descr to its own line:

          It should be fixed in SVN now as of 13603.

          You can pull this file and drop it over your broken one with:

          curl -u <USERNAME> https://svn.observium.org/svn/observium/trunk/includes/discovery/sensors/dnos-boxservices-private-mib.inc.php -o /opt/observium/includes/discovery/sensors/dnos-boxservices-private-mib.inc.php

          Replace the <USERNAME> with your svn username.

          If that fixes it I'll do a stable merge.

          adam.

          adama Adam Armstrong added a comment - Hi Mark, It seems that this was caused by recent PHP8 changes turning an old non-fatal bug into a new fatal bug. We were sending one too many arguments to the sensor discovery function, shifting multiplier/scale, current value, and the options array up one, resulting in the current value being set as the options array, which would previously not have had any effect beyond breaking some old compatibility code, but now produces a fatal error because in newer versions trying to get an array value from a string/integer is fatal! I think this code is pretty old, so this has been there since 2019. If you want to see how bugs are formed, here you go. When I migrated this code in 2019, the $descr argument shared a line, so I suppose I must have inserted the NULL somehow to replace the "missing" argument, and then when reformatting moved the $descr to its own line: It should be fixed in SVN now as of 13603. You can pull this file and drop it over your broken one with: curl -u <USERNAME> https://svn.observium.org/svn/observium/trunk/includes/discovery/sensors/dnos-boxservices-private-mib.inc.php -o /opt/observium/includes/discovery/sensors/dnos-boxservices-private-mib.inc.php Replace the <USERNAME> with your svn username. If that fixes it I'll do a stable merge. adam.

          People

            landy Mike Stupalov
            mwilliamsr-net Mark Williams
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: