Uploaded image for project: 'VCL'
  1. VCL
  2. VCL-916

Linux.pm get_total_space and get_available_space may generate undefined array reference warnings

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 2.4.2
    • 2.5
    • vcld (backend)
    • None

    Description

      Linux.pm::get_total_space and Linux.pm::get_available_space may generate warnings such as:

      ---- CRITICAL ----
      2015-11-03 06:34:55|vcld:die_handler|659|Can't use an undefined value as an ARRAY reference at /usr/local/vcl/bin/../lib/VCL/Module/OS/Linux.pm line 1893.
      ( 0) vcld, die_handler (line: 659)
      (-1) Linux.pm, get_total_space (line: 1893)
      (-2) VMware.pm, get_vmdk_volume_total_space (line: 2187)
      (-3) VMware.pm, is_vmx_vmdk_volume_shared (line: 2116)
      (-4) VMware.pm, check_vmhost_disk_space (line: 2211)
      (-5) VMware.pm, load (line: 519)
      (-6) new.pm, reload_image (line: 634)
      (-7) new.pm, process (line: 277)
      (-8) vcld, make_new_child (line: 587)
      (-9) vcld, main (line: 348)
      

      The code is check if $output is defined and including it in the notify message if it isn't:

      if (!defined($output)) {
         notify($ERRORS{'WARNING'}, 0, "failed to run command to determine available space on $computer_short_name:\ncommand: $command\noutput:\n" . join("\n", @$output));
         return;
      }
      

      Attachments

        Activity

          People

            arkurth Andrew Kurth
            arkurth Andrew Kurth
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: