Hi Eric,
When replying to emails on this list, please do not put your reply
above the quoted text, and do not quote the entire message you're
answering to. This makes it unnecessarily hard for other readers to
understand the context of your email. Instead, please cut quoted parts
that are not relevant to your reply, and insert your responses right
after the points you're replying to (as I have done below). Thanks!
Eric Eijkelenboom <[email protected]> writes:
> Hi Nikolaus
>
> Thanks a lot for your advice. I will definitely refrain from messing
> with the metadata in the future :)
>
> I renamed s3ql_metadata to something not starting with 's3ql', but
> running:
>
>> fsck.s3ql s3://mybucket
>
> results in this exception:
>
> Starting fsck of s3://mybucket
> Uncaught top-level exception:
> Traceback (most recent call last):
> File "/usr/lib/s3ql/s3ql/backends/s3c.py", line 253, in lookup
> resp = self._do_request('HEAD', '/%s%s' % (self.prefix, key))
> File "/usr/lib/s3ql/s3ql/backends/s3c.py", line 477, in _do_request
> self._parse_error_response(resp)
> File "/usr/lib/s3ql/s3ql/backends/s3c.py", line 494, in _
> parse_error_response
> raise HTTPError(resp.status, resp.reason, resp.headers)
> s3ql.backends.s3c.HTTPError: 404 Not Found
Aeh, yeah, I forgot about that. fsck.s3ql doesn't cope well with
completely absent metadata either...
Can you temporarily apply the attached patch? Hopefully that will fix
your problem. Just make sure to use it only once, and then revert to the
vanilla 2.12 version.
Best,
Nikolaus
PS: Please remember the first paragraph when replying :-).
--
GPG encrypted emails preferred. Key id: 0xD113FCAC3C4E599F
Fingerprint: ED31 791B 2C5C 1613 AF38 8B8A D113 FCAC 3C4E 599F
»Time flies like an arrow, fruit flies like a Banana.«
--
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 [email protected].
For more options, visit https://groups.google.com/d/optout.
diff --git a/src/s3ql/fsck.py b/src/s3ql/fsck.py
--- a/src/s3ql/fsck.py
+++ b/src/s3ql/fsck.py
@@ -1159,7 +1159,7 @@
param = pickle.load(fh)
if param['seq_no'] < seq_no:
log.info('Ignoring locally cached metadata (outdated).')
- param = backend.lookup('s3ql_metadata')
+ param = backend.lookup('s3ql_metadata_bak_0')
else:
log.info('Using cached metadata.')
db = Connection(cachepath + '.db')
@@ -1169,12 +1169,12 @@
log.warning('File system has not been unmounted cleanly.')
param['needs_fsck'] = True
- elif backend.lookup('s3ql_metadata')['seq_no'] != param['seq_no']:
+ elif backend.lookup('s3ql_metadata_bak_0')['seq_no'] != param['seq_no']:
log.warning('Remote metadata is outdated.')
param['needs_fsck'] = True
else:
- param = backend.lookup('s3ql_metadata')
+ param = backend.lookup('s3ql_metadata_bak_0')
assert not os.path.exists(cachepath + '-cache')
# .db might exist if mount.s3ql is killed at exactly the right instant
# and should just be ignored.
@@ -1287,6 +1287,7 @@
is_compressed=True)
log.info('Wrote %s of compressed metadata.', pretty_print_size(obj_fh.get_obj_size()))
log.info('Cycling metadata backups...')
+ backend.copy('s3ql_metadata_new', 's3ql_metadata')
cycle_metadata(backend)
with open(cachepath + '.params', 'wb') as fh:
pickle.dump(param, fh, PICKLE_PROTOCOL)