Il giorno martedì 21 marzo 2023 alle 19:34:55 UTC+1 Nikolaus Rath ha scritto:
Hi Alessandro, On Mon, 20 Mar 2023, at 17:15, Alessandro Boem wrote: I've changed the line to raise the NoSuchObject instead to fetch the passphrase but it return the same error. Running fsck it doesn't raise the exception at line 283 but the one at line 325 of common.py So the backend seem to gave the correct response 404 requesting a correctly missing s3ql_passphrase, but s3ql_metadata is unreadable. Do I have to try the others copy of s3ql_metadata? Above you said you are running `s3qladm download-metadata` and that this failed. Could you please include the full command and full output of everything you have done (not your summary of it)? File system was created last year with this command: mkfs.s3ql --plain --cachedir=/var/cache/s3ql/bdrive/ --authfile=/etc/s3ql.authinfo s3c://r1-it.storage.cloud.it/bdrive We've used it till 13/03/2023. We keep mounted it on the same machine where we created it. This is the sequence of commands I ran and their output after the crash: root@srvorg06:~# /usr/bin/fsck.s3ql s3c://r1-it.storage.cloud.it/bdrive --authfile=/etc/s3ql.authinfo --cachedir=/var/cache/s3ql/bdrive/ ERROR: File system revision needs upgrade (or backend data is corrupted) root@srvorg06:~# /usr/bin/s3qladm download-metadata s3c:// r1-it.storage.cloud.it/bdrive --authfile=/etc/s3ql.authinfo --cachedir=/var/cache/s3ql/bdrive/ ERROR: File system revision needs upgrade (or backend data is corrupted) On 18/03/2023 following this thread, I changed the command on line 265 of common.py from 'backend.fetch('s3ql_passphrase')' to 'raise NoSuchObject('s3ql_passphrase')' and I ran: root@srvorg06:~# /usr/bin/fsck.s3ql s3c://r1-it.storage.cloud.it/bdrive --authfile=/etc/s3ql.authinfo --cachedir=/var/cache/s3ql/bdrive/ ERROR: File system revision needs upgrade (or backend data is corrupted) This is quite intriguing. I don't understand where this exception is coming from if not from attempting to read the s3ql_passphrase object. Could you apply the following patch and re-run both 's3qladm download-metadata' and 'fsck.s3ql'? diff --git a/src/s3ql/logging.py b/src/s3ql/logging.py index 6238fb1..ad16784 100644 --- a/src/s3ql/logging.py +++ b/src/s3ql/logging.py @@ -141,7 +141,7 @@ def setup_excepthook(): def excepthook(type_, val, tb): root_logger = logging.getLogger() - if isinstance(val, QuietError): + if False: root_logger.error(val.msg) sys.exit(val.exitcode) else: Best, -Nikolaus -- GPG Fingerprint: ED31 791B 2C5C 1613 AF38 8B8A D113 FCAC 3C4E 599F »Time flies like an arrow, fruit flies like a Banana.« These are the messages of both commands: root@srvorg06:~# /usr/bin/fsck.s3ql s3c://r1-it.storage.cloud.it/bdrive --authfile=/etc/s3ql.authinfo --cachedir=/var/cache/s3ql/bdrive/ ERROR: Uncaught top-level exception: Traceback (most recent call last): File "/usr/lib/s3ql/s3ql/common.py", line 323, in get_backend_factory tmp_backend.fetch('s3ql_metadata') File "/usr/lib/s3ql/s3ql/backends/common.py", line 293, in fetch return self.perform_read(do_read, key) File "/usr/lib/s3ql/s3ql/backends/common.py", line 108, in wrapped return method(*a, **kw) File "/usr/lib/s3ql/s3ql/backends/common.py", line 256, in perform_read fh = self.open_read(key) File "/usr/lib/s3ql/s3ql/backends/comprenc.py", line 194, in open_read fh = self.backend.open_read(key) File "/usr/lib/s3ql/s3ql/backends/common.py", line 108, in wrapped return method(*a, **kw) File "/usr/lib/s3ql/s3ql/backends/s3c.py", line 325, in open_read meta = self._extractmeta(resp, key) File "/usr/lib/s3ql/s3ql/backends/s3c.py", line 713, in _extractmeta raise CorruptedObjectError('Invalid metadata format: %s' % format_) s3ql.backends.common.CorruptedObjectError: Invalid metadata format: raw During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/bin/fsck.s3ql", line 11, in <module> load_entry_point('s3ql==3.3.2', 'console_scripts', 'fsck.s3ql')() File "/usr/lib/s3ql/s3ql/fsck.py", line 1141, in main backend = get_backend(options) File "/usr/lib/s3ql/s3ql/common.py", line 248, in get_backend return get_backend_factory(options)() File "/usr/lib/s3ql/s3ql/common.py", line 325, in get_backend_factory raise QuietError('File system revision needs upgrade ' s3ql.logging.QuietError: File system revision needs upgrade (or backend data is corrupted) root@srvorg06:~# /usr/bin/s3qladm download-metadata s3c://r1-it.storage.cloud.it/bdrive --authfile=/etc/s3ql.authinfo --cachedir=/var/cache/s3ql/bdrive/ ERROR: Uncaught top-level exception: Traceback (most recent call last): File "/usr/lib/s3ql/s3ql/common.py", line 323, in get_backend_factory tmp_backend.fetch('s3ql_metadata') File "/usr/lib/s3ql/s3ql/backends/common.py", line 293, in fetch return self.perform_read(do_read, key) File "/usr/lib/s3ql/s3ql/backends/common.py", line 108, in wrapped return method(*a, **kw) File "/usr/lib/s3ql/s3ql/backends/common.py", line 256, in perform_read fh = self.open_read(key) File "/usr/lib/s3ql/s3ql/backends/comprenc.py", line 194, in open_read fh = self.backend.open_read(key) File "/usr/lib/s3ql/s3ql/backends/common.py", line 108, in wrapped return method(*a, **kw) File "/usr/lib/s3ql/s3ql/backends/s3c.py", line 325, in open_read meta = self._extractmeta(resp, key) File "/usr/lib/s3ql/s3ql/backends/s3c.py", line 713, in _extractmeta raise CorruptedObjectError('Invalid metadata format: %s' % format_) s3ql.backends.common.CorruptedObjectError: Invalid metadata format: raw During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/bin/s3qladm", line 11, in <module> load_entry_point('s3ql==3.3.2', 'console_scripts', 's3qladm')() File "/usr/lib/s3ql/s3ql/adm.py", line 104, in main with get_backend(options) as backend: File "/usr/lib/s3ql/s3ql/common.py", line 248, in get_backend return get_backend_factory(options)() File "/usr/lib/s3ql/s3ql/common.py", line 325, in get_backend_factory raise QuietError('File system revision needs upgrade ' s3ql.logging.QuietError: File system revision needs upgrade (or backend data is corrupted) -- You received this message because you are subscribed to the Google Groups "s3ql" group. To unsubscribe from this group and stop receiving emails from it, send an email to s3ql+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/s3ql/a362e4aa-e4ef-4100-a467-5567fb8555e7n%40googlegroups.com.