Bug #3038
Updated by Nicolas PERRON almost 12 years ago
After an upgrade of Rudder from *2.4.0~beta4* 2.4.0~beta4 to *2.4.0~rc1* 2.4.0~rc1 an error is thrown with some conditions: * There are several Directives from *Enforce Enforce a File Content* Content * Some of these Directives are at version *2.0*, 2.0, the others are at version *3.0* 3.0 (the last version from *2.4.0~beta4*) 2.4.0~beta4) * Before to update manually the Techniques from packages of Rudder *2.4.0~beta4* 2.4.0~beta4 to *2.4.0~rc1*, 2.4.0~rc1, fix the *metadata.xml* metadata.xml of *Enforce Enforce A File Content* Content by replacing tag *<POLICY>* <POLICY> by *<TECHNIQUE>* <TECHNIQUE> (#3027) After a complete upgrade of Rudder and Techniques (commit new Techniques and restart Rudder or reload techniques on the WebUI): * Using Rules rules with Directives based on *Enforce Enforce A File Content* Technique Content Directives will work * Trying to edit a Directive based on *Enforce Enforce A File Content* Content Technique will lead to: ** A message in the WebUI _"The "The server cannot be contacted at this time"_ time" ** A message in the webapp logs: <pre> "[...] Java.NoSuchElementException: [...] Key not found: 3.1 [...]" </pre> The workaround of this problem was to: * Remove *Enforce Enforce A File Content* v*3.1* Content v3.1 from the Techniques: <pre> cd /var/rudder/configuration-repository/techniques/fileDistribution/checkGenericFileContent git rm -r 3.1/ git commit -m "Remove 'Enforce A File Content' v3.1 Technique temporarily" </pre> * Reload the Technique Library on the WebUI (Configuration Policy > Techniques > Reload or Administration > Policy Server > Reload Techniques > Reload) * The edition of the Directives based on *Enforce Enforce A File Content* Content will be available. Migrate all the Directives of *Enforce Enforce a File Content* Content from *2.0* 2.0 to *3.0* 3.0 * Re enable the *Enforce Enforce A File Content* Content Technique v*3.1* v3.1 by reverting the previous commit <pre> git revert xxxxxx # With xxxxxx = commit id of "Remove 'Enforce A File Content' v3.1 Technique temporarily" </pre> * Reload the Technique Library on the WebUI (Configuration Policy > Techniques > Reload or Administration > Policy Server > Reload Techniques > Reload) * We will be able to edit Directives based on Enforce a File Content and to use version 3.1