Project

General

Profile

Actions

Bug #3151

closed

Clone Rules doesn't always include list of Directives

Added by Jonathan CLARKE over 11 years ago. Updated about 11 years ago.

Status:
Released
Priority:
1
Category:
Web - Config management
Target version:
Severity:
UX impact:
User visibility:
Effort required:
Priority:
Name check:
Fix check:
Regression:

Description

I encountered a weird situation that I don't quite understand... So here are the detailed steps that I followed:

  1. Create a new rule A
  2. Add a Directive D to this Rule, and save. Don't add any groups.
  3. Clone rule A to a new rule named B, change the description.
  4. Notice that the list of Directives includes D, as expected.
  5. 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") (!!)
  6. Go back to Rules screen, notice that the table lists Rule B as having no Directives (!!)
  7. 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.
  8. Look at the Event logs under Administration at :
    1. the event that is "Added Rule B", and notice that Directives: is now "None" (!!)
    2. the event that is "Added Rule B", and notice that Directives: is empty (that is, the empty string, not "None") (!!)
  9. Go back to Rules screen, notice that the table lists Rule C as having Directive D (!!)

Something FISHY is definitely going on here...

Actions #1

Updated by Jonathan CLARKE over 11 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.

Actions #2

Updated by François ARMAND over 11 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

Actions #3

Updated by François ARMAND over 11 years ago

  • Assignee changed from François ARMAND to Vincent MEMBRÉ

I can't reproduce that one.
Vincent, could you try ?

Actions #4

Updated by Vincent MEMBRÉ over 11 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

Actions #5

Updated by Vincent MEMBRÉ over 11 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!

Actions #6

Updated by Vincent MEMBRÉ over 11 years ago

  • Status changed from New to In progress
Actions #7

Updated by Vincent MEMBRÉ over 11 years ago

  • Status changed from In progress to Pending technical review
  • Assignee changed from Vincent MEMBRÉ to Nicolas CHARLES
Actions #8

Updated by Vincent MEMBRÉ over 11 years ago

It was not correct for every kind of fields in a Rule (target groups, description, ...)

The pull request fixes all of them

Actions #9

Updated by Vincent MEMBRÉ over 11 years ago

  • Status changed from Pending technical review to Pending release
  • % Done changed from 0 to 100
Actions #12

Updated by François ARMAND about 11 years ago

  • Status changed from Pending release to Released
Actions

Also available in: Atom PDF