[LON-CAPA-cvs] cvs: loncom / loncnew /lonnet/perl lonnet.pm

raeburn raeburn at source.lon-capa.org
Fri Jun 14 14:49:42 EDT 2024


raeburn		Fri Jun 14 18:49:42 2024 EDT

  Modified files:              
    /loncom	loncnew 
    /loncom/lonnet/perl	lonnet.pm 
  Log:
  - Changes from loncnew rev. 1.108 when creating a new connection between
    LON-CAPA nodes to (a) support verification of common name when creating 
    SSL tunnel between 2.12 nodes, while (b) supporting continued queuing of 
    any delayed transactions when reconnecting (both 2.12 and pre-2.12).
  
  
Index: loncom/loncnew
diff -u loncom/loncnew:1.109 loncom/loncnew:1.110
--- loncom/loncnew:1.109	Sun Jan 12 01:21:33 2020
+++ loncom/loncnew	Fri Jun 14 18:49:41 2024
@@ -2,7 +2,7 @@
 # The LearningOnline Network with CAPA
 # lonc maintains the connections to remote computers
 #
-# $Id: loncnew,v 1.109 2020/01/12 01:21:33 raeburn Exp $
+# $Id: loncnew,v 1.110 2024/06/14 18:49:41 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -97,7 +97,8 @@
 my $RemoteHost;			# Hostname of host child is talking to.
 my $RemoteHostId;		# lonid of host child is talking to.
 my $RemoteDefHostId;		# default lonhostID of host child is talking to.
-my $RemoteLoncapaRev;           # LON-CAPA version of host child is talking to.
+my $RemoteLoncapaRev;           # LON-CAPA version of host child is talking to, 
+                                # if 2.12.0 or newer, format: X.Y.Z
 my @all_host_ids;
 my $UnixSocketDir= $perlvar{'lonSockDir'};
 my $IdleConnections = Stack->new(); # Set of idle connections
@@ -1931,9 +1932,13 @@
 
     &Debug(5,"Creating child for $data (parent_client_connection)");
     (my $hostname,my $lonid, at all_host_ids) = split(':',$data);
+    my $remotelcrev;
+    if ((scalar(@all_host_ids) > 1) && ($all_host_ids[0] =~ /^\d+\.\d+\.[\w.]+$/)) {
+        $remotelcrev = shift(@all_host_ids);
+    }
     $ChildHost{$hostname}++;
     if ($ChildHost{$hostname} == 1) {
-	&CreateChild($hostname,$lonid,$all_host_ids[-1]);
+	&CreateChild($hostname,$lonid,$all_host_ids[-1],$remotelcrev);
     } else {
 	&Log('WARNING',"Request for a second child on $hostname");
     }
Index: loncom/lonnet/perl/lonnet.pm
diff -u loncom/lonnet/perl/lonnet.pm:1.1527 loncom/lonnet/perl/lonnet.pm:1.1528
--- loncom/lonnet/perl/lonnet.pm:1.1527	Tue May 21 02:57:16 2024
+++ loncom/lonnet/perl/lonnet.pm	Fri Jun 14 18:49:42 2024
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # TCP networking package
 #
-# $Id: lonnet.pm,v 1.1527 2024/05/21 02:57:16 raeburn Exp $
+# $Id: lonnet.pm,v 1.1528 2024/06/14 18:49:42 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -188,7 +188,11 @@
 				     Type    => SOCK_STREAM,
 				     Timeout => 10);
     return 0 if (!$client);
-    print $client (join(':',$hostname,$lonid,&machine_ids($hostname),$loncaparevs{$lonid})."\n");
+    if ($loncaparevs{$lonid} =~ /^(\d+\.\d+\.[\w.]+)-\d+$/) {
+        print $client (join(':',$hostname,$lonid,$1,&machine_ids($hostname))."\n");
+    } else {
+        print $client (join(':',$hostname,$lonid,&machine_ids($hostname))."\n");
+    }
     my $result = <$client>;
     chomp($result);
     return 1 if ($result eq 'done');




More information about the LON-CAPA-cvs mailing list