Send Linux-ha-cvs mailing list submissions to
        linux-ha-cvs@lists.linux-ha.org

To subscribe or unsubscribe via the World Wide Web, visit
        http://lists.community.tummy.com/mailman/listinfo/linux-ha-cvs
or, via email, send a message with subject or body 'help' to
        [EMAIL PROTECTED]

You can reach the person managing the list at
        [EMAIL PROTECTED]

When replying, please edit your Subject line so it is more specific
than "Re: Contents of Linux-ha-cvs digest..."


Today's Topics:

   1. Linux-HA CVS: mgmt by zhenh from 
      (linux-ha-cvs@lists.linux-ha.org)
   2. Linux-HA CVS: ldirectord by horms from 
      (linux-ha-cvs@lists.linux-ha.org)
   3. Linux-HA CVS: ldirectord by horms from 
      (linux-ha-cvs@lists.linux-ha.org)


----------------------------------------------------------------------

Message: 1
Date: Tue, 15 Aug 2006 02:43:13 -0600 (MDT)
From: linux-ha-cvs@lists.linux-ha.org
Subject: [Linux-ha-cvs] Linux-HA CVS: mgmt by zhenh from 
To: [EMAIL PROTECTED]
Message-ID: <[EMAIL PROTECTED]>

linux-ha CVS committal

Author  : zhenh
Host    : 
Project : linux-ha
Module  : mgmt

Dir     : linux-ha/mgmt/client


Modified Files:
        haclient.py.in 


Log Message:
Fix two bugs, one is add parameter to lsb resource, the other is deal with the 
metadata without version. done by dvlt(Yan Rong Ge)
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/mgmt/client/haclient.py.in,v
retrieving revision 1.71
retrieving revision 1.72
diff -u -3 -r1.71 -r1.72
--- haclient.py.in      25 Jun 2006 07:40:01 -0000      1.71
+++ haclient.py.in      15 Aug 2006 08:43:13 -0000      1.72
@@ -201,7 +201,7 @@
                                if fields[row].auto_gen :
                                        kv[fields[row].key] = uuid()
                                        continue
-                               if fields[row].options != None :
+                               if fields[row].options != None and 
fields[row].options != []:
                                        combo = widgets[row]
                                        kv[fields[row].key] = 
combo.child.get_text()
                                else :
@@ -2105,8 +2105,10 @@
                meta = RAMeta()
                meta.name = doc_xml.getAttribute("name")
 
-               version_xml = doc_xml.getElementsByTagName("version")[0]
-               meta.version = version_xml.childNodes[0].data
+               meta.version = ""
+               version_xml = doc_xml.getElementsByTagName("version")
+               if version_xml != [] and version_xml[0] in doc_xml.childNodes :
+                       meta.version = version_xml[0].childNodes[0].data
 
                meta.longdesc = ""
                desc_xml = doc_xml.getElementsByTagName("longdesc")




------------------------------

Message: 2
Date: Tue, 15 Aug 2006 02:43:44 -0600 (MDT)
From: linux-ha-cvs@lists.linux-ha.org
Subject: [Linux-ha-cvs] Linux-HA CVS: ldirectord by horms from 
To: [EMAIL PROTECTED]
Message-ID: <[EMAIL PROTECTED]>

linux-ha CVS committal

Author  : horms
Host    : 
Project : linux-ha
Module  : ldirectord

Dir     : linux-ha/ldirectord


Modified Files:
      Tag: STABLE_1_2
        ldirectord 


Log Message:
Pass rserver instead of server_str to ld_emailalert_send()

server_str is a string representation of "$virtual $real"
rserver is a string representation of "$real"

Passing the latter makes ld_emailalert_send() more consistent
with other functions, and also means the caller has to do 
less work, as $rserver is generally already available.

Backport of 1.171 (ldirectord.cf 1.27)

Signed-Off-By: Simon Horman <[EMAIL PROTECTED]>

===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/ldirectord/Attic/ldirectord,v
retrieving revision 1.77.2.74
retrieving revision 1.77.2.75
diff -u -3 -r1.77.2.74 -r1.77.2.75
--- ldirectord  15 Aug 2006 08:42:45 -0000      1.77.2.74
+++ ldirectord  15 Aug 2006 08:43:43 -0000      1.77.2.75
@@ -1,5 +1,5 @@
 #!/usr/bin/perl
-my($VERSION)=(qw$Id: ldirectord,v 1.77.2.74 2006/08/15 08:42:45 horms Exp 
$)[2];
+my($VERSION)=(qw$Id: ldirectord,v 1.77.2.75 2006/08/15 08:43:43 horms Exp 
$)[2];
 
 ######################################################################
 # ldirectord                 http://www.vergenet.net/linux/ldirectord/
@@ -2744,13 +2744,13 @@
                }
                &ld_log("Quiescent $log_args (Weight set to 0)");
                &ld_emailalert_send("Quiescent $log_args (Weight set to 0)",
-                                   $v, $server_str, $currenttime);
+                                   $v, $rservice, $currenttime);
         }
        else {
                 &system_wrapper("$IPVSADM -d $ipvsadm_args");
                &ld_log("Deleted $log_args");
                &ld_emailalert_send("Deleted $log_args", $v,
-                                   $server_str, $currenttime);
+                                   $rservice, $currenttime);
        }
 }
 
@@ -2797,7 +2797,6 @@
         if(defined($ov)){
                 $or=$ov->{"real"}->{$rservice};
         }
