Author: arkurth
Date: Thu Mar 19 20:03:18 2015
New Revision: 1667860

URL: http://svn.apache.org/r1667860
Log:
VCL-842
I added a condition to DataStructure.pm to not display warnings in vcld.log if 
mangementnode.keys is not populated. Because get_management_node_keys is called 
from several places, it was cleaner to disable the warnings from the source 
rather than add an argument to each call.

Modified:
    vcl/trunk/managementnode/lib/VCL/DataStructure.pm

Modified: vcl/trunk/managementnode/lib/VCL/DataStructure.pm
URL: 
http://svn.apache.org/viewvc/vcl/trunk/managementnode/lib/VCL/DataStructure.pm?rev=1667860&r1=1667859&r2=1667860&view=diff
==============================================================================
--- vcl/trunk/managementnode/lib/VCL/DataStructure.pm (original)
+++ vcl/trunk/managementnode/lib/VCL/DataStructure.pm Thu Mar 19 20:03:18 2015
@@ -891,7 +891,9 @@ sub _automethod : Automethod {
                }
 
                if (!defined $return_value) {
-                       notify($ERRORS{'WARNING'}, 0, "corresponding data is 
undefined for $method_name: $hash_path", $self->request_data) if $show_warnings;
+                       if ($show_warnings && $method_name !~ 
/^(get_management_node_keys)$/) {
+                               notify($ERRORS{'WARNING'}, 0, "corresponding 
data is undefined for $method_name: $hash_path");
+                       }
                        return sub { };
                }
 
@@ -1615,7 +1617,7 @@ sub set_computer_private_ip_address {
        }
        
        # Update the database
-       if (!update_computer_private_ip_address($computer_id, 
$private_ip_address_argument)) {
+       if ($computer_id && !update_computer_private_ip_address($computer_id, 
$private_ip_address_argument)) {
                notify($ERRORS{'WARNING'}, 0, "failed to update private IP 
address of $computer_hostname to $private_ip_address_argument, unable to update 
the database");
                return;
        }


Reply via email to