我收到了GitLab警报邮件,指出“一个项目未能通过其最后一个存储库检查”。
我确实检查了Gitlab管理面板中的错误,为“最后一个存储库检查(刚才)失败。请参阅“ procheck.log”文件以获取错误消息。”正如GitLab的Admin面板中建议的那样,我已经检查了repocheck.log文件,错误如下。
“无法FSCK存储库:错误:无法读取0F188244898707E6090498BC03AAFD8AC25E7776E
无法解析提交0F188244898707E6090498BC03AAFD8AC25E7776E从对象数据库中用于commit-graph
错误:无法读取4AB7111F3F8F1083CEE8E33EC033C18EDFEFB0E9“
上周这与另一个回购相同。即使有类似的错误消息,它尚未解决,并且尚未解决。好的。
无法为此找到适当的解决方案。任何人都可以为此提供帮助。
I have received a gitlab alert mail stating that "One project failed its last repository check".
I did check the error in Gitlab admin panel as "Last repository check (just now) failed. See the 'repocheck.log' file for error messages." As suggested in Admin Panel in Gitlab, i have checked the repocheck.log file and the error is as below.
"Could not fsck repository: error: Could not read 0f188244898707e6090498bc03aafd8ac25e776e
failed to parse commit 0f188244898707e6090498bc03aafd8ac25e776e from object database for commit-graph
error: Could not read 4ab7111f3f8f1083cee8e33ec033c18edfefb0e9"
This happened the same with another repo last week. Even that had similar error message and it is not resolved yet. Tried to clone the same repo in another gitlab instance to recreate the issue but the repo check there seems to be fine.
Unable to find proper solution for that. Could any one please help on this.
发布评论
评论(3)
我现在遇到并修复了两次,我发现了修复程序在论坛上:
@hashed/d4/d4/d4/c530f048efdf2711df2711df6f6fa15198ff480035833303624f8b97c174c174fadc2cab5e582.git
fsck
命令使用回购的相对路径(这应该应该输出与您的/var/log/gitlab/gitlab-rails/repocheck.log
file)的文本:gc
命令使用回购相对路径。这可能需要一分钟才能完成。fsck
命令,以检查命令I've now come across and fixed this twice, I found the fix on the forum:
@hashed/d4/73/c530f048efdf2711df6fa15198ff48003583303624f8b97c174fadc2cab5e582.git
fsck
command using the repo's relative path (This should output the same text as your/var/log/gitlab/gitlab-rails/repocheck.log
file):gc
command using the repo's relative path. This may take a minute to complete.fsck
command again from step 3 to check that the command was successful这似乎是一个活跃的问题:问题已有两年历史了,但是我链接到的注释已有今天的更新,包括有关修复程序和解决方法的信息。
无论如何:
commit-graph
是一个相对较新的功能,并且由于它是包装数据的一种索引形式,因此可以重新创建它。因此,损坏的存储库可以轻松固定而不会丢失数据。It seems to be an active issue: https://gitlab.com/gitlab-org/gitaly/-/issues/2359#note_966195929 The issue is a couple of years old, but the note I link to, has updates from today, including info on fixes and workarounds.
In any case: The
commit-graph
is a relatively new feature and since it is a form of index into packed data, it can be recreated. So the corrupted repo can be easily fixed without loss of data.它可以像这样重现:
现在,gitlab将向您发送“ gitlab projection in gitlab projection a ins the comport fip他们的最后一个存储库检查“运行存储库时,请在计划的间隔上检查。
我认为这是一个错误,管理员和维护者对此有警告,因为实际上没有什么错。请参阅 https://stackoverflow =“ gitlab问题”> Anders Bandholm 有关更多详细信息。
It can be reproduced like this:
Now GitLab will send you "A commit graph at GitLab projects failed their last repository check" when it runs the repository check on a scheduled interval.
I'd consider it a bug that admins and maintainers get a warning about this, since nothing is wrong really. See the GitLab issues linked by Anders Bandholm for more details.