Project

General

Profile

Bug #17977

Updated by François ARMAND almost 4 years ago

All this began after 6.1 upgrade. Previously, nothing wrong happened. 

 When creating a blank and very simple custom technique, Rudder automatically adds a resource : 
 " shared-files/sit-rudder ${resources_dir}/shared-files/sit-rudder " 
 though I did not use any resource or add anything related to it. 

 This situation is severe as following this issue, the rules often fails to be generated until I disable everything related to this technique (the technique, the directives using it...) 

 +Context :+ 

 Previously, I added the directory /var/rudder/configuration-repository/shared-files/sit-rudder which I'm using as a source for several other directives (but not this technique). 
 This sit-rudder directory is itself a git clone from another external git repository. 
 Please note that /var/rudder/configuration-repository is git-controlled. 

 In /var/rudder/configuration-repository, I can see this : 

 <pre><code class="shell"> 
 root@sit-conf-prd01:/var/rudder/configuration-repository# git status  
 On branch master 
 Changes not staged for commit: 
   (use "git add <file>..." to update what will be committed) 
   (use "git checkout -- <file>..." to discard changes in working directory) 

	 modified:     shared-files/sit-rudder (new commits) 

 no changes added to commit (use "git add" and/or "git commit -a") 
 </code></pre> 

 The /var/rudder/configuration-repository/techniques/ncf_techniques/abcde01/1.0/metadata.xml file (created on this test) contains : 
 <pre><code class="xml"> 
 [...] 
 <FILE name="RUDDER_CONFIGURATION_REPOSITORY/techniques/ncf_techniques/abcde01/1.0/resources/shared-files/sit-rudder"> 
   <INCLUDED>false</INCLUDED> 
   <OUTPATH>abcde01/1.0/resources/shared-files/sit-rudder</OUTPATH> 
 </FILE> 
 [...] 
 </code></pre> 

 Would it help if I provide git-related information about /var/rudder/configuration-repository? 

 h3. Workaround 

 As the problem is located in @jgit@ library, we can't correct it immediatly.  
 A workaround is to ignore the sub-gig repository. It will still be a git repository, and files in it will still be shareable, but it will stop confusing everything in rudder. 

 - on root server, go to @/var/rudder/configuration-repository@ 
 - remove from git knowledge sub-git: @git rm -r --cached shared-files/sit-rudder@ 
 - add to @/var/rudder/configuration-repository/.gitignore@ (create it if necessary) line: @shared-files/sit-rudder@ 
 - add gitignore change (rm is already added): @git add .gitignore@ 
 - commit: @git commit -m "Forgeting about sub-repos, it's causing too much troubles"@ 
 - done.  

Back