Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bugfix: Account for rules sorted after unmanaged rules #321

Merged
merged 1 commit into from
Feb 20, 2014

Conversation

hunner
Copy link
Contributor

@hunner hunner commented Feb 20, 2014

The offset calculation assumed unmanaged rules are numbered 9000+ and would be sorted to the end and didn't need to be accounted for. This caused failures when people used9-numbered rules. This should fix that.

Additionally, for rules that are 9-numbered, they should be ordered after unmanaged rules, so this fixes that too.

So when encountering unmanaged rules, the order will be something like this:

  • Managed rules that begin with 0 through 8
  • Unmanaged rules (which are assigned 9-numbers)
  • Managed rules that begin with 9 (but not numbered lower than the unmanaged rules)

Mixing unmanaged rules with managed rules is still not officially supported, but at least we can try and behave with them.

The offset calculation assumed unmanaged rules are numbered 9000+ and
would be sorted to the end and didn't need to be accounted for. This
caused failures when people used9-numbered rules. This should fix that.

Additionally, for rules that are 9-numbered, they should be ordered
*after* unmanaged rules, so this fixes that too.

So when encountering unmanaged rules, the order will be something like
this:

- Managed rules that begin with 0 through 8
- Unmanaged rules (which are assigned 9-numbers)
- Managed rules that begin with 9 (but not numbered lower than the
  unmanaged rules)

Mixing unmanaged rules with managed rules is still not officially
supported, but at least we can try and behave with them.
apenney pushed a commit that referenced this pull request Feb 20, 2014
Bugfix: Account for rules sorted after unmanaged rules
@apenney apenney merged commit fe25900 into puppetlabs:1.0.x Feb 20, 2014
@hunner hunner deleted the fix_over_9000 branch February 20, 2014 20:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants