summaryrefslogtreecommitdiff
path: root/tickets/1113f1af92984443b3e44700449aadc1/Maildir/new/1469355006.M478909P30408Q1.hrun
blob: 81d22720bd3e767902735f481dd54c5c802d1a2a (plain)
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
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
Return-Path: <obnam-dev-bounces@obnam.org>
X-Original-To: distix@pieni.net
Delivered-To: distix@pieni.net
Received: from bagpuss.pepperfish.net (bagpuss.pepperfish.net [148.251.8.16])
	(using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by pieni.net (Postfix) with ESMTPS id EE1662266A
	for <distix@pieni.net>; Sun, 24 Jul 2016 12:09:20 +0200 (CEST)
Received: from platypus.pepperfish.net (unknown [10.112.100.20])
	by bagpuss.pepperfish.net (Postfix) with ESMTP id 502BB2DB;
	Sun, 24 Jul 2016 11:09:20 +0100 (BST)
Received: from ip6-localhost ([::1] helo=platypus.pepperfish.net)
	by platypus.pepperfish.net with esmtp (Exim 4.80 #2 (Debian))
	id 1bRGLY-000387-7D; Sun, 24 Jul 2016 11:09:20 +0100
Received: from inmail0 ([10.112.100.10] helo=mx0.pepperfish.net)
 by platypus.pepperfish.net with esmtp (Exim 4.80 #2 (Debian))
 id 1bRGLW-000381-9B
 for <obnam-dev@obnam.org>; Sun, 24 Jul 2016 11:09:18 +0100
Received: from pieni.net ([95.142.166.37] ident=postfix)
 by mx0.pepperfish.net with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256)
 (Exim 4.80) (envelope-from <liw@liw.fi>) id 1bRGLU-0007u4-7k
 for obnam-dev@obnam.org; Sun, 24 Jul 2016 11:09:18 +0100
Received: from exolobe3.liw.fi (91-145-75-165.bb.dnainternet.fi
 [91.145.75.165])
 (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))
 (No client certificate requested)
 by pieni.net (Postfix) with ESMTPSA id 1056D20CAC
 for <obnam-dev@obnam.org>; Sun, 24 Jul 2016 12:09:10 +0200 (CEST)
Received: from exolobe3 (localhost [127.0.0.1])
 by exolobe3.liw.fi (Postfix) with ESMTPS id 5A6341204A4
 for <obnam-dev@obnam.org>; Sun, 24 Jul 2016 13:09:09 +0300 (EEST)
Date: Sun, 24 Jul 2016 13:09:08 +0300
From: Lars Wirzenius <liw@liw.fi>
To: obnam-dev@obnam.org
Message-ID: <20160724100908.GJ5765@exolobe3>
References: <20160618094844.28217-1-robbat2@gentoo.org>
 <20160618094844.28217-3-robbat2@gentoo.org>
MIME-Version: 1.0
In-Reply-To: <20160618094844.28217-3-robbat2@gentoo.org>
User-Agent: Mutt/1.6.0 (2016-04-01)
X-Spam-Score: -2.9
X-Spam-Score-int: -28
X-Spam-Bar: --
X-Scanned-By: pepperfish.net, Sun, 24 Jul 2016 11:09:18 +0100
X-Spam-Report: Content analysis details: (-2.9 points)
 pts rule name              description
 ---- ---------------------- --------------------------------------------------
 -1.0 PPF_USER_AGENT_MUTT    User-Agent: contains Mutt (Mutt isn't a spam
 tool) -0.5 PPF_USER_AGENT         User-Agent: exists
 0.5 PPF_MESSAGEID_NODOTS   Message-Id contains no dots after the @
 -1.9 BAYES_00               BODY: Bayes spam probability is 0 to 1%
 [score: 0.0000]
X-ACL-Warn: message may be spam
X-Scan-Signature: abef2c07f7cc6bf1df135fe382058104
Subject: Re: [PATCH 3/3] ForceLock: regular lock commands.
X-BeenThere: obnam-dev@obnam.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: Obnam development discussions <obnam-dev-obnam.org>
List-Unsubscribe: <http://listmaster.pepperfish.net/cgi-bin/mailman/listinfo/obnam-dev-obnam.org>,
 <mailto:obnam-dev-request@obnam.org?subject=unsubscribe>
List-Archive: <http://listmaster.pepperfish.net/pipermail/obnam-dev-obnam.org>
List-Post: <mailto:obnam-dev@obnam.org>
List-Help: <mailto:obnam-dev-request@obnam.org?subject=help>
List-Subscribe: <http://listmaster.pepperfish.net/cgi-bin/mailman/listinfo/obnam-dev-obnam.org>,
 <mailto:obnam-dev-request@obnam.org?subject=subscribe>
Content-Type: multipart/mixed; boundary="===============2066069338030095174=="
Mime-version: 1.0
Sender: obnam-dev-bounces@obnam.org
Errors-To: obnam-dev-bounces@obnam.org


--===============2066069338030095174==
Content-Type: multipart/signed; micalg=pgp-sha512;
 protocol="application/pgp-signature"; boundary="Z9t8O/5YJLB6LEUl"
Content-Disposition: inline


--Z9t8O/5YJLB6LEUl
Content-Type: text/plain; charset=iso-8859-1
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

I'm afraid I'm rejecting this patch series as presented.

A context manager repository locking is probably a good idea. Putting
it into only one plugin is pointless.

I don't agree with randomly changing subcommand names. I don't agree
making the old name deprecated and giving warnings if it's used.
There's no reason to make everyone go fix their existing scripts, etc,
just because of aesthetics.

I don't think it's necessary to having a strict naming scheme for the
various locking subcommands.

Also, there is no updates to documentation or tests.

On Sat, Jun 18, 2016 at 02:48:44AM -0700, Robin H. Johnson wrote:
> Add commands to take & release regular locks, for external interaction.
> This permits usage such as snapshotting the repository safely.
>=20
> Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
> ---
>  obnamlib/plugins/force_lock_plugin.py | 35 +++++++++++++++++++++++++++++=
++++++
>  1 file changed, 35 insertions(+)
>=20
> diff --git a/obnamlib/plugins/force_lock_plugin.py b/obnamlib/plugins/for=
ce_lock_plugin.py
> index a14d680..ef6f131 100644
> --- a/obnamlib/plugins/force_lock_plugin.py
> +++ b/obnamlib/plugins/force_lock_plugin.py
> @@ -52,6 +52,10 @@ class ForceLockPlugin(obnamlib.ObnamPlugin):
>          # new:
>          self.app.add_subcommand('lock-force-release-all', self.force_rel=
ease_all_locks)
>          self.app.add_subcommand('lock-force-release-client', self.force_=
release_client_lock)
> +        self.app.add_subcommand('lock-take-all', self.take_all_locks)
> +        self.app.add_subcommand('lock-take-client', self.take_client_loc=
k)
> +        self.app.add_subcommand('lock-release-all', self.release_all_loc=
ks)
> +        self.app.add_subcommand('lock-release-client', self.release_clie=
nt_lock)
> =20
>      def force_lock(self, args):
>          '''Force a locked repository to be open.'''
> @@ -79,6 +83,37 @@ class ForceLockPlugin(obnamlib.ObnamPlugin):
>              repo.force_client_lock(client_name)
>          return 0
> =20
> +    def take_all_locks(self, args):
> +        '''Take global locks and client-specific lock'''
> +        logging.info('Taking global locks and client-specific lock')
> +        with RepoAccessWrapper(self) as repo:
> +            repo.lock_everything()
> +        return 0
> +
> +    def take_client_lock(self, args):
> +        '''Take a specific client lock.'''
> +
> +        client_name =3D self.app.settings['client-name']
> +        logging.info('Taking client lock for %s', client_name)
> +        with RepoAccessWrapper(self) as repo:
> +            repo.lock_client(client_name)
> +        return 0
> +
> +    def release_all_locks(self, args):
> +        '''Release global locks and client-specific lock'''
> +        logging.info('Releasing global locks and client-specific lock')
> +        with RepoAccessWrapper(self) as repo:
> +            repo.unlock_everything()
> +        return 0
> +
> +    def release_client_lock(self, args):
> +        '''Release a specific client lock.'''
> +
> +        client_name =3D self.app.settings['client-name']
> +        logging.info('Releasing client lock for %s', client_name)
> +        with RepoAccessWrapper(self) as repo:
> +            repo.unlock_client(client_name)
> +        return 0
> =20
>      def lock(self, args):
>          '''Add locks to the repository.
> --=20
> 2.9.0
>=20
>=20
> _______________________________________________
> obnam-dev mailing list
> obnam-dev@obnam.org
> http://listmaster.pepperfish.net/cgi-bin/mailman/listinfo/obnam-dev-obnam=
=2Eorg
>=20

--=20
Schr=F6dinger's backup hypothesis: the condition of any backup is
undefined until a restore is attempted. -- andrewsh

--Z9t8O/5YJLB6LEUl
Content-Type: application/pgp-signature; name="signature.asc"

-----BEGIN PGP SIGNATURE-----

iQIcBAEBCgAGBQJXlJPEAAoJEGwvphbseiAxVgIQALRAGXIWbFn9Z6O3cyOeXUVR
5GfIwbryLdWrVJ18oOdxB/8lGFIySD4qyWjJk5GLU4eTys0SwJgHJ2u8IRNLXDyY
hle8djcv8Zx9miPaHUfeyTc6SBKAqQCHpwAwZQLY1SaClX3HqK7Du1/kyKa0qHzQ
tKdrNqQOP4m6KSu7lVMVBFJonAtiBbTNgLOKmNLfq8/MR16UpvsHFEBQWBj39brW
POGwCKVbNgTv/OSkS94y8rpfCZSsmSYhSdWjQDAaCJUeZm6zEEfL1dX+EYNEu/iM
tGz80wTN8Wn5PVZ+/TxxrUhzydIlYJIMOuBRhw5EHItovCSvff0ZPy3wXa5vk//E
7W0B/FGFMtGij5Auqd2juJcBOnRxfcnmH8fAmjKtU5N7xT9ZMRuFPwxZMIQPOHnf
WHEITWYyIkhcQMRDXymtrlUELno5hBy/MC2g1B00j57mbp/yFaO3KafRNXmBiXu2
8TRxqkyfKOfkvYWjt5knoSoDlciZ22/Qi7JkYX8otvK96hJxpZuUeZ5kLKnUqSMa
KCtL6W5auKkoSKnJGnXT4wwvp0b9MA25vRlG2GNDT2J2mqTWxvmVVa9nkDkk6twj
1UkCoHvXyL4Hbeusk3saE0usHtKwp4RnSTZDTTRy0rZPE85058Kz4d/ad7iqa9hp
Xe5v6xwd982589EKkMhB
=T8Sq
-----END PGP SIGNATURE-----

--Z9t8O/5YJLB6LEUl--


--===============2066069338030095174==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
obnam-dev mailing list
obnam-dev@obnam.org
http://listmaster.pepperfish.net/cgi-bin/mailman/listinfo/obnam-dev-obnam.org

--===============2066069338030095174==--