From 010c2119c787b61301dbc9b9ec4e654edd33086e Mon Sep 17 00:00:00 2001 From: Kali Kaneko Date: Tue, 1 Oct 2013 12:36:20 -0400 Subject: Add more verbose error handling To help diagnose this problem. I think we might prefer to leave this on hold until we merge the new gnupg module. --- .../bitmask/services/soledad/soledadbootstrapper.py | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/src/leap/bitmask/services/soledad/soledadbootstrapper.py b/src/leap/bitmask/services/soledad/soledadbootstrapper.py index d348661d..6731cc84 100644 --- a/src/leap/bitmask/services/soledad/soledadbootstrapper.py +++ b/src/leap/bitmask/services/soledad/soledadbootstrapper.py @@ -362,11 +362,27 @@ class SoledadBootstrapper(AbstractBootstrapper): try: self._keymanager.get_key( address, openpgp.OpenPGPKey, private=True, fetch_remote=False) + return except KeyNotFound: logger.debug("Key not found. Generating key for %s" % (address,)) + + # generate key + try: self._keymanager.gen_key(openpgp.OpenPGPKey) + except Exception as exc: + logger.error("error while generating key!") + logger.exception(exc) + raise + + # send key + try: self._keymanager.send_key(openpgp.OpenPGPKey) - logger.debug("Key generated successfully.") + except Exception as exc: + logger.error("error while sending key!") + logger.exception(exc) + raise + + logger.debug("Key generated successfully.") def run_soledad_setup_checks(self, provider_config, -- cgit v1.2.3 From 009fcbf7870b95910f50fe9e618fcaed51930ada Mon Sep 17 00:00:00 2001 From: Kali Kaneko Date: Tue, 1 Oct 2013 12:54:10 -0400 Subject: partial changes file --- changes/bug_3985-soledad-boostrap-problem | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 changes/bug_3985-soledad-boostrap-problem diff --git a/changes/bug_3985-soledad-boostrap-problem b/changes/bug_3985-soledad-boostrap-problem new file mode 100644 index 00000000..629481de --- /dev/null +++ b/changes/bug_3985-soledad-boostrap-problem @@ -0,0 +1,2 @@ + o Add more verbose error handling during key generation and syncing. + Helps diagnose: #3985; Addresses in part: #3965 -- cgit v1.2.3