File: ssh.txt

package info (click to toggle)
dmtcp 2.6.0-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 6,496 kB
  • sloc: cpp: 33,592; ansic: 28,099; sh: 6,735; makefile: 1,950; perl: 1,690; python: 1,241; asm: 138; java: 13
file content (108 lines) | stat: -rw-r--r-- 4,621 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
DMTCP supports ssh by virtualizing the underlying ssh protocol. Here is a
schematic diagram of DMTCP controlled processes communicating over ssh:

A. Without DMTCP
                                                
      Local Node        |        Remote Node   
                        |                      
      +-----+           |         +-----+      
      |a.out|           |         |b.out|      
      +-----+           |         +-----+      
         ^              |            ^         
         | pipes/socks  |            |
         v              |            v
      +-----+   socket  |         +-----+
      | ssh |<==========|========>|sshd |
      +-----+           |         +-----+

                        
B. With DMTCP (Checkpoint)
                        
    Local Node          |        Remote Node
                        |
  .............................................
  .   +-----+           |         +-----+     .
  .   |a.out|           |         |b.out|     .
  .   +-----+           |         +-----+     .
  .      ^              |            ^        .
  .      | pipes/socks  |            |        .
  .      v              |            v        .
  . +---------+ socket  |       +----------+  .
  . |dmtcp_ssh|<--------|------>|dmtcp_sshd|  .
  . +---------+         |       +----------+  .
  .      ^              |            ^        .
  .......|...........................|.........
         |              |            |
         | pipes        |            |
         v              |            v
      +-----+   socket  |         +-----+
      | ssh |<==========|========>|sshd |
      +-----+           |         +-----+
     

The dmtcp_ssh process relays data between ssh process and a.out.  Similarly,
dmtcp_sshd process relays data between sshd process and b.out.  Processes
a.out, b.out, dmtcp_ssh, and dmtcp_sshd are checkpointed along with the socket
connection between dmtcp_ssh and dmtcp_sshd.  The ssh and sshd process are
never checkpointed. Also, the pipes between ssh and dmtcp_ssh, and between
sshd and dmtcp_sshd are not checkpointed.


C. Restart:

During restart, all four checkpointed processes are restored along with the
socket connection between dmtcp_ssh and dmtcp_sshd.  The picture looks like the
following:

    Local Node          |        Remote Node
                        |
  .............................................
  .   +-----+           |         +-----+     .
  .   |a.out|           |         |b.out|     .
  .   +-----+           |         +-----+     .
  .      ^              |            ^        .
  .      | pipes/socks  |            |        .
  .      v              |            v        .
  . +---------+ socket  |       +----------+  .
  . |dmtcp_ssh|<--------|------>|dmtcp_sshd|  .
  . +---------+         |       +----------+  .
  .                     |                     .
  .............................................
                        |
                        |
     

Notice that there is no underlying ssh connection yet. At this point, the
dmtcp_ssh process determines the _current_ network address of the dmtcp_sshd
process (by using getpeername()).  Next, the dmtcp_ssh process launches a
"dummy" dmtcp_sshd process on the remote node using ssh. This "dummy" process
is then used to setup the pipes between the original dmtcp_sshd process and the
sshd process.  This allows dmtcp_ssh and dmtcp_sshd to communicate over the new
ssh connection.  It should also be noted that the dummy dmtcp_sshd process is
never checkpointed.

                        
    Local Node          |        Remote Node
                        |
                        |
      +-----+           |         +-----+    
      |a.out|           |         |b.out|    
      +-----+           |         +-----+    
         ^              |            ^       
         | pipes/socks  |            |       
         v              |            v       
    +---------+ socket  |       +----------+ 
    |dmtcp_ssh|<--------|------>|dmtcp_sshd|<..
    +---------+         |       +----------+  .
         ^              |                     .
         |              |       +----------+  .
         |              |       | dummy    |  .
         |              |       |dmtcp_sshd|  .
         |              |       +----------+  .
         |              |            ^        .
         | pipes        |            |        .
         v              |            v        .
      +-----+   socket  |         +-----+     .
      | ssh |<==========|========>|sshd |<.....
      +-----+           |         +-----+