lib/beaker-pe/install/pe_utils.rb in beaker-pe-1.15.0 vs lib/beaker-pe/install/pe_utils.rb in beaker-pe-1.16.0

- old
+ new

@@ -421,10 +421,12 @@ # Do a generic install if this is masterless, not all the same PE version, an upgrade, or earlier than 2016.4 return :generic if opts[:masterless] return :generic if hosts.map {|host| host['pe_ver']}.uniq.length > 1 return :generic if opts[:type] == :upgrade return :generic if version_is_less(opts[:pe_ver] || hosts.first['pe_ver'], '2016.4') + #PE-20610 Do a generic install for old versions on windows that needs msi install because of PE-18351 + return :generic if hosts.any? {|host| host['platform'] =~ /windows/ && install_via_msi?(host)} mono_roles = ['master', 'database', 'dashboard'] if has_all_roles?(hosts.first, mono_roles) && hosts.drop(1).all? {|host| host['roles'].include?('frictionless')} :simple_monolithic elsif hosts[0]['roles'].include?('master') && hosts[1]['roles'].include?('database') && hosts[2]['roles'].include?('dashboard') && hosts.drop(3).all? {|host| host['roles'].include?('frictionless')} @@ -481,11 +483,11 @@ step "Stop puppet agents to avoid interfering with tests" do stop_agent_on(all_hosts, :run_in_parallel => true) end step "Run puppet to setup mcollective and pxp-agent" do - on all_hosts, puppet_agent('-t'), :acceptable_exit_codes => [0,2], :run_in_parallel => true + run_puppet_on_non_infrastructure_nodes(all_hosts) #Workaround for windows frictionless install, see BKR-943 for the reason agents.select {|agent| agent['platform'] =~ /windows/}.each do |agent| client_datadir = agent.puppet['client_datadir'] on(agent, puppet("resource file \"#{client_datadir}\" ensure=absent force=true")) @@ -767,9 +769,17 @@ #windows agents from 4.0 -> 2016.1.2 were only installable via the aio method #powershell2 bug was fixed in PE 2016.4.3, and PE 2017.1.0, but not 2016.5.z. (host['platform'] =~ /windows/ && (version_is_less(host['pe_ver'], '2016.4.0') && !version_is_less(host['pe_ver'], '3.99'))) || (host['platform'] =~ /windows-2008r2/ && (version_is_less(host['pe_ver'], '2016.4.3') && !version_is_less(host['pe_ver'], '3.99'))) || (host['platform'] =~ /windows-2008r2/ && (!version_is_less(host['pe_ver'], '2016.4.99') && version_is_less(host['pe_ver'], '2016.5.99') && !version_is_less(host['pe_ver'], '3.99'))) + end + + # Runs puppet on all nodes, unless they have the roles: master,database,console/dashboard + # @param [Array<Host>] hosts The sorted hosts to install or upgrade PE on + def run_puppet_on_non_infrastructure_nodes(all_hosts) + pe_infrastructure = select_hosts({:roles => ['master', 'compile_master', 'dashboard', 'database']}, all_hosts) + non_infrastructure = all_hosts.reject{|host| pe_infrastructure.include? host} + on non_infrastructure, puppet_agent('-t'), :acceptable_exit_codes => [0,2], :run_in_parallel => true end # True if version is greater than or equal to MEEP_CLASSIFICATION_VERSION # (PE-18718) AND the temporary feature flag is true. #