Do not create and destroy Sahara templates if exists
Validation error in Sahara is occurred during scaling cluster (add one more controller), when some Sahara template in use. So, do not destroy Sahara templates. Also, do not recreate template if exists. Change-Id: I629046b70d93d3c040bc104270254f11a07c91a3 Closes-bug: #1462422
This commit is contained in:
parent
506e2840da
commit
e8e0925740
@ -179,8 +179,7 @@ Puppet::Type.type(:sahara_cluster_template).provide(:ruby) do
|
||||
node_group['count'] = node_group['count'].to_i if node_group['count']
|
||||
end
|
||||
if present?
|
||||
destroy if @property_hash[:id]
|
||||
connection.create_cluster_template options
|
||||
connection.create_cluster_template options unless @property_hash[:id]
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -209,8 +209,7 @@ Puppet::Type.type(:sahara_node_group_template).provide(:ruby) do
|
||||
debug 'Call: flush'
|
||||
options = @property_hash.reject { |k, v| [:id, :ensure].include? k }
|
||||
if present?
|
||||
destroy if @property_hash[:id]
|
||||
connection.create_node_group_template options
|
||||
connection.create_node_group_template options unless @property_hash[:id]
|
||||
end
|
||||
end
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user