Use new devstack-logs publisher
Instead of pasting all the logs onto the console, we can now have them saved seperately by the devstack-logs publisher. Add "|| true" rescue commands to the chef-client invocations, so that rake will continue to run through to the save_logs even if the chef run fails. Change-Id: I475509d770e90da38ba76d4fe126d6610ef280e2
This commit is contained in:
parent
ac62f09c96
commit
fbbc2c01eb
19
Rakefile
19
Rakefile
@ -150,6 +150,15 @@ def _setup_cinder_volume # rubocop:disable Metrics/MethodLength
|
||||
)
|
||||
end
|
||||
|
||||
def _save_logs(prefix)
|
||||
sh %(sleep 25)
|
||||
%w(nova neutron keystone cinder glance heat).each do |project|
|
||||
sh %(mkdir -p logs/#{prefix}/#{project})
|
||||
sh %(sudo cp -r /etc/#{project} logs/#{prefix}/#{project}/etc)
|
||||
sh %(sudo cp -r /var/log/#{project} logs/#{prefix}/#{project}/log)
|
||||
end
|
||||
end
|
||||
|
||||
desc "Integration test on Infra"
|
||||
task :integration => [:create_key, :berks_vendor] do
|
||||
# This is a workaround for allowing chef-client to run in local mode
|
||||
@ -160,15 +169,13 @@ task :integration => [:create_key, :berks_vendor] do
|
||||
for i in 1..3
|
||||
puts "####### Pass #{i}"
|
||||
# Kick off chef client in local mode, will converge OpenStack right on the gate job "in place"
|
||||
sh %(sudo chef-client #{client_opts} -E integration-aio-neutron -r 'role[allinone-compute]','role[os-image-upload]','recipe[openstack-integration-test::setup]')
|
||||
sh %(sudo chef-client #{client_opts} -E integration-aio-neutron -r 'role[allinone-compute]','role[os-image-upload]','recipe[openstack-integration-test::setup]' || true)
|
||||
_save_logs("pass#{i}")
|
||||
_setup_local_network if i == 1
|
||||
_run_basic_queries
|
||||
_setup_cinder_volume
|
||||
_run_nova_tests
|
||||
end
|
||||
# Run the tempest formal tests, setup with the openstack-integration-test cookbook
|
||||
Dir.chdir('/opt/tempest') do
|
||||
sh %(sudo ./run_tests.sh)
|
||||
end
|
||||
# TODO (MRV) gather logs
|
||||
|
||||
sh %(sudo chown -R $USER logs)
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user