1 Return-Path: <sojkam1@fel.cvut.cz>
\r
2 X-Original-To: notmuch@notmuchmail.org
\r
3 Delivered-To: notmuch@notmuchmail.org
\r
4 Received: from localhost (localhost [127.0.0.1])
\r
5 by olra.theworths.org (Postfix) with ESMTP id 54954431FD0
\r
6 for <notmuch@notmuchmail.org>; Tue, 15 Feb 2011 13:42:49 -0800 (PST)
\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org
\r
11 X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[none]
\r
13 Received: from olra.theworths.org ([127.0.0.1])
\r
14 by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)
\r
15 with ESMTP id rJVFppGvILd5 for <notmuch@notmuchmail.org>;
\r
16 Tue, 15 Feb 2011 13:42:48 -0800 (PST)
\r
17 Received: from max.feld.cvut.cz (max.feld.cvut.cz [147.32.192.36])
\r
18 by olra.theworths.org (Postfix) with ESMTP id 504B5431FB5
\r
19 for <notmuch@notmuchmail.org>; Tue, 15 Feb 2011 13:42:48 -0800 (PST)
\r
20 Received: from localhost (unknown [192.168.200.4])
\r
21 by max.feld.cvut.cz (Postfix) with ESMTP id 793523CFE9F;
\r
22 Tue, 15 Feb 2011 22:42:46 +0100 (CET)
\r
23 X-Virus-Scanned: IMAP AMAVIS
\r
24 Received: from max.feld.cvut.cz ([192.168.200.1])
\r
25 by localhost (styx.feld.cvut.cz [192.168.200.4]) (amavisd-new,
\r
27 with ESMTP id KyxHjl+bIZTa; Tue, 15 Feb 2011 22:42:44 +0100 (CET)
\r
28 Received: from imap.feld.cvut.cz (imap.feld.cvut.cz [147.32.192.34])
\r
29 by max.feld.cvut.cz (Postfix) with ESMTP id D891B19F331A;
\r
30 Tue, 15 Feb 2011 22:42:44 +0100 (CET)
\r
31 Received: from wsheee.2x.cz (unknown [213.29.198.144])
\r
32 (Authenticated sender: sojkam1)
\r
33 by imap.feld.cvut.cz (Postfix) with ESMTPSA id BAD6315C031;
\r
34 Tue, 15 Feb 2011 22:42:44 +0100 (CET)
\r
35 Received: from wsh by wsheee.2x.cz with local (Exim 4.72)
\r
36 (envelope-from <sojkam1@fel.cvut.cz>)
\r
37 id 1PpSfa-0007sk-Rr; Tue, 15 Feb 2011 22:42:50 +0100
\r
38 From: Michal Sojka <sojkam1@fel.cvut.cz>
\r
39 To: Jesse Rosenthal <jrosenthal@jhu.edu>, notmuch@notmuchmail.org
\r
40 Subject: Re: Remote usage script updated
\r
41 In-Reply-To: <m1k4h8syhi.fsf@watt.hwcampus.jhu.edu>
\r
42 References: <87oc72xs35.fsf@lucky.home> <87aaibylqe.fsf@steelpick.2x.cz>
\r
43 <87tygiowyi.fsf@wsheee.2x.cz>
\r
44 <m1k4h8syhi.fsf@watt.hwcampus.jhu.edu>
\r
45 User-Agent: Notmuch/0.5-103-g1253785 (http://notmuchmail.org) Emacs/23.2.1
\r
47 Date: Tue, 15 Feb 2011 22:42:50 +0100
\r
48 Message-ID: <87lj1hrn39.fsf@wsheee.2x.cz>
\r
50 Content-Type: text/plain; charset=us-ascii
\r
51 X-BeenThere: notmuch@notmuchmail.org
\r
52 X-Mailman-Version: 2.1.13
\r
54 List-Id: "Use and development of the notmuch mail system."
\r
55 <notmuch.notmuchmail.org>
\r
56 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
\r
57 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
58 List-Archive: <http://notmuchmail.org/pipermail/notmuch>
\r
59 List-Post: <mailto:notmuch@notmuchmail.org>
\r
60 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
61 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
\r
62 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
63 X-List-Received-Date: Tue, 15 Feb 2011 21:42:49 -0000
\r
65 On Wed, 09 Feb 2011, Jesse Rosenthal wrote:
\r
68 > On Sun, 06 Feb 2011 00:58:29 +0100, Michal Sojka <sojkam1@fel.cvut.cz> wrote:
\r
69 > > Hmm, this code worked well with dropbear ssh server but it seems that
\r
70 > > with openssh server the result is not that good. Namely, if the master
\r
71 > > connection is dead, the command running true blocked for a long time.
\r
73 > Seemed to work okay for me when I played around with it a bit (in
\r
74 > different circumstances, and with a confused laptop waking up from
\r
75 > hibernation). But I'll hold off on updating it till I can figure out the
\r
76 > most reliable way.
\r
80 I've just found that there is a SSH option called ControlPersist and
\r
81 this is the missing piece to reliable connection sharing for notmuch
\r
82 remote script. This option is available since openssh 5.6
\r
83 (http://www.openssh.org/txt/release-5.6) with a fix of race conditions
\r
84 in 5.7 (http://www.openssh.org/txt/release-5.7).
\r
86 Now I have in my script the following command:
\r
87 ssh -x -a -oControlMaster=auto -oControlPersist=600 -S $SOCKET $USER@$SSH_HOST $NOTMUCH_REMOTE_BIN ${CMD} ${args}
\r
89 where SOCKET="${CACHE}/.ssh-socket-${USER}@${SSH_HOST}" and it works
\r
92 Unfortunately, this option is not supported in recently released Debian
\r
93 Squeeze but from http://bugs.debian.org/594295 seems that it might be
\r
94 supported later, perhaps in a point release.
\r