From 921576ca0f4f4b0806d6d45bea34d3d4adb7dda4 Mon Sep 17 00:00:00 2001 From: Distix listener Date: Sat, 18 Jun 2016 12:00:06 +0200 Subject: imported mails --- .../Maildir/new/1466244004.M923866P15747Q1.hrun | 143 ++++++++++++++++ .../Maildir/new/1466244005.M574950P15747Q2.hrun | 179 +++++++++++++++++++++ 2 files changed, 322 insertions(+) create mode 100644 tickets/1113f1af92984443b3e44700449aadc1/Maildir/new/1466244004.M923866P15747Q1.hrun create mode 100644 tickets/1113f1af92984443b3e44700449aadc1/Maildir/new/1466244005.M574950P15747Q2.hrun (limited to 'tickets') diff --git a/tickets/1113f1af92984443b3e44700449aadc1/Maildir/new/1466244004.M923866P15747Q1.hrun b/tickets/1113f1af92984443b3e44700449aadc1/Maildir/new/1466244004.M923866P15747Q1.hrun new file mode 100644 index 0000000..10fc563 --- /dev/null +++ b/tickets/1113f1af92984443b3e44700449aadc1/Maildir/new/1466244004.M923866P15747Q1.hrun @@ -0,0 +1,143 @@ +Return-Path: +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 3CB482036F + for ; Sat, 18 Jun 2016 11:55:46 +0200 (CEST) +Received: from platypus.pepperfish.net (unknown [10.112.100.20]) + by bagpuss.pepperfish.net (Postfix) with ESMTP id D7834CA; + Sat, 18 Jun 2016 10:55:45 +0100 (BST) +Received: from ip6-localhost ([::1] helo=platypus.pepperfish.net) + by platypus.pepperfish.net with esmtp (Exim 4.80 #2 (Debian)) + id 1bECyf-0005oG-OA; Sat, 18 Jun 2016 10:55:45 +0100 +Received: from inmail0 ([10.112.100.10] helo=mx0.pepperfish.net) + by platypus.pepperfish.net with esmtp (Exim 4.80 #2 (Debian)) + id 1bECye-0005o9-FG + for ; Sat, 18 Jun 2016 10:55:44 +0100 +Received: from smtp.gentoo.org ([140.211.166.183]) + by mx0.pepperfish.net with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) + (Exim 4.80) (envelope-from ) id 1bECyc-0001J1-NV + for obnam-dev@obnam.org; Sat, 18 Jun 2016 10:55:44 +0100 +Received: from grubbs.orbis-terrarum.net (localhost [127.0.0.1]) + (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) + (No client certificate requested) + by smtp.gentoo.org (Postfix) with ESMTPS id BF3FA33FEDE + for ; Sat, 18 Jun 2016 09:55:29 +0000 (UTC) +Received: (qmail 19126 invoked by uid 129); 18 Jun 2016 09:55:29 -0000 +X-HELO: bohr-int.orbis-terrarum.net +Authentication-Results: orbis-terrarum.net; auth=pass (plain) + smtp.auth=robbat2-bohr@orbis-terrarum.net +Received: from Unknown (HELO bohr-int.orbis-terrarum.net) (2001:470:e889:1::8) + by orbis-terrarum.net (qpsmtpd/0.95) with ESMTPSA + (ECDHE-RSA-AES256-GCM-SHA384 encrypted); Sat, 18 Jun 2016 09:55:29 +0000 +Received: (nullmailer pid 28364 invoked by uid 10000); + Sat, 18 Jun 2016 09:48:44 -0000 +From: "Robin H. Johnson" +To: obnam-dev@obnam.org +Date: Sat, 18 Jun 2016 02:48:44 -0700 +Message-Id: <20160618094844.28217-3-robbat2@gentoo.org> +X-Mailer: git-send-email 2.9.0 +In-Reply-To: <20160618094844.28217-1-robbat2@gentoo.org> +References: <20160618094844.28217-1-robbat2@gentoo.org> +X-Virus-Checked: Checked by ClamAV on orbis-terrarum.net +X-Spam-Score: -8.3 +X-Spam-Score-int: -82 +X-Spam-Bar: -------- +X-Scanned-By: pepperfish.net, Sat, 18 Jun 2016 10:55:44 +0100 +X-Spam-Report: Content analysis details: (-8.3 points) + pts rule name description + ---- ---------------------- -------------------------------------------------- + -5.0 RCVD_IN_DNSWL_HI RBL: Sender listed at http://www.dnswl.org/, high + trust [140.211.166.183 listed in list.dnswl.org] + -0.0 SPF_PASS SPF: sender matches SPF record + -1.4 RP_MATCHES_RCVD Envelope sender domain matches handover relay domain + -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: 78c34a7242bc3b0cdb4980a2406d4978 +Subject: [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 +List-Unsubscribe: , + +List-Archive: +List-Post: +List-Help: +List-Subscribe: , + +Sender: obnam-dev-bounces@obnam.org +Errors-To: obnam-dev-bounces@obnam.org + +Add commands to take & release regular locks, for external interaction. +This permits usage such as snapshotting the repository safely. + +Signed-off-by: Robin H. Johnson +--- + obnamlib/plugins/force_lock_plugin.py | 35 +++++++++++++++++++++++++++++++++++ + 1 file changed, 35 insertions(+) + +diff --git a/obnamlib/plugins/force_lock_plugin.py b/obnamlib/plugins/force_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_release_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_lock) ++ self.app.add_subcommand('lock-release-all', self.release_all_locks) ++ self.app.add_subcommand('lock-release-client', self.release_client_lock) + + 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 + ++ 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 = 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 = 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 + + def lock(self, args): + '''Add locks to the repository. +-- +2.9.0 + + +_______________________________________________ +obnam-dev mailing list +obnam-dev@obnam.org +http://listmaster.pepperfish.net/cgi-bin/mailman/listinfo/obnam-dev-obnam.org diff --git a/tickets/1113f1af92984443b3e44700449aadc1/Maildir/new/1466244005.M574950P15747Q2.hrun b/tickets/1113f1af92984443b3e44700449aadc1/Maildir/new/1466244005.M574950P15747Q2.hrun new file mode 100644 index 0000000..f2f5bc4 --- /dev/null +++ b/tickets/1113f1af92984443b3e44700449aadc1/Maildir/new/1466244005.M574950P15747Q2.hrun @@ -0,0 +1,179 @@ +Return-Path: +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 35EA22036F + for ; Sat, 18 Jun 2016 11:57:09 +0200 (CEST) +Received: from platypus.pepperfish.net (unknown [10.112.100.20]) + by bagpuss.pepperfish.net (Postfix) with ESMTP id 94428CA; + Sat, 18 Jun 2016 10:57:08 +0100 (BST) +Received: from ip6-localhost ([::1] helo=platypus.pepperfish.net) + by platypus.pepperfish.net with esmtp (Exim 4.80 #2 (Debian)) + id 1bED00-0005rU-E1; Sat, 18 Jun 2016 10:57:08 +0100 +Received: from inmail0 ([10.112.100.10] helo=mx0.pepperfish.net) + by platypus.pepperfish.net with esmtp (Exim 4.80 #2 (Debian)) + id 1bECzy-0005rO-Se + for ; Sat, 18 Jun 2016 10:57:06 +0100 +Received: from smtp.gentoo.org ([140.211.166.183]) + by mx0.pepperfish.net with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) + (Exim 4.80) (envelope-from ) id 1bECzw-0001JH-UU + for obnam-dev@obnam.org; Sat, 18 Jun 2016 10:57:06 +0100 +Received: from grubbs.orbis-terrarum.net (localhost [127.0.0.1]) + (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) + (No client certificate requested) + by smtp.gentoo.org (Postfix) with ESMTPS id E202734076D + for ; Sat, 18 Jun 2016 09:56:51 +0000 (UTC) +Received: (qmail 22421 invoked by uid 129); 18 Jun 2016 09:56:52 -0000 +X-HELO: bohr-int.orbis-terrarum.net +Authentication-Results: orbis-terrarum.net; auth=pass (plain) + smtp.auth=robbat2-bohr@orbis-terrarum.net +Received: from Unknown (HELO bohr-int.orbis-terrarum.net) (2001:470:e889:1::8) + by orbis-terrarum.net (qpsmtpd/0.95) with ESMTPSA + (ECDHE-RSA-AES256-GCM-SHA384 encrypted); Sat, 18 Jun 2016 09:56:52 +0000 +Received: (nullmailer pid 28320 invoked by uid 10000); + Sat, 18 Jun 2016 09:48:44 -0000 +From: "Robin H. Johnson" +To: obnam-dev@obnam.org +Date: Sat, 18 Jun 2016 02:48:42 -0700 +Message-Id: <20160618094844.28217-1-robbat2@gentoo.org> +X-Mailer: git-send-email 2.9.0 +X-Virus-Checked: Checked by ClamAV on orbis-terrarum.net +X-Spam-Score: -8.3 +X-Spam-Score-int: -82 +X-Spam-Bar: -------- +X-Scanned-By: pepperfish.net, Sat, 18 Jun 2016 10:57:06 +0100 +X-Spam-Report: Content analysis details: (-8.3 points) + pts rule name description + ---- ---------------------- -------------------------------------------------- + -5.0 RCVD_IN_DNSWL_HI RBL: Sender listed at http://www.dnswl.org/, high + trust [140.211.166.183 listed in list.dnswl.org] + -0.0 SPF_PASS SPF: sender matches SPF record + -1.4 RP_MATCHES_RCVD Envelope sender domain matches handover relay domain + -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: 28cac42b4624e15eecd62f442284eda4 +Subject: [PATCH 1/3] ForceLock: convert boilerplate to ContextManager +X-BeenThere: obnam-dev@obnam.org +X-Mailman-Version: 2.1.5 +Precedence: list +List-Id: Obnam development discussions +List-Unsubscribe: , + +List-Archive: +List-Post: +List-Help: +List-Subscribe: , + +Sender: obnam-dev-bounces@obnam.org +Errors-To: obnam-dev-bounces@obnam.org + +Reduce code duplication by introducing a repo context manager per +PEP-343. This paves the way to introduce more lock handling functions +without adding duplicate code. + +Signed-off-by: Robin H. Johnson +--- + obnamlib/plugins/force_lock_plugin.py | 62 ++++++++++++++++------------------- + 1 file changed, 28 insertions(+), 34 deletions(-) + +diff --git a/obnamlib/plugins/force_lock_plugin.py b/obnamlib/plugins/force_lock_plugin.py +index 85995be..28bf641 100644 +--- a/obnamlib/plugins/force_lock_plugin.py ++++ b/obnamlib/plugins/force_lock_plugin.py +@@ -24,6 +24,24 @@ class RepositoryAccessError(obnamlib.ObnamError): + msg = 'Repository does not exist or cannot be accessed: {error}' + + ++class RepoAccessWrapper(object): ++ def __init__(self, plugin): ++ self.plugin = plugin ++ self.repo = None ++ ++ def __enter__(self): ++ self.plugin.app.settings.require('repository') ++ repourl = self.plugin.app.settings['repository'] ++ logging.info('Repository: %s', repourl) ++ try: ++ self.repo = self.plugin.app.get_repository_object() ++ except OSError, e: ++ raise RepositoryAccessError(error=str(e)) ++ return self.repo ++ ++ def __exit__(self, type, value, traceback): ++ self.repo.close() ++ + class ForceLockPlugin(obnamlib.ObnamPlugin): + + def enable(self): +@@ -33,25 +51,12 @@ class ForceLockPlugin(obnamlib.ObnamPlugin): + def force_lock(self, args): + '''Force a locked repository to be open.''' + +- self.app.settings.require('repository') +- +- repourl = self.app.settings['repository'] +- client_name = self.app.settings['client-name'] + logging.info('Forcing lock') +- logging.info('Repository: %s', repourl) +- +- try: +- repo = self.app.get_repository_object() +- except OSError, e: +- raise RepositoryAccessError(error=str(e)) +- +- repo.force_client_list_lock() +- for client_name in repo.get_client_names(): +- repo.force_client_lock(client_name) +- repo.force_chunk_indexes_lock() +- +- repo.close() +- ++ with RepoAccessWrapper(self) as repo: ++ repo.force_client_list_lock() ++ for client_name in repo.get_client_names(): ++ repo.force_client_lock(client_name) ++ repo.force_chunk_indexes_lock() + return 0 + + def lock(self, args): +@@ -61,24 +66,13 @@ class ForceLockPlugin(obnamlib.ObnamPlugin): + + ''' + +- self.app.settings.require('repository') +- +- repourl = self.app.settings['repository'] + client_name = self.app.settings['client-name'] + logging.info('Creating lock') +- logging.info('Repository: %s', repourl) + logging.info('Client: %s', client_name) +- +- try: +- repo = self.app.get_repository_object() +- except OSError, e: +- raise RepositoryAccessError(error=str(e)) +- +- repo.lock_client_list() +- if client_name: +- repo.lock_client(client_name) +- repo.lock_chunk_indexes() +- +- repo.close() ++ with RepoAccessWrapper(self) as repo: ++ repo.lock_client_list() ++ if client_name: ++ repo.lock_client(client_name) ++ repo.lock_chunk_indexes() + + return 0 +-- +2.9.0 + + +_______________________________________________ +obnam-dev mailing list +obnam-dev@obnam.org +http://listmaster.pepperfish.net/cgi-bin/mailman/listinfo/obnam-dev-obnam.org -- cgit v1.2.1