Bug #11055
closedRudder can't start anymore because does not find configuration-repository techniques category in git
Description
If you happen to be in a state where you have a commit without /var/rudder/configuration-repository/techniques/category.xml, you can't restart Rudder ever.
This is because you can't force reload of technique library before the check for the existence of that file is done, and so you ends up with the following error even if now, you DID commited category.xml:
Caused by: java.lang.RuntimeException: Missing techniques root category in Git, expecting category descriptor for Git path: '/var/rudder/configuration-repository/techniques/category.xml' >-at scala.sys.package$.error(package.scala:27) >-at com.normation.cfclerk.services.impl.GitTechniqueReader.processCategories(GitTechniqueReader.scala:570) >-at com.normation.cfclerk.services.impl.GitTechniqueReader.processRevTreeId(GitTechniqueReader.scala:472) >-at com.normation.cfclerk.services.impl.GitTechniqueReader.liftedTree1$1(GitTechniqueReader.scala:163) >-at com.normation.cfclerk.services.impl.GitTechniqueReader.<init>(GitTechniqueReader.scala:162) >-at bootstrap.liftweb.RudderConfig$.techniqueReader$lzycompute(AppConfig.scala:1083) >-at bootstrap.liftweb.RudderConfig$.techniqueReader(AppConfig.scala:1046) >-at bootstrap.liftweb.RudderConfig$.techniqueRepositoryImpl$lzycompute(AppConfig.scala:1425) >-at bootstrap.liftweb.RudderConfig$.techniqueRepositoryImpl(AppConfig.scala:1423) >-at bootstrap.liftweb.RudderConfig$.<init>(AppConfig.scala:362) >-at bootstrap.liftweb.RudderConfig$.<clinit>(AppConfig.scala)
The only workarounds are:
- to remove the commit whithout category.xml (for ex. with a git rebase to the previous commit);
- or to remove the attribute "techniqueLibraryVersion" in techniqueCategoryId=Active Techniques,ou=Rudder,cn=rudder-configuration
- or to reinit your git repos (cd /var/rudder/configuration-repository; rm -rf .git; git init; git add .; git commit -m "first commit") - of course, you loose all your history.