Project

General

Profile

Actions

Bug #19398

closed

Git error when deleting a node or archiving everything, and very slow git

Added by Nicolas CHARLES over 3 years ago. Updated almost 3 years ago.

Status:
Resolved
Priority:
N/A
Category:
System integration
Target version:
Severity:
UX impact:
User visibility:
Effort required:
Priority:
0
Name check:
To do
Fix check:
Error - Next version
Regression:

Description

Error is

[2021-06-04 14:04:50] ERROR com.normation.rudder.web.services.DisplayNode - There was an error while deleting Node '2f324fa3-f20d-41aa-80c7-81b5af04bfea' <- Accumulated: Error when deleting a node; cause was: Could not remove the node '2f324fa3-f20d-41aa-80c7-81b5af04bfea' from some groups; cause was: Could not update group '799cb91a-ebf4-4fbe-ab5e-c25daa0342db' to remove node '2f324fa3-f20d-41aa-80c7-81b5af04bfea'; cause was: Error when trying to archive automatically nodegroup change; cause was: SystemError: An error occured; cause was: org.eclipse.jgit.api.errors.JGitInternalException: Exception caught during execution of add command 
 -> com.normation.rudder.repository.xml.GitArchiverUtils.$anonfun$commitAddFile$3(GitArchiverUtils.scala:129)
[2021-06-04 14:11:52] ERROR com.normation.rudder.web.snippet.administration.Archives - Error when exporting groups, parameters, directive library and rules. <- An error occured. Cause was: JGitInternalException: Exception caught during execution of add command
[2021-06-04 14:11:52] ERROR com.normation.rudder.web.snippet.administration.Archives - org.eclipse.jgit.api.errors.JGitInternalException: Exception caught during execution of add command
org.eclipse.jgit.errors.LockFailedException: Cannot lock /var/rudder/configuration-repository/.git/index. Ensure that no other process has an open file handle on the lock file /var/rudder/configuration-repository/.git/index.lock, then you may delete the lock file and retry.

lock file exists

-rw-rw----. 1 root rudder 0 27 mai   12:37 /var/rudder/configuration-repository/.git/index.lock

and no process access it

restarting the webapp doesn't solve it

removing the lock file, and retying t archive everything lead to an unending spining wheel, but it does finish to archive, and deletion of node also succeed

it's probably that the git is really slow

# git --version
git version 1.8.3.1

The /var/rudder/configuration-repository/.git is 262MB large

# time git gc
Counting objects: 16091, done.
Delta compression using up to 10 threads.
Compressing objects: 100% (4004/4004), done.
Writing objects: 100% (16091/16091), done.
Total 16091 (delta 13485), reused 14094 (delta 11780)

real    0m4.368s
user    0m2.343s
sys    0m1.542s

git gc doesn't improve perf of git

git repack -d doesn't improve neither

Workaround: removing lock file /var/rudder/configuration-repository/.git/index.lock


Subtasks 1 (0 open1 closed)

Bug #19907: Compilation error after #19398 merge on upper branchesReleasedVincent MEMBRÉActions

Related issues 3 (1 open2 closed)

Related to Rudder - Bug #18892: Technique Upgrade failed with a JGit error after upgrading from 5.0.20 to 6.1.9ResolvedActions
Related to Rudder - Bug #18983: A writeLock must never be in a read lock for LDAP repoReleasedNicolas CHARLESActions
Related to Rudder - Architecture #19910: JGit error when editing in parralel directives, rules & archiving everythingNewActions
Actions

Also available in: Atom PDF