[OpenStack-Infra] [infra][nova] Corrupt nova-specs repo
Ian Wienand
iwienand at redhat.com
Fri Jun 30 06:11:42 UTC 2017
Hi,
Unfortunately it seems the nova-specs repo has undergone some
corruption, currently manifesting itself in an inability to be pushed
to github for replication.
Upon examination, it seems there's a problem with a symlink and
probably jgit messing things up making duplicate files. I have filed
a gerrit bug at [1] (although it's probably jgit, but it's just a
start).
Anyway, that leaves us the problem of cleaning up the repo into a
pushable state. Here's my suggestion after some investigation:
The following are corrupt
---
$ git fsck
Checking object directories: 100% (256/256), done.
error in tree a494151b3c661dd9b6edc7b31764a2e2995bd60c: contains duplicate file entries
error in tree 26057d370ac90bc01c1cfa56be8bd381618e2b3e: contains duplicate file entries
error in tree 57423f5165f0f1f939e2ce141659234cbb5dbd4e: contains duplicate file entries
error in tree 05fd99ef56cd24c403424ac8d8183fea33399970: contains duplicate file entries
---
After some detective work [2], I related all these bad objects to the
refs that hold them. It look as follows
---
fsck-bad: a494151b3c661dd9b6edc7b31764a2e2995bd60c
-> 5fa34732b45f4afff3950253c74d7df11b0a4a36 refs/changes/26/463526/9
fsck-bad: 26057d370ac90bc01c1cfa56be8bd381618e2b3e
-> 47128a23c2aad12761aa0df5742206806c1dfbb8 refs/changes/26/463526/8
-> 7cf8302eb30b722a00b4d7e08b49e9b1cd5aacf4 refs/changes/26/463526/7
-> 818dc055b971cd2b78260fd17d0b90652fb276fb refs/changes/26/463526/6
fsck-bad: 57423f5165f0f1f939e2ce141659234cbb5dbd4e
-> 25bd72248682b584fb88cc01061e60a5a620463f refs/changes/26/463526/3
-> c7e385eaa4f45b92e9e51dd2c49e799ab182ac2c refs/changes/26/463526/4
-> 4b8870bbeda2320564d1a66580ba6e44fbd9a4a2 refs/changes/26/463526/5
fsck-bad: 05fd99ef56cd24c403424ac8d8183fea33399970
-> e8161966418dc820a4499460b664d87864c4ce24 refs/changes/26/463526/2
---
So you may notice this is refs/changes/26/463526/[2-9]
Just deleting these refs and expiring the objects might be the easiest
way to go here, and seems to get things purged and fix up fsck
---
$ for i in `seq 2 9`; do
> git update-ref -d refs/changes/26/463526/$i
> done
$ git reflog expire --expire=now --all && git gc --prune=now --aggressive
Counting objects: 44756, done.
Delta compression using up to 16 threads.
Compressing objects: 100% (43850/43850), done.
Writing objects: 100% (44756/44756), done.
Total 44756 (delta 31885), reused 12846 (delta 0)
$ git fsck
Checking object directories: 100% (256/256), done.
Checking objects: 100% (44756/44756), done.
---
I'm thinking if we then force push that to github, we're pretty much
OK ... a few intermediate reviews will be gone but I don't think
they're important in this context.
I had a quick play with "git ls-tree", edit the file, "git mktree",
"git replace" and then trying to use filter-branch, but couldn't get
it to work. Suggestions welcome; you can play with the repo from [1]
I would say.
Thanks,
-i
[1] https://bugs.chromium.org/p/gerrit/issues/detail?id=6622
[2] "git log --all --format=raw --raw -t --no-abbrev" and search for
the change sha, then find it in "git show-refs"
More information about the OpenStack-Infra
mailing list