Bug #6840
closedEditing a rule category remove it from Git - rule categories disapear! (Ranärok ensues)
Description
When we edit a rule category with the little pen that appears on mouse over the category name, then the category XML file on /var/rudder/configuration-repository/ruleCategories is removed.
The corresponding commit message is:
Move archive of node group category with ID 'aaab98ef-8d7d-4948-9213-13ed93df8ebf'
Of course, it's the first silent move that leads to Ragnärok and a chess mate in one move: from that point, if the user use the archive -> restore [rules] -> from last commit; then the category disapear, and any rule that uses it will have a wonderfull "ERROR" as a category name.
This is bad, developpers !
It was reproduce in 2.10 and 3.0.
Procedure to restaure rule categories deleted during a restore:
$ cd /var/rudder/configuration-repository # find candidate rule categories (deleted with a "move" message) $ git log --diff-filter='D*' --grep="Move archive" --format=format:%H ruleCategories > /tmp/possible_categories.txt # find rule really moved and not deleted due to the bug $ git log --diff-filter='A' --grep="Move archive" --format=format:%H ruleCategories > /tmp/real_move.txt # restore rule categories on the fs $ for i in $(grep -v -f /tmp/real_move.txt /tmp/possible_categories.txt); do git show --no-color $i | patch -p1 -R; done # add them back in git $ git add ruleCategories/ $ git commit -m "restore categories from bug"
And then, go to utilities -> archive, and "restore rules" from "latest git commit" in the dropdown list.
Updated by Vincent MEMBRÉ over 9 years ago
- Target version changed from 2.10.15 to 2.10.16
Updated by François ARMAND over 9 years ago
- Status changed from New to In progress
- Assignee set to François ARMAND
Updated by François ARMAND over 9 years ago
- Status changed from In progress to Pending technical review
- Assignee changed from François ARMAND to Vincent MEMBRÉ
- Pull Request set to https://github.com/Normation/rudder/pull/894
Updated by François ARMAND over 9 years ago
The correction also add the same guard against move in the same category that were missing in other move.
Updated by François ARMAND over 9 years ago
- Subject changed from Editing a rule category remove is from Git (Ranärok ensues) to Editing a rule category remove it from Git - rule categories disapear! (Ranärok ensues)
Updated by François ARMAND over 9 years ago
- Status changed from Pending technical review to Pending release
- % Done changed from 0 to 100
Applied in changeset rudder|bf8ffa3d62ece72c98b13d557e6760d6f705ae2a.
Updated by Vincent MEMBRÉ over 9 years ago
Applied in changeset rudder|fd290d9df6ad1eb93b683662e46ed7a820525b80.
Updated by François ARMAND over 9 years ago
- Status changed from Pending release to Released