Project

General

Profile

Bug #19398

Updated by Nicolas CHARLES over 3 years ago

Error is 

 <pre> 
 [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) 
 </pre> 

 <pre> 
 [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. 
 </pre> 

 lock file exists  
 <pre> 
 -rw-rw----. 1 root rudder 0 27 mai     12:37 /var/rudder/configuration-repository/.git/index.lock 
 </pre> 
 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 

 <pre> 
 # git --version 
 git version 1.8.3.1 
 </pre> 

 The /var/rudder/configuration-repository/.git is 262MB large 
 <pre> 
 # 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 
 </pre> 

 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

Back