Commit 851a37bd authored by Alexandre MERLIN's avatar Alexandre MERLIN
Browse files

allow to config swap and tmp label name

parent 2c85a9ca
......@@ -832,6 +832,8 @@ module Configuration
attr_reader :block_device
attr_reader :disk_path
attr_reader :swap_disabled
attr_reader :tmp_part
attr_reader :swap_part
attr_reader :deploy_part
attr_reader :workflow_steps #Array of MacroStep
attr_reader :timeout_reboot_classical
......@@ -976,7 +978,9 @@ module Configuration
cp.parse('partitioning',true) do
@block_device = cp.value('block_device',String,nil,Pathname)
@deploy_part = cp.value('deploy_label',String,nil,Pathname)
@tmp_part = cp.value('tmp_label',String,'TMP')
@swap_part = cp.value('swap_label',String,'SWAP')
@deploy_part = cp.value('deploy_label',String,'DEPLOY')
@swap_disabled = cp.value('disable_swap',[TrueClass,FalseClass],false)
@partitioning_script = cp.value('script',String,nil,
......
......@@ -323,8 +323,8 @@ module Macrostep
# Do not reformat deploy partition
if !cexec.deploy_part.nil? and cexec.deploy_part != ""
part = cexec.deploy_part
delete_task(:format_swap_part, "deployment on SWAP partition") if part == "SWAP"
delete_task(:format_tmp_part, "deployment on TMP partition") if part == "TMP"
delete_task(:format_swap_part, "deployment on SWAP partition") if part == context[:cluster].swap_part
delete_task(:format_tmp_part, "deployment on TMP partition") if part == context[:cluster].tmp_part
end
end
end
......
......@@ -867,7 +867,7 @@ class Microstep < Automata::QueueTask
if context[:execution].deploy_part && !context[:execution].deploy_part.empty?
"KDPL_#{context[:execution].deploy_part}_#{get_block_device_str}"
else
"KDPL_DEPLOY_#{get_block_device_str}"
"KDPL_#{context[:cluster].deploy_part}_#{get_block_device_str}"
end
end
......@@ -887,7 +887,7 @@ class Microstep < Automata::QueueTask
# Output
# * return the label of the swap partition
def get_swap_label
"KDPL_SWAP_#{get_block_device_str}"
"KDPL_#{context[:cluster].swap_part}_#{get_block_device_str}"
end
# Get the path of the swap partition based on label
......@@ -906,7 +906,7 @@ class Microstep < Automata::QueueTask
# Output
# * return the label of the tmp partition
def get_tmp_label
"KDPL_TMP_#{get_block_device_str}"
"KDPL_#{context[:cluster].tmp_part}_#{get_block_device_str}"
end
# Get the path of the tmp partition based on label
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment