diff --git a/bin/kadeploy3 b/bin/kadeploy3 index 3e2e5ef722d0cde7cf165a9e51fc150cde2bc86a..d0dc24fe5e1899421a380da67a7ba1bfc16fda4a 100755 --- a/bin/kadeploy3 +++ b/bin/kadeploy3 @@ -35,6 +35,7 @@ class KadeployClient < ClientWorkflow :pxe_files => [], :steps => [], :force => false, + :disable_kexec => nil, :disable_bootloader_install => nil, :disable_disk_partitioning => nil, :reboot_classical_timeout => nil, @@ -70,6 +71,9 @@ class KadeployClient < ClientWorkflow parse_env_version(opt,options) opt.separator "" opt.separator "Advanced options:" + add_opt(opt,"--no-kexec", "Disable kexec reboots during the deployment process") { + options[:disable_kexec] = true + } add_opt(opt,"--disable-bootloader-install", "Disable the automatic installation of a bootloader for a Linux based environnment") { options[:disable_bootloader_install] = true } @@ -124,6 +128,7 @@ class KadeployClient < ClientWorkflow params[:reformat_tmp_partition] = options[:reformat_tmp] if options[:reformat_tmp] params[:timeout_reboot_classical] = options[:reboot_classical_timeout] if options[:reboot_classical_timeout] params[:timeout_reboot_kexec] = options[:reboot_kexec_timeout] if options[:reboot_kexec_timeout] + params[:disable_kexec] = options[:disable_kexec] if options[:disable_kexec] params[:disable_bootloader_install] = options[:disable_bootloader_install] if options[:disable_bootloader_install] params[:disable_disk_partitioning] = options[:disable_disk_partitioning] if options[:disable_disk_partitioning] if options[:pxe_profile] diff --git a/conf/version b/conf/version index 3760a13d21eba9c0afc42ae0d1c89db4de3fc750..485c843fdff126131a2aa525bf5c2f3ab099fb15 100644 --- a/conf/version +++ b/conf/version @@ -1 +1 @@ -3.2.0.rc3 +3.2.0.rc4 diff --git a/doc/Kadeploy-3.2.0.rc3.pdf b/doc/Kadeploy-3.2.0.rc4.pdf similarity index 73% rename from doc/Kadeploy-3.2.0.rc3.pdf rename to doc/Kadeploy-3.2.0.rc4.pdf index d71bb33c37b1b3cfa118b743ea1151cae2801ae2..99af7440f67a9a215a53e373063a7b4635c0f81c 100644 Binary files a/doc/Kadeploy-3.2.0.rc3.pdf and b/doc/Kadeploy-3.2.0.rc4.pdf differ diff --git a/doc/Kadeploy.tex b/doc/Kadeploy.tex index 1635f91a8c5f8fdcd2e37110b032f8109976e736..c713e25e10fb0990b7f3b1d4e08d75e1732753ee 100644 --- a/doc/Kadeploy.tex +++ b/doc/Kadeploy.tex @@ -556,7 +556,7 @@ external: args: -b 4096 -O sparse_super,filetype,resize_inode,dir_index - fstype: ext3 args: -b 4096 -O sparse_super,filetype,resize_inode,dir_index - tar: --warning=timestamp + tar: --warning=no-timestamp kastafior: binary: /usr/bin/kastafior \end{verbatim} @@ -768,7 +768,7 @@ The information used to generate this filenames are the one specified for each n \item \yfieldd{args}{String}{nil} the specific options for this filesystem type \end{itemize} - \item \yfieldd{tar}{String}{'--warning=no-timestamp'} Options for tar (used in the deployment environment) + \item \yfieldd{tar}{String}{''} Options for tar (used in the deployment environment) \item \ypath{/external/kastafior} \begin{itemize} diff --git a/doc/api/api_specs-3.2.0.rc3.html b/doc/api/api_specs-3.2.0.rc4.html similarity index 99% rename from doc/api/api_specs-3.2.0.rc3.html rename to doc/api/api_specs-3.2.0.rc4.html index 77229893d135da0cb7c027850c61b5dc0a60c34d..4af69bad834f12581662bef7ad80cd06d662c6ec 100644 --- a/doc/api/api_specs-3.2.0.rc3.html +++ b/doc/api/api_specs-3.2.0.rc4.html @@ -1,4 +1,4 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"><HTML><HEAD><TITLE>Kadeploy 3.2.0.rc3 REST API specifications</TITLE><LINK rel="stylesheet" type="text/css" href="/tmp/kadeploy3/doc/api/api.css"></HEAD><BODY><DIV class="apidoc_frame"><H1 class="apidoc_title"><A class="apidoc_title_link" id="title">Kadeploy 3.2.0.rc3 REST API specifications</A></H1><DIV class="apidoc_index_frame"><UL class="apidoc_index_list"><LI><A class="apidoc_index_link" href="#intro">Introduction</A></LI><UL class="operation_index_list"><LI><A class="intro_index_link" href="#request_parameters">Request's parameters</A></LI><LI><A class="intro_index_link" href="#output_type">Output type and encoding</A></LI><LI><A class="intro_index_link" href="#Global parameters">Global parameters</A></LI><LI><A class="intro_index_link" href="#Authentication">Authentication</A></LI><LI><A class="intro_index_link" href="#Errors management">Errors management</A></LI><LI><A class="intro_index_link" href="#workflow_operations">Workflow based operations</A></LI><LI><A class="intro_index_link" href="#file_export">Exporting files for the server</A></LI><LI><A class="intro_index_link" href="#API documentation notations">API documentation notations</A></LI></UL><LI><A class="apidoc_index_link" href="#Global information">Global information</A></LI><UL class="operation_index_list"><LI><A class="operation_index_link" href="#GET/clusters"><SPAN class="resource_id_method_GET">GET</SPAN> <SPAN class="resource_id_path">/clusters</SPAN></A></LI><LI><A class="operation_index_link" href="#GET/info"><SPAN class="resource_id_method_GET">GET</SPAN> <SPAN class="resource_id_path">/info</SPAN></A></LI><LI><A class="operation_index_link" href="#GET/version"><SPAN class="resource_id_method_GET">GET</SPAN> <SPAN class="resource_id_path">/version</SPAN></A></LI></UL><LI><A class="apidoc_index_link" href="#Statistics">Statistics</A></LI><UL class="operation_index_list"><LI><A class="operation_index_link" href="#GET/stats"><SPAN class="resource_id_method_GET">GET</SPAN> <SPAN class="resource_id_path">/stats</SPAN></A></LI></UL><LI><A class="apidoc_index_link" href="#Deployment">Deployment</A></LI><UL class="operation_index_list"><LI><A class="operation_index_link" href="#POST/deployment"><SPAN class="resource_id_method_POST">POST</SPAN> <SPAN class="resource_id_path">/deployment</SPAN></A></LI></UL><LI><A class="apidoc_index_link" href="#Rights management">Rights management</A></LI><UL class="operation_index_list"><LI><A class="operation_index_link" href="#POST/rights"><SPAN class="resource_id_method_POST">POST</SPAN> <SPAN class="resource_id_path">/rights</SPAN></A></LI><LI><A class="operation_index_link" href="#GET/rights/:username?/:node?"><SPAN class="resource_id_method_GET">GET</SPAN> <SPAN class="resource_id_path">/rights/:username?/:node?</SPAN></A></LI><LI><A class="operation_index_link" href="#PUT/rights/:username?/:node?"><SPAN class="resource_id_method_PUT">PUT</SPAN> <SPAN class="resource_id_path">/rights/:username?/:node?</SPAN></A></LI><LI><A class="operation_index_link" href="#DELETE/rights/:username/:node?/:partition?"><SPAN class="resource_id_method_DELETE">DELETE</SPAN> <SPAN class="resource_id_path">/rights/:username/:node?/:partition?</SPAN></A></LI></UL><LI><A class="apidoc_index_link" href="#Nodes information">Nodes information</A></LI><UL class="operation_index_list"><LI><A class="operation_index_link" href="#GET/nodes/:nodename?"><SPAN class="resource_id_method_GET">GET</SPAN> <SPAN class="resource_id_path">/nodes/:nodename?</SPAN></A></LI></UL><LI><A class="apidoc_index_link" href="#Workflow-based operations">Workflow-based operations</A></LI><UL class="operation_index_list"><LI><A class="operation_index_link" href="#POST/%OPERATION"><SPAN class="resource_id_method_POST">POST</SPAN> <SPAN class="resource_id_path">/%OPERATION</SPAN></A></LI><LI><A class="operation_index_link" href="#GET/%OPERATION"><SPAN class="resource_id_method_GET">GET</SPAN> <SPAN class="resource_id_path">/%OPERATION</SPAN></A></LI><LI><A class="operation_index_link" href="#GET/%OPERATION/:id"><SPAN class="resource_id_method_GET">GET</SPAN> <SPAN class="resource_id_path">/%OPERATION/:id</SPAN></A></LI><LI><A class="operation_index_link" href="#GET/%OPERATION/:id/logs/:cluster?"><SPAN class="resource_id_method_GET">GET</SPAN> <SPAN class="resource_id_path">/%OPERATION/:id/logs/:cluster?</SPAN></A></LI><LI><A class="operation_index_link" href="#GET/%OPERATION/:id/debugs/:node?"><SPAN class="resource_id_method_GET">GET</SPAN> <SPAN class="resource_id_path">/%OPERATION/:id/debugs/:node?</SPAN></A></LI><LI><A class="operation_index_link" href="#GET/%OPERATION/:id/state"><SPAN class="resource_id_method_GET">GET</SPAN> <SPAN class="resource_id_path">/%OPERATION/:id/state</SPAN></A></LI><LI><A class="operation_index_link" href="#GET/%OPERATION/:id/status"><SPAN class="resource_id_method_GET">GET</SPAN> <SPAN class="resource_id_path">/%OPERATION/:id/status</SPAN></A></LI><LI><A class="operation_index_link" href="#GET/%OPERATION/:id/error"><SPAN class="resource_id_method_GET">GET</SPAN> <SPAN class="resource_id_path">/%OPERATION/:id/error</SPAN></A></LI><LI><A class="operation_index_link" href="#DELETE/%OPERATION/:id"><SPAN class="resource_id_method_DELETE">DELETE</SPAN> <SPAN class="resource_id_path">/%OPERATION/:id</SPAN></A></LI></UL><LI><A class="apidoc_index_link" href="#Power operations">Power operations</A></LI><UL class="operation_index_list"><LI><A class="operation_index_link" href="#PUT/power"><SPAN class="resource_id_method_PUT">PUT</SPAN> <SPAN class="resource_id_path">/power</SPAN></A></LI><LI><A class="operation_index_link" href="#GET/power"><SPAN class="resource_id_method_GET">GET</SPAN> <SPAN class="resource_id_path">/power</SPAN></A></LI></UL><LI><A class="apidoc_index_link" href="#Reboot operations">Reboot operations</A></LI><UL class="operation_index_list"><LI><A class="operation_index_link" href="#POST/reboot"><SPAN class="resource_id_method_POST">POST</SPAN> <SPAN class="resource_id_path">/reboot</SPAN></A></LI></UL><LI><A class="apidoc_index_link" href="#Environments management">Environments management</A></LI><UL class="operation_index_list"><LI><A class="operation_index_link" href="#POST/environments"><SPAN class="resource_id_method_POST">POST</SPAN> <SPAN class="resource_id_path">/environments</SPAN></A></LI><LI><A class="operation_index_link" href="#GET/environments/:username?/:name?/:version?"><SPAN class="resource_id_method_GET">GET</SPAN> <SPAN class="resource_id_path">/environments/:username?/:name?/:version?</SPAN></A></LI><LI><A class="operation_index_link" href="#PUT/environments/:username/:name/:version?"><SPAN class="resource_id_method_PUT">PUT</SPAN> <SPAN class="resource_id_path">/environments/:username/:name/:version?</SPAN></A></LI><LI><A class="operation_index_link" href="#PUT/environments/:username?/:name?/:version?"><SPAN class="resource_id_method_PUT">PUT</SPAN> <SPAN class="resource_id_path">/environments/:username?/:name?/:version?</SPAN></A></LI><LI><A class="operation_index_link" href="#DELETE/environments/:username/:name/:version?"><SPAN class="resource_id_method_DELETE">DELETE</SPAN> <SPAN class="resource_id_path">/environments/:username/:name/:version?</SPAN></A></LI></UL></UL></DIV><HR class="apidoc_index_sep"><DIV class="intro_frame"><H1 class="intro_title"><A class="intro_title_link" id="intro">Introduction</A></H1><DIV class="section_frame"><H2 class="section_title"><A id="request_parameters">Request's parameters</A></H2><P class="section_paragraph">There is several ways to specify parameters when using the network API. Parameters can be specified in the query's URI parameter but also in the query's body. Remark: it's only possible to use String and Array data structures when specifying parameters using the query's URI to specify more advanced parameters (Numbers, Hashs, ...) it's necessary to specify the parameters using a more advanced description language (JSON/YAML) in the query's body.</P><P class="section_paragraph">The following examples are equivalent:</P><P class="section_paragraph"><B>Specifying parameters in the query's URI</B></P><P class="section_paragraph"><PRE class="code_sample"> POST /deploy?user=frontent&nodes=node-1.testbed.lan&nodes=node-2.testbed.lan HTTP/1.1 +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"><HTML><HEAD><TITLE>Kadeploy 3.2.0.rc4 REST API specifications</TITLE><LINK rel="stylesheet" type="text/css" href="/tmp/kadeploy3/doc/api/api.css"></HEAD><BODY><DIV class="apidoc_frame"><H1 class="apidoc_title"><A class="apidoc_title_link" id="title">Kadeploy 3.2.0.rc4 REST API specifications</A></H1><DIV class="apidoc_index_frame"><UL class="apidoc_index_list"><LI><A class="apidoc_index_link" href="#intro">Introduction</A></LI><UL class="operation_index_list"><LI><A class="intro_index_link" href="#request_parameters">Request's parameters</A></LI><LI><A class="intro_index_link" href="#output_type">Output type and encoding</A></LI><LI><A class="intro_index_link" href="#Global parameters">Global parameters</A></LI><LI><A class="intro_index_link" href="#Authentication">Authentication</A></LI><LI><A class="intro_index_link" href="#Errors management">Errors management</A></LI><LI><A class="intro_index_link" href="#workflow_operations">Workflow based operations</A></LI><LI><A class="intro_index_link" href="#file_export">Exporting files for the server</A></LI><LI><A class="intro_index_link" href="#API documentation notations">API documentation notations</A></LI></UL><LI><A class="apidoc_index_link" href="#Global information">Global information</A></LI><UL class="operation_index_list"><LI><A class="operation_index_link" href="#GET/clusters"><SPAN class="resource_id_method_GET">GET</SPAN> <SPAN class="resource_id_path">/clusters</SPAN></A></LI><LI><A class="operation_index_link" href="#GET/info"><SPAN class="resource_id_method_GET">GET</SPAN> <SPAN class="resource_id_path">/info</SPAN></A></LI><LI><A class="operation_index_link" href="#GET/version"><SPAN class="resource_id_method_GET">GET</SPAN> <SPAN class="resource_id_path">/version</SPAN></A></LI></UL><LI><A class="apidoc_index_link" href="#Statistics">Statistics</A></LI><UL class="operation_index_list"><LI><A class="operation_index_link" href="#GET/stats"><SPAN class="resource_id_method_GET">GET</SPAN> <SPAN class="resource_id_path">/stats</SPAN></A></LI></UL><LI><A class="apidoc_index_link" href="#Deployment">Deployment</A></LI><UL class="operation_index_list"><LI><A class="operation_index_link" href="#POST/deployment"><SPAN class="resource_id_method_POST">POST</SPAN> <SPAN class="resource_id_path">/deployment</SPAN></A></LI></UL><LI><A class="apidoc_index_link" href="#Rights management">Rights management</A></LI><UL class="operation_index_list"><LI><A class="operation_index_link" href="#POST/rights"><SPAN class="resource_id_method_POST">POST</SPAN> <SPAN class="resource_id_path">/rights</SPAN></A></LI><LI><A class="operation_index_link" href="#GET/rights/:username?/:node?"><SPAN class="resource_id_method_GET">GET</SPAN> <SPAN class="resource_id_path">/rights/:username?/:node?</SPAN></A></LI><LI><A class="operation_index_link" href="#PUT/rights/:username?/:node?"><SPAN class="resource_id_method_PUT">PUT</SPAN> <SPAN class="resource_id_path">/rights/:username?/:node?</SPAN></A></LI><LI><A class="operation_index_link" href="#DELETE/rights/:username/:node?/:partition?"><SPAN class="resource_id_method_DELETE">DELETE</SPAN> <SPAN class="resource_id_path">/rights/:username/:node?/:partition?</SPAN></A></LI></UL><LI><A class="apidoc_index_link" href="#Nodes information">Nodes information</A></LI><UL class="operation_index_list"><LI><A class="operation_index_link" href="#GET/nodes/:nodename?"><SPAN class="resource_id_method_GET">GET</SPAN> <SPAN class="resource_id_path">/nodes/:nodename?</SPAN></A></LI></UL><LI><A class="apidoc_index_link" href="#Workflow-based operations">Workflow-based operations</A></LI><UL class="operation_index_list"><LI><A class="operation_index_link" href="#POST/%OPERATION"><SPAN class="resource_id_method_POST">POST</SPAN> <SPAN class="resource_id_path">/%OPERATION</SPAN></A></LI><LI><A class="operation_index_link" href="#GET/%OPERATION"><SPAN class="resource_id_method_GET">GET</SPAN> <SPAN class="resource_id_path">/%OPERATION</SPAN></A></LI><LI><A class="operation_index_link" href="#GET/%OPERATION/:id"><SPAN class="resource_id_method_GET">GET</SPAN> <SPAN class="resource_id_path">/%OPERATION/:id</SPAN></A></LI><LI><A class="operation_index_link" href="#GET/%OPERATION/:id/logs/:cluster?"><SPAN class="resource_id_method_GET">GET</SPAN> <SPAN class="resource_id_path">/%OPERATION/:id/logs/:cluster?</SPAN></A></LI><LI><A class="operation_index_link" href="#GET/%OPERATION/:id/debugs/:node?"><SPAN class="resource_id_method_GET">GET</SPAN> <SPAN class="resource_id_path">/%OPERATION/:id/debugs/:node?</SPAN></A></LI><LI><A class="operation_index_link" href="#GET/%OPERATION/:id/state"><SPAN class="resource_id_method_GET">GET</SPAN> <SPAN class="resource_id_path">/%OPERATION/:id/state</SPAN></A></LI><LI><A class="operation_index_link" href="#GET/%OPERATION/:id/status"><SPAN class="resource_id_method_GET">GET</SPAN> <SPAN class="resource_id_path">/%OPERATION/:id/status</SPAN></A></LI><LI><A class="operation_index_link" href="#GET/%OPERATION/:id/error"><SPAN class="resource_id_method_GET">GET</SPAN> <SPAN class="resource_id_path">/%OPERATION/:id/error</SPAN></A></LI><LI><A class="operation_index_link" href="#DELETE/%OPERATION/:id"><SPAN class="resource_id_method_DELETE">DELETE</SPAN> <SPAN class="resource_id_path">/%OPERATION/:id</SPAN></A></LI></UL><LI><A class="apidoc_index_link" href="#Power operations">Power operations</A></LI><UL class="operation_index_list"><LI><A class="operation_index_link" href="#PUT/power"><SPAN class="resource_id_method_PUT">PUT</SPAN> <SPAN class="resource_id_path">/power</SPAN></A></LI><LI><A class="operation_index_link" href="#GET/power"><SPAN class="resource_id_method_GET">GET</SPAN> <SPAN class="resource_id_path">/power</SPAN></A></LI></UL><LI><A class="apidoc_index_link" href="#Reboot operations">Reboot operations</A></LI><UL class="operation_index_list"><LI><A class="operation_index_link" href="#POST/reboot"><SPAN class="resource_id_method_POST">POST</SPAN> <SPAN class="resource_id_path">/reboot</SPAN></A></LI></UL><LI><A class="apidoc_index_link" href="#Environments management">Environments management</A></LI><UL class="operation_index_list"><LI><A class="operation_index_link" href="#POST/environments"><SPAN class="resource_id_method_POST">POST</SPAN> <SPAN class="resource_id_path">/environments</SPAN></A></LI><LI><A class="operation_index_link" href="#GET/environments/:username?/:name?/:version?"><SPAN class="resource_id_method_GET">GET</SPAN> <SPAN class="resource_id_path">/environments/:username?/:name?/:version?</SPAN></A></LI><LI><A class="operation_index_link" href="#PUT/environments/:username/:name/:version?"><SPAN class="resource_id_method_PUT">PUT</SPAN> <SPAN class="resource_id_path">/environments/:username/:name/:version?</SPAN></A></LI><LI><A class="operation_index_link" href="#PUT/environments/:username?/:name?/:version?"><SPAN class="resource_id_method_PUT">PUT</SPAN> <SPAN class="resource_id_path">/environments/:username?/:name?/:version?</SPAN></A></LI><LI><A class="operation_index_link" href="#DELETE/environments/:username/:name/:version?"><SPAN class="resource_id_method_DELETE">DELETE</SPAN> <SPAN class="resource_id_path">/environments/:username/:name/:version?</SPAN></A></LI></UL></UL></DIV><HR class="apidoc_index_sep"><DIV class="intro_frame"><H1 class="intro_title"><A class="intro_title_link" id="intro">Introduction</A></H1><DIV class="section_frame"><H2 class="section_title"><A id="request_parameters">Request's parameters</A></H2><P class="section_paragraph">There is several ways to specify parameters when using the network API. Parameters can be specified in the query's URI parameter but also in the query's body. Remark: it's only possible to use String and Array data structures when specifying parameters using the query's URI to specify more advanced parameters (Numbers, Hashs, ...) it's necessary to specify the parameters using a more advanced description language (JSON/YAML) in the query's body.</P><P class="section_paragraph">The following examples are equivalent:</P><P class="section_paragraph"><B>Specifying parameters in the query's URI</B></P><P class="section_paragraph"><PRE class="code_sample"> POST /deploy?user=frontent&nodes=node-1.testbed.lan&nodes=node-2.testbed.lan HTTP/1.1 Accept: */* Host: kadeploy.testbed.lan:25300 </PRE></P><P class="section_paragraph"><B>Specifying parameters in the query's body</B></P><P class="section_paragraph"><TT>JSON body</TT></P><P class="section_paragraph"><PRE class="code_sample"> POST /deploy HTTP/1.1 diff --git a/lib/kadeploy3/server/config.rb b/lib/kadeploy3/server/config.rb index 07f060933079abcbc05b67dcdc9287945da29ad9..d2be8695d3872115fd06495e325000c6483dea49 100644 --- a/lib/kadeploy3/server/config.rb +++ b/lib/kadeploy3/server/config.rb @@ -627,7 +627,7 @@ module Configuration end end - @tar_options = cp.value('tar',String,'--warning=no-timestamp') + @tar_options = cp.value('tar',String,'') end rescue ArgumentError => ae diff --git a/lib/kadeploy3/server/dump.rb b/lib/kadeploy3/server/dump.rb new file mode 100644 index 0000000000000000000000000000000000000000..97b9e0961449fe9a31cf33be8b76e607ab0a7121 --- /dev/null +++ b/lib/kadeploy3/server/dump.rb @@ -0,0 +1,23 @@ +require 'pp' +require 'thread' + +# Hacks that allow better dump of internal structures +class Mutex + def inspect + "#<#{self.class}:0x#{self.__id__.to_s(16)} locked=#{self.locked?}>" + end +end + +module Kadeploy + def self.dump(file=nil,width=80) + if $kadeploy + file = STDOUT unless file + PP.pp($kadeploy,file,width) + end + objects = Hash.new(0) + ObjectSpace.each_object{|obj| objects[obj.class] += 1 } + PP.pp(objects.sort_by{|k,v| -v},file,width) + objects = nil + PP.pp(GC.stat,file,width) if GC.respond_to?(:stat) + end +end diff --git a/lib/kadeploy3/server/kadeploy.rb b/lib/kadeploy3/server/kadeploy.rb index 4491788bc086dcc9d7bc2f78e6455177ccd01e6d..976a553642f553ccafc5a5cae6f22129a928df35 100644 --- a/lib/kadeploy3/server/kadeploy.rb +++ b/lib/kadeploy3/server/kadeploy.rb @@ -6,6 +6,7 @@ module Kadeploy def deploy_init_exec_context() ret = work_init_exec_context(:deploy) ret.reformat_tmp = nil + ret.disable_kexec = false ret.disable_bootloader_install = false ret.disable_disk_partitioning = false ret.timeout_reboot_kexec = nil @@ -63,6 +64,7 @@ module Kadeploy # Check disable options context.disable_bootloader_install = p.parse('disable_bootloader_install',nil,:toggle=>true) context.disable_disk_partitioning = p.parse('disable_disk_partitioning',nil,:toggle=>true) + context.disable_kexec = p.parse('disable_kexec',nil,:toggle=>true) # Check rights on multipart environement if context.environment.multipart diff --git a/lib/kadeploy3/server/karights.rb b/lib/kadeploy3/server/karights.rb index da3d28376e4602cab6878f5edecfc73e80f14654..cbe801a5a46d4ed3e78a238ac1d1fb49fa84e8d7 100644 --- a/lib/kadeploy3/server/karights.rb +++ b/lib/kadeploy3/server/karights.rb @@ -47,7 +47,6 @@ module Karights end def rights_create(cexec) - cexec.rights.delete(cexec.username,cexec.nodes) if cexec.overwrite existing = cexec.rights.get(cexec.username,cexec.nodes) existing = existing[cexec.username] if existing if existing.is_a?(Hash) @@ -69,10 +68,14 @@ module Karights if existing and (existing.keys.size > 1 or existing.keys[0] != cexec.username) existing.keys.each do |usr| unless cexec.almighty_users.include?(usr) - kaerror(APIError::CONFLICTING_ELEMENTS, - "Some rights are already set for user #{usr}"\ - " on nodes #{cexec.nodes.join(',')}" - ) + if cexec.overwrite + cexec.rights.delete(usr,cexec.nodes) + else + kaerror(APIError::CONFLICTING_ELEMENTS, + "Some rights are already set for user #{usr}"\ + " on nodes #{cexec.nodes.join(',')}" + ) + end end end end diff --git a/lib/kadeploy3/server/microsteps.rb b/lib/kadeploy3/server/microsteps.rb index 04c37c035128d70356fe6f6cf548032dcf269650..5f6ab02913a2c3eba46d0040c23b8584c56bf0a1 100644 --- a/lib/kadeploy3/server/microsteps.rb +++ b/lib/kadeploy3/server/microsteps.rb @@ -848,11 +848,11 @@ class Microstep < Automata::QueueTask opts = context[:common].tar_options case kind when "tgz" - "tar #{opts} xz#{"f #{input_file}" if input_file} -C #{directory}" + "tar #{opts} -C #{directory} -xz#{"f #{input_file}" if input_file}" when "tbz2" - "tar #{opts} xj#{"f #{input_file}" if input_file} -C #{directory}" + "tar #{opts} -C #{directory} -xj#{"f #{input_file}" if input_file}" when "txz" - "tar #{opts} xJ#{"f #{input_file}" if input_file} -C #{directory}" + "tar #{opts} -C #{directory} -xJ#{"f #{input_file}" if input_file}" when "ddgz" if partition "gzip -cd #{input_file if input_file} > #{partition}" diff --git a/lib/kadeploy3/server/workflow.rb b/lib/kadeploy3/server/workflow.rb index 9ecfbec10f43a9ce36673758cbb9bcad773083f1..0c2e9893f6cd708a17b270923cb1227e05ccad29 100644 --- a/lib/kadeploy3/server/workflow.rb +++ b/lib/kadeploy3/server/workflow.rb @@ -429,6 +429,13 @@ module Workflow # BroadcastEnv step macrosteps[1].to_a.each do |instance| + if context[:execution].disable_kexec and instance[0] == 'SetDeploymentEnvKexec' + instance[0] = 'SetDeploymentEnvUntrusted' + # Should not be hardcoded + instance[1] = 0 + instance[2] = eval("(#{context[:cluster].timeout_reboot_classical})+200").to_i + debug(0,"Using classical reboot instead of kexec (#{macrosteps[0].name})") + end @tasks[1] << [ instance[0].to_sym ] end @@ -449,13 +456,18 @@ module Workflow setclassical.call( instance, "Using classical reboot instead of kexec one with this "\ - "non-linux environment" + "non-linux environment (#{macrosteps[2].name})" ) # The filesystem is not supported by the deployment kernel elsif !context[:cluster].deploy_supported_fs.include?(context[:execution].environment.filesystem) setclassical.call( instance, - "Using classical reboot instead of kexec since the filesystem of the boot partition is not supported" + "Using classical reboot instead of kexec since the filesystem of the boot partition is not supported (#{macrosteps[2].name})" + ) + elsif context[:execution].disable_kexec + setclassical.call( + instance, + "Using classical reboot instead of kexec (#{macrosteps[2].name})" ) end diff --git a/man/kaconsole3.1 b/man/kaconsole3.1 index a28825b1542a69ad15831c5858294203e5aa8bdd..4b20c17ff36fac70db0bc981d3080eae0b40caac 100644 --- a/man/kaconsole3.1 +++ b/man/kaconsole3.1 @@ -1,5 +1,5 @@ .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.43.3. -.TH KACONSOLE3 "1" "November 2013" "kaconsole3 3.2.0.rc3" "User Commands" +.TH KACONSOLE3 "1" "November 2013" "kaconsole3 3.2.0.rc4" "User Commands" .SH NAME kaconsole3 \- allows to get a console on the deploying nodes .SH SYNOPSIS diff --git a/man/kadeploy3.1 b/man/kadeploy3.1 index b68f85037d053e6f7e9da9d3264932b20f699fb4..bcf8829704f9cffc99b27db10279c6565ceec755 100644 --- a/man/kadeploy3.1 +++ b/man/kadeploy3.1 @@ -1,5 +1,5 @@ .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.43.3. -.TH KADEPLOY3 "1" "November 2013" "kadeploy3 3.2.0.rc3" "User Commands" +.TH KADEPLOY3 "1" "November 2013" "kadeploy3 3.2.0.rc4" "User Commands" .SH NAME kadeploy3 \- allows to perform efficient deployments on cluster nodes .SH SYNOPSIS @@ -110,6 +110,9 @@ Specify a file containing the substitution of a pattern for each node in the PXE Version number of the recorded environment .SS "Advanced options:" .TP +\fB\-\-no\-kexec\fR +Disable kexec reboots during the deployment process +.TP \fB\-\-disable\-bootloader\-install\fR Disable the automatic installation of a bootloader for a Linux based environnment .TP diff --git a/man/kadeploy3d.8 b/man/kadeploy3d.8 index b26d891f59b48bccb59ef82ff205a508e886f3ee..26652e8b3ad0b12be9be8f35c9a03918b5207077 100644 --- a/man/kadeploy3d.8 +++ b/man/kadeploy3d.8 @@ -1,5 +1,5 @@ .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.43.3. -.TH KADEPLOY3D "8" "November 2013" "kadeploy3d 3.2.0.rc3" "System Administration Utilities" +.TH KADEPLOY3D "8" "November 2013" "kadeploy3d 3.2.0.rc4" "System Administration Utilities" .SH NAME kadeploy3d \- the launcher of Kadeploy server .SH SYNOPSIS diff --git a/man/kaenv3.1 b/man/kaenv3.1 index b0208c581afb746315cb059f9b252a83320ae0a3..8101c1c8552685050405091eaeb1cf03e503f88e 100644 --- a/man/kaenv3.1 +++ b/man/kaenv3.1 @@ -1,5 +1,5 @@ .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.43.3. -.TH KAENV3 "1" "November 2013" "kaenv3 3.2.0.rc3" "User Commands" +.TH KAENV3 "1" "November 2013" "kaenv3 3.2.0.rc4" "User Commands" .SH NAME kaenv3 \- allows to manage the Kadeploy environments .SH SYNOPSIS diff --git a/man/kanodes3.1 b/man/kanodes3.1 index ac2f8c692a1e75ed97483697592fc9e2c8c3ff93..e062450cd6ae399b59901102f63d83cb53d41ed4 100644 --- a/man/kanodes3.1 +++ b/man/kanodes3.1 @@ -1,5 +1,5 @@ .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.43.3. -.TH KANODES3 "1" "November 2013" "kanodes3 3.2.0.rc3" "User Commands" +.TH KANODES3 "1" "November 2013" "kanodes3 3.2.0.rc4" "User Commands" .SH NAME kanodes3 \- allows to get information on the current deployments .SH SYNOPSIS diff --git a/man/kapower3.1 b/man/kapower3.1 index f16f4d6cf39938de87af0d2c6faac3720632da69..004f1fbdf93c2662d4d302edfc9bb205ba9b00c2 100644 --- a/man/kapower3.1 +++ b/man/kapower3.1 @@ -1,5 +1,5 @@ .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.43.3. -.TH KAPOWER3 "1" "November 2013" "kapower3 3.2.0.rc3" "User Commands" +.TH KAPOWER3 "1" "November 2013" "kapower3 3.2.0.rc4" "User Commands" .SH NAME kapower3 \- allows to perform several operations to control the power status of nodes .SH SYNOPSIS diff --git a/man/kareboot3.1 b/man/kareboot3.1 index 04a58166774641395a7bdb9b61f3883542ff2591..14d8e5cfc9fd06c863f73e1fae10975f92e5bef0 100644 --- a/man/kareboot3.1 +++ b/man/kareboot3.1 @@ -1,5 +1,5 @@ .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.43.3. -.TH KAREBOOT3 "1" "November 2013" "kareboot3 3.2.0.rc3" "User Commands" +.TH KAREBOOT3 "1" "November 2013" "kareboot3 3.2.0.rc4" "User Commands" .SH NAME kareboot3 \- allows to perform several reboot operations on the nodes involved in a deployment .SH SYNOPSIS diff --git a/man/karights3.8 b/man/karights3.8 index 4f4f817914a9c23fc268931da4a3be288b5d991c..84318dd0fc18806c4b9b2dbd982cb64d22e247f5 100644 --- a/man/karights3.8 +++ b/man/karights3.8 @@ -1,5 +1,5 @@ .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.43.3. -.TH KARIGHTS3 "8" "November 2013" "karights3 3.2.0.rc3" "System Administration Utilities" +.TH KARIGHTS3 "8" "November 2013" "karights3 3.2.0.rc4" "System Administration Utilities" .SH NAME karights3 \- allows to set the deployment rights to users .SH SYNOPSIS diff --git a/man/kastat3.1 b/man/kastat3.1 index 8b78507ccb0a6ed578a4c2066106493d315e5203..07c2e679b7d7840467b16e1f726e2cde87f425c5 100644 --- a/man/kastat3.1 +++ b/man/kastat3.1 @@ -1,5 +1,5 @@ .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.43.3. -.TH KASTAT3 "1" "November 2013" "kastat3 3.2.0.rc3" "User Commands" +.TH KASTAT3 "1" "November 2013" "kastat3 3.2.0.rc4" "User Commands" .SH NAME kastat3 \- allows to get statistics on the deployments .SH SYNOPSIS diff --git a/release_version b/release_version index c215c765ca2c779eace78f091b7dd0fc00593c7e..a00d4a0e0a0b1719d46f4a14782010b2493e6bcb 100644 --- a/release_version +++ b/release_version @@ -1 +1 @@ -rc3 +rc4 diff --git a/sbin/kadeploy3d b/sbin/kadeploy3d index fa1720634eeae5de2f52ea95052b3f838d303fa6..e14cfca80dab24b439cb85373bc57cffd5ac2c1c 100755 --- a/sbin/kadeploy3d +++ b/sbin/kadeploy3d @@ -10,6 +10,7 @@ SSH_KEY=File.join($kadeploy_confdir,'keys/id_deploy') LOGFILE_DEBUG='output.log' LOGFILE_ERROR='error.log' RUNFILE_RELOAD='reload' +RUNFILE_DUMP='dump' AUTOCLEAN_PITCH = 300 @@ -83,6 +84,23 @@ Signal::trap("HUP") do end +# Print a dump of the running service data structures +Signal::trap("USR1") do + require 'kadeploy3/server/dump' + + file = File.open(File.join($kadeploy_rundir,RUNFILE_DUMP),'w+') + begin + STDOUT.puts "[#{Time.now.to_s}] Dump internal structures" + Kadeploy.dump(file) + rescue Exception => e + STDOUT.puts e.class.name + STDOUT.puts e.message + STDOUT.puts e.backtrace + ensure + file.close unless file.closed? + end +end + require 'kadeploy3/server' require 'thread'