Skip to content

Commit

Permalink
promotable is really a clone with promotable=true, look at the attrib…
Browse files Browse the repository at this point in the history
…utes
  • Loading branch information
towo committed Mar 8, 2021
1 parent bc20c50 commit a148b3d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/puppet/provider/cs_primitive/pcs.rb
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ def promotable=(should)
when :false
@property_hash[:promotable] = should
if Gem::Version.new(self.class.version) >= Gem::Version.new('0.10.0')
self.class.run_command_in_cib([command(:pcs), 'resource', 'delete', "#{@resource[:name]}"], @resource[:cib])
self.class.run_command_in_cib([command(:pcs), 'resource', 'delete', "#{@resource[:name]}"]-clone, @resource[:cib])
else
self.class.run_command_in_cib([command(:pcs), 'resource', 'delete', "ms_#{@resource[:name]}"], @resource[:cib])
end
Expand Down Expand Up @@ -265,7 +265,7 @@ def _flush_resource(operations, parameters, utilization, metadatas)
else
if @property_hash[:promotable] == :false && @property_hash[:existing_promotable] == :true
if Gem::Version.new(self.class.version) >= Gem::Version.new('0.10.0')
self.class.run_command_in_cib([command(:pcs), pcs_subcommand, 'delete', '--force', "#{@property_hash[:name]}"], @resource[:cib])
self.class.run_command_in_cib([command(:pcs), pcs_subcommand, 'delete', '--force', "#{@property_hash[:name]}-clone"], @resource[:cib])
else
self.class.run_command_in_cib([command(:pcs), pcs_subcommand, 'delete', '--force', "ms_#{@property_hash[:name]}"], @resource[:cib])
end
Expand All @@ -286,7 +286,7 @@ def _flush_resource(operations, parameters, utilization, metadatas)
self.class.run_command_in_cib(cmd, @resource[:cib])
if @property_hash[:promotable] == :true
if Gem::Version.new(self.class.version) >= Gem::Version.new('0.10.0')
cmd = [command(:pcs), pcs_subcommand, 'update', "#{@property_hash[:name]}"]
cmd = [command(:pcs), pcs_subcommand, 'update', "#{@property_hash[:name]}-clone"]
else
cmd = [command(:pcs), pcs_subcommand, 'update', "ms_#{@property_hash[:name]}"]
end
Expand Down

0 comments on commit a148b3d

Please sign in to comment.