sub readClusterVolumes { my %volumesInfo; print "checkpoint 1:\n", Dumper(\%volumesInfo); print "vol: ", $volumesInfo{volumes}, ', ', $volumesInfo{volumes}{0}, ', ', $volumesInfo{volumes}{1}, "\n"; my @volumesNodeIDs = &getParam($PARAMS_VOLUMES_NODE_LIST); # should return (0 1) or nothing dependin whether the parameter exists my (%volumes, $tmp, $volumeKey); $volumesInfo{maxVolId} = &getParam($PARAMS_MAX_VOLUME_ID); $volumesInfo{isInternal} = &getParam($PARAMS_INTERNAL_DISKS); for (my $i = 0; $i < @volumesNodeIDs; $i++) { print "in for loop\n"; ($volumeKey = $PARAMS_NODEX_VOLUMES) =~ s/X/$volumesNodeIDs[$i]/; $tmp = &getCDBParam($volumeKey, $TRUE); if ($tmp && $tmp ne '') { print "in if, tmp :$tmp\n"; $volumes{$volumesNodeIDs[$i]} = $tmp; } } print "checkpoint 2:\n", Dumper(\%volumesInfo); print "vol: ", $volumesInfo{volumes}, ', ', $volumesInfo{volumes}{0}, ', ', $volumesInfo{volumes}{1}, "\n"; if (scalar(keys(%volumes)) == 0) { print "no voluems #######\n"; $volumesInfo{volumes} = 'none'; } else { print "voluems exist #######\n"; $volumesInfo{volumes} = \%volumes; } print "checkpoint 3:\n", Dumper(\%volumesInfo); print "vol: ", $volumesInfo{volumes}, ', ', $volumesInfo{volumes}{0}, ', ', $volumesInfo{volumes}{1}, "\n"; return \%volumesInfo; }; #### checkpoint 1: $VAR1 = {}; vol: , , in for loop in if, tmp :0 1 2 3 4 in for loop in if, tmp :0 1 2 3 4 checkpoint 2: $VAR1 = { 'volumes' => {}, 'maxVolId' => '4', 'isInternal' => 'false' }; vol: HASH(0x8479e1c), , voluems exist ####### checkpoint 3: $VAR1 = { 'volumes' => { '1' => '0 1 2 3 4', '0' => '0 1 2 3 4' }, 'maxVolId' => '4', 'isInternal' => 'false' }; vol: HASH(0x88d8144), 0 1 2 3 4, 0 1 2 3 4 #### checkpoint 1: $VAR1 = {}; Use of uninitialized value in print at /vobs/mng/exadmin/var/www/cgi-bin/lib/clusterEdit.pl line 21, line 60. Use of uninitialized value in print at /vobs/mng/exadmin/var/www/cgi-bin/lib/clusterEdit.pl line 21, line 60. Use of uninitialized value in print at /vobs/mng/exadmin/var/www/cgi-bin/lib/clusterEdit.pl line 21, line 60. vol: , , checkpoint 2: $VAR1 = { 'volumes' => {}, 'maxVolId' => 'none', 'isInternal' => 'false' }; vol: HASH(0x847a2c0), , no voluems ####### checkpoint 3: $VAR1 = { 'volumes' => 'none', 'maxVolId' => 'none', 'isInternal' => 'false' }; vol: none, 0 1 2 3 4, 0 1 2 3 4