Bug #3151
closedClone Rules doesn't always include list of Directives
Description
I encountered a weird situation that I don't quite understand... So here are the detailed steps that I followed:
- Create a new rule A
- Add a Directive D to this Rule, and save. Don't add any groups.
- Clone rule A to a new rule named B, change the description.
- Notice that the list of Directives includes D, as expected.
- Look at the Event logs under Administration at the event that is "Added Rule B", and notice that Directives: is empty (that is, the empty string, not "None") (!!)
- Go back to Rules screen, notice that the table lists Rule B as having no Directives (!!)
- View details of Rule B, and clone it to Rule "Copy of <B>" (this is the default name for a cloned Rule). Don't change any of the parameters.
- Look at the Event logs under Administration at :
- the event that is "Added Rule B", and notice that Directives: is now "None" (!!)
- the event that is "Added Rule B", and notice that Directives: is empty (that is, the empty string, not "None") (!!)
- Go back to Rules screen, notice that the table lists Rule C as having Directive D (!!)
Something FISHY is definitely going on here...
Updated by Jonathan CLARKE almost 12 years ago
Try as I may, I haven't been able to reproduce this exactly.
For what it's worth:- Only the FIRST ever clone I did caused the Rule not to have any Directives in.
- BUT, even after restarting the application, the first Clone after a restart does not cause this error
- There are no errors or warnings in the logs. But there may be DEBUG messages, I don't have them enabled.
There is certainly one bug here though, that I can reproduce every time: when a Rule is cloned, it's Directives do not appear in the event log for the "Rule added" event. They are however correctly saved, and can be seen in the Rule details.
Updated by François ARMAND almost 12 years ago
I'm going to open an other bug for the simple part: EventLog for cloned rules does not contain the list of directives.
http://www.rudder-project.org/redmine/issues/3161
Updated by François ARMAND almost 12 years ago
- Assignee changed from François ARMAND to Vincent MEMBRÉ
I can't reproduce that one.
Vincent, could you try ?
Updated by Vincent MEMBRÉ almost 12 years ago
I tried once and I was not able to reproduce it, I'm going to try on another new rudder 2.5 server
Updated by Vincent MEMBRÉ almost 12 years ago
I finally reproduced, It happens every time we try to clone a Rule just after saving it.
The last modification are not send to the new Rule.
In fact the Rule cloned is the Rule before modification.
I'm correcting this immediatly!
Updated by Vincent MEMBRÉ almost 12 years ago
- Status changed from New to In progress
Updated by Vincent MEMBRÉ almost 12 years ago
- Status changed from In progress to Pending technical review
- Assignee changed from Vincent MEMBRÉ to Nicolas CHARLES
Pull request : https://github.com/Normation/rudder/pull/83
Updated by Vincent MEMBRÉ almost 12 years ago
It was not correct for every kind of fields in a Rule (target groups, description, ...)
The pull request fixes all of them
Updated by Vincent MEMBRÉ almost 12 years ago
- Status changed from Pending technical review to Pending release
- % Done changed from 0 to 100
Applied in changeset 4df295cdcc131856438cb0b4b9d605bf7f794eca.
Updated by Nicolas CHARLES almost 12 years ago
Applied in changeset aa4aad4323be818570139310337de6b444e44a1c.
Updated by Vincent MEMBRÉ almost 12 years ago
Applied in changeset 28e8b98b95acccfbd05e47bda419d0eb32e1e925.
Updated by François ARMAND over 11 years ago
- Status changed from Pending release to Released