From a148b3d9b7933924a570ae9759ef782677ca6493 Mon Sep 17 00:00:00 2001 From: Tobias Wolter Date: Wed, 30 Dec 2020 22:30:17 +0100 Subject: [PATCH] promotable is really a clone with promotable=true, look at the attributes --- lib/puppet/provider/cs_primitive/pcs.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/puppet/provider/cs_primitive/pcs.rb b/lib/puppet/provider/cs_primitive/pcs.rb index 4b805993..10e48aa7 100644 --- a/lib/puppet/provider/cs_primitive/pcs.rb +++ b/lib/puppet/provider/cs_primitive/pcs.rb @@ -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 @@ -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 @@ -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