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

Stop ignoring order of primitives in colocation constraints #153

Merged
merged 1 commit into from
Nov 7, 2015
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions lib/puppet/provider/cs_colocation/pcs.rb
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,10 @@ def self.instances
with_rsc = items['with-rsc']
end

# Sorting the array of primitives because order doesn't matter so someone
# switching the order around shouldn't generate an event.
colocation_instance = {
:name => items['id'],
:ensure => :present,
:primitives => [rsc, with_rsc].sort,
:primitives => [with_rsc, rsc],
:score => items['score'],
:provider => self.name,
:new => false
Expand Down Expand Up @@ -89,7 +87,7 @@ def score
# resource already exists so we just update the current value in the property
# hash and doing this marks it to be flushed.
def primitives=(should)
@property_hash[:primitives] = should.sort
@property_hash[:primitives]
end

def score=(should)
Expand Down