-        my $server_str=$rservice . " " . $v->{server} . ":" . $v->{port};
         if(defined($or)){
                 unless($or->{"weight"} eq $rwght and
                        get_forward_flag($or->{"forward"}) eq $rforw){
@@ -2805,14 +2804,14 @@
                        &ld_log("Restored $log_args (Weight set to $rwght)");
                        &ld_emailalert_send("Restored $log_args " .
                                            "(Weight set to $rwght)",
-                                           $v, $server_str, 0);
+                                           $v, $rservice, 0);
                 }
         }
         else {
                 &system_wrapper("$IPVSADM -a $ipvsadm_args");
                &ld_log("Added $log_args (Weight set to $rwght)");
                &ld_emailalert_send("Added $log_args (Weight set to $rwght)",
-                                   $v, $server_str, 0);
+                                   $v, $rservice, 0);
         }
 }
 
@@ -3162,19 +3161,24 @@
 
 sub ld_emailalert_send
 {
-       my ($subject, $v, $server_str, $currenttime) = (@_);
+       my ($subject, $v, $rserver, $currenttime) = (@_);
        my $emailmsg;
        my $emailfh;
        my $status = 0;
        my $to_addr;
        my $frequency;
+       my $virtual_str;
+       my $id;
+
+       $virtual_str = &get_virtual($v);
+       $id = "$rserver ($virtual_str)";
 
        if ($currenttime == 0 or $frequency == 0) {
-               delete $EMAILSTATUS{"$server_str"};
+               delete $EMAILSTATUS{"$id"};
        }
        else {
-               $EMAILSTATUS{$server_str}->{v} = $v;
-               $EMAILSTATUS{$server_str}->{alerttime} = $currenttime;
+               $EMAILSTATUS{$id}->{v} = $v;
+               $EMAILSTATUS{$id}->{alerttime} = $currenttime;
        }
 
        $to_addr = defined $v->{emailalert} ? $v->{emailalert} : $EMAILALERT;
@@ -3211,19 +3215,22 @@
 {
        my $currenttime = time();
        my $es;
-       my $server_str;
+       my $id;
+       my $rserver;
        my $frequency;
 
-       foreach $server_str (keys %EMAILSTATUS) {
-               $es = $EMAILSTATUS{$server_str};
+       foreach $id (keys %EMAILSTATUS) {
+               $es = $EMAILSTATUS{$id};
                $frequency = defined $es->{v}->{emailalertfreq} ? 
                                        $es->{v}->{emailalertfreq} :
                                        $EMAILALERTFREQ;
+               $id =~ m/(.*) /;
+               $rserver = $1;
                if ($currenttime - $es->{alerttime} < $frequency) {
                        next;
                }
-               &ld_emailalert_send("Inaccessible real server: " . $server_str, 
-                              $es->{v}, $server_str, $currenttime);
+               &ld_emailalert_send("Inaccessible real server: $id", 
+                              $es->{v}, $rserver, $currenttime);
        }
 }
 




------------------------------

Message: 3
Date: Tue, 15 Aug 2006 02:44:43 -0600 (MDT)
From: linux-ha-cvs@lists.linux-ha.org
Subject: [Linux-ha-cvs] Linux-HA CVS: ldirectord by horms from 
To: [EMAIL PROTECTED]
Message-ID: <[EMAIL PROTECTED]>

linux-ha CVS committal

Author  : horms
Host    : 
Project : linux-ha
Module  : ldirectord

Dir     : linux-ha/ldirectord


Modified Files:
      Tag: STABLE_1_2
        ldirectord 


Log Message:
Emailalerts for purge events

Backport of 1.172 (ldirectord.in 1.28)

Signed-Off-By: Simon Horman <[EMAIL PROTECTED]>

===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/ldirectord/Attic/ldirectord,v
retrieving revision 1.77.2.75
retrieving revision 1.77.2.76
diff -u -3 -r1.77.2.75 -r1.77.2.76
--- ldirectord  15 Aug 2006 08:43:43 -0000      1.77.2.75
+++ ldirectord  15 Aug 2006 08:44:43 -0000      1.77.2.76
@@ -1,5 +1,5 @@
 #!/usr/bin/perl
-my($VERSION)=(qw$Id: ldirectord,v 1.77.2.75 2006/08/15 08:43:43 horms Exp 
$)[2];
+my($VERSION)=(qw$Id: ldirectord,v 1.77.2.76 2006/08/15 08:44:43 horms Exp 
$)[2];
 
 ######################################################################
 # ldirectord                 http://www.vergenet.net/linux/ldirectord/
@@ -3025,10 +3025,13 @@
 {
        my ($v, $rservice, $tag) = (@_);
 
+       my $log_arg = "Purged real server ($tag): $rservice (" . 
+                     &get_virtual($v) . ")";
+
        &system_wrapper("$IPVSADM -d $v->{proto} " . &get_virtual($v) . 
                        " -r $rservice");
-       &ld_log("Purged real server ($tag): " .
-               "$rservice (" . &get_virtual($v) . ")");
+       &ld_log($log_arg);
+       &ld_emailalert_send($log_arg, $v, $rservice);
 }
 
 




------------------------------

_______________________________________________
Linux-ha-cvs mailing list
Linux-ha-cvs@lists.linux-ha.org
http://lists.community.tummy.com/mailman/listinfo/linux-ha-cvs


End of Linux-ha-cvs Digest, Vol 33, Issue 56
********************************************

Reply via email to