Hello community, here is the log from the commit of package openQA for openSUSE:Factory checked in at 2018-03-04 12:51:47 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/openQA (Old) and /work/SRC/openSUSE:Factory/.openQA.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "openQA" Sun Mar 4 12:51:47 2018 rev:13 rq:582130 version:4.5.1519929327.f726adcc Changes: -------- --- /work/SRC/openSUSE:Factory/openQA/openQA.changes 2018-02-20 17:59:16.437394394 +0100 +++ /work/SRC/openSUSE:Factory/.openQA.new/openQA.changes 2018-03-04 12:52:20.776154368 +0100 @@ -1,0 +2,17 @@ +Sat Mar 03 05:29:00 UTC 2018 - co...@suse.com + +- Update to version 4.5.1519929327.f726adcc: + * Enable wrapping cells in overview table (#1591) + * Perltidy + * Protect during collected unsubscription + * Prevent to determine job status from collected event when timout expires + * Remove check backend timer + * Fix check_backend detection + * cpanfile: require at least Mojo::IOLoop::ReadWriteProcess 0.19 + * Adapt jobs tests - we are not dying anymore + * Don't fear the (sub)reaper + * Add AMQP doc + * Lock tidy version + * Make prove verbose + +------------------------------------------------------------------- Old: ---- openQA-4.5.1519128406.810fb68b.tar.xz New: ---- openQA-4.5.1519929327.f726adcc.tar.xz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ openQA.spec ++++++ --- /var/tmp/diff_new_pack.m948Lj/_old 2018-03-04 12:52:22.248100731 +0100 +++ /var/tmp/diff_new_pack.m948Lj/_new 2018-03-04 12:52:22.248100731 +0100 @@ -36,7 +36,7 @@ # runtime requirements that also the testsuite needs %define t_requires perl(DBD::Pg) perl(DBIx::Class) perl(Config::IniFiles) perl(SQL::Translator) perl(Date::Format) perl(File::Copy::Recursive) perl(DateTime::Format::Pg) perl(Net::OpenID::Consumer) perl(Mojolicious::Plugin::RenderFile) perl(Mojolicious::Plugin::AssetPack) perl(aliased) perl(Config::Tiny) perl(DBIx::Class::DynamicDefault) perl(DBIx::Class::Schema::Config) perl(DBIx::Class::Storage::Statistics) perl(IO::Socket::SSL) perl(Data::Dump) perl(DBIx::Class::OptimisticLocking) perl(Text::Markdown) perl(Net::DBus) perl(IPC::Run) perl(Archive::Extract) perl(CSS::Minifier::XS) perl(JavaScript::Minifier::XS) perl(Time::ParseDate) perl(Sort::Versions) perl(Mojo::RabbitMQ::Client) perl(BSD::Resource) perl(Cpanel::JSON::XS) perl(Pod::POM) perl(Mojo::IOLoop::ReadWriteProcess) Name: openQA -Version: 4.5.1519128406.810fb68b +Version: 4.5.1519929327.f726adcc Release: 0 Summary: The openQA web-frontend, scheduler and tools License: GPL-2.0+ ++++++ openQA-4.5.1519128406.810fb68b.tar.xz -> openQA-4.5.1519929327.f726adcc.tar.xz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/openQA-4.5.1519128406.810fb68b/Makefile new/openQA-4.5.1519929327.f726adcc/Makefile --- old/openQA-4.5.1519128406.810fb68b/Makefile 2018-02-20 13:06:46.000000000 +0100 +++ new/openQA-4.5.1519929327.f726adcc/Makefile 2018-03-01 19:35:27.000000000 +0100 @@ -1,4 +1,4 @@ -PROVE_ARGS ?= -r +PROVE_ARGS ?= -r -v .PHONY: all all: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/openQA-4.5.1519128406.810fb68b/assets/stylesheets/overview.scss new/openQA-4.5.1519929327.f726adcc/assets/stylesheets/overview.scss --- old/openQA-4.5.1519128406.810fb68b/assets/stylesheets/overview.scss 2018-02-20 13:06:46.000000000 +0100 +++ new/openQA-4.5.1519929327.f726adcc/assets/stylesheets/overview.scss 2018-03-01 19:35:27.000000000 +0100 @@ -12,10 +12,6 @@ .table.overview { table-layout: fixed; - - td { - white-space: nowrap; - } } #summary .badge { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/openQA-4.5.1519128406.810fb68b/cpanfile new/openQA-4.5.1519929327.f726adcc/cpanfile --- old/openQA-4.5.1519128406.810fb68b/cpanfile 2018-02-20 13:06:46.000000000 +0100 +++ new/openQA-4.5.1519929327.f726adcc/cpanfile 2018-03-01 19:35:27.000000000 +0100 @@ -48,7 +48,7 @@ requires 'Mojo::Base'; requires 'Mojo::ByteStream'; requires 'Mojo::IOLoop'; -requires 'Mojo::IOLoop::ReadWriteProcess'; +requires 'Mojo::IOLoop::ReadWriteProcess', '0.19'; requires 'Mojo::JSON'; requires 'Mojo::RabbitMQ::Client'; requires 'Mojo::URL'; @@ -91,7 +91,7 @@ on 'test' => sub { requires 'Perl::Critic'; - requires 'Perl::Tidy', '>= 20171214'; + requires 'Perl::Tidy', '>= 20180101, != 20180219'; requires 'Selenium::Remote::Driver', '>= 1.23'; requires 'Test::Compile'; requires 'Test::Fatal'; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/openQA-4.5.1519128406.810fb68b/docs/Installing.asciidoc new/openQA-4.5.1519929327.f726adcc/docs/Installing.asciidoc --- old/openQA-4.5.1519128406.810fb68b/docs/Installing.asciidoc 2018-02-20 13:06:46.000000000 +0100 +++ new/openQA-4.5.1519929327.f726adcc/docs/Installing.asciidoc 2018-03-01 19:35:27.000000000 +0100 @@ -404,6 +404,35 @@ mount -t nfs openQA-webUI-host:/var/lib/openqa/share /var/lib/openqa/share -------------------------------------------------------------------------------- +=== Configuring AMQP message emission + +You can configure openQA to send events (new comments, tests finished, …) +to an AMQP message bus. +The messages consist of a topic and a body. +The body contains json encoded info about the event. +See https://github.com/openSUSE/suse_msg/blob/master/amqp_infra.md[amqp_infra.md] +for more info about the server and the message topic format. +There you will find instructions how to configure the AMQP server as well. + +To let openQA send messages to an AMQP message bus, +first make sure that the +perl-Mojo-RabbitMQ-Client+ RPM is installed. +Then you will need to configure amqp in +/etc/openqa/openqa.ini+: + +[source,ini] +-------------------------------------------------------------------------------- +# Configuration for AMQP plugin +[amqp] +heartbeat_timeout = 60 +reconnect_timeout = 5 +# guest/guest is the default anonymous user/pass for RabbitMQ +url = amqp://guest:guest@localhost:5672/ +exchange = pubsub +topic_prefix = suse +-------------------------------------------------------------------------------- + +For a TLS connection use +amqps://+ and port +5671+. + + === Configuring worker to use more than one openQA server When there are multiple openQA web interfaces (openQA instances) available a worker diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/openQA-4.5.1519128406.810fb68b/lib/OpenQA/Scheduler/Scheduler.pm new/openQA-4.5.1519929327.f726adcc/lib/OpenQA/Scheduler/Scheduler.pm --- old/openQA-4.5.1519128406.810fb68b/lib/OpenQA/Scheduler/Scheduler.pm 2018-02-20 13:06:46.000000000 +0100 +++ new/openQA-4.5.1519929327.f726adcc/lib/OpenQA/Scheduler/Scheduler.pm 2018-03-01 19:35:27.000000000 +0100 @@ -507,7 +507,7 @@ my $not_applying_jobs = schema->resultset("JobSettings")->search( { - job_id => {-in => $scheduled->as_query}, + job_id => {-in => $scheduled->as_query}, key => 'WORKER_CLASS', value => {-not_in => \@classes}, }, diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/openQA-4.5.1519128406.810fb68b/lib/OpenQA/Schema/Result/JobGroups.pm new/openQA-4.5.1519929327.f726adcc/lib/OpenQA/Schema/Result/JobGroups.pm --- old/openQA-4.5.1519128406.810fb68b/lib/OpenQA/Schema/Result/JobGroups.pm 2018-02-20 13:06:46.000000000 +0100 +++ new/openQA-4.5.1519929327.f726adcc/lib/OpenQA/Schema/Result/JobGroups.pm 2018-03-01 19:35:27.000000000 +0100 @@ -193,8 +193,8 @@ # filter out linked jobs my $expired_jobs = $self->jobs->search( - {BUILD => {-not_in => $important_builds}, t_finished => $timecond, text => {like => 'label:linked%'}}, - {order_by => 'me.id', join => 'comments'}); + {BUILD => {-not_in => $important_builds}, t_finished => $timecond, text => {like => 'label:linked%'}}, + {order_by => 'me.id', join => 'comments'}); my @linked_jobs = map { $_->id } $expired_jobs->all; push(@ors, {BUILD => {-not_in => $important_builds}, t_finished => $timecond, id => {-not_in => \@linked_jobs}}); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/openQA-4.5.1519128406.810fb68b/lib/OpenQA/WebAPI/Controller/API/V1/Mm.pm new/openQA-4.5.1519929327.f726adcc/lib/OpenQA/WebAPI/Controller/API/V1/Mm.pm --- old/openQA-4.5.1519128406.810fb68b/lib/OpenQA/WebAPI/Controller/API/V1/Mm.pm 2018-02-20 13:06:46.000000000 +0100 +++ new/openQA-4.5.1519929327.f726adcc/lib/OpenQA/WebAPI/Controller/API/V1/Mm.pm 2018-03-01 19:35:27.000000000 +0100 @@ -86,7 +86,7 @@ my @res = $self->db->resultset('Jobs')->search( {'parents.parent_job_id' => $jobid, 'parents.dependency' => OpenQA::Schema::Result::JobDependencies::PARALLEL}, - {columns => ['id', 'state'], join => 'parents'}); + {columns => ['id', 'state'], join => 'parents'}); my %res_ids = map { ($_->id, $_->state) } @res; return $self->render(json => {jobs => \%res_ids}, status => 200); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/openQA-4.5.1519128406.810fb68b/lib/OpenQA/WebAPI/Controller/API/V1/Table.pm new/openQA-4.5.1519929327.f726adcc/lib/OpenQA/WebAPI/Controller/API/V1/Table.pm --- old/openQA-4.5.1519128406.810fb68b/lib/OpenQA/WebAPI/Controller/API/V1/Table.pm 2018-02-20 13:06:46.000000000 +0100 +++ new/openQA-4.5.1519929327.f726adcc/lib/OpenQA/WebAPI/Controller/API/V1/Table.pm 2018-03-01 19:35:27.000000000 +0100 @@ -60,21 +60,21 @@ my %tables = ( Machines => { - keys => [['id'], ['name'],], - cols => ['id', 'name', 'backend', 'description'], + keys => [['id'], ['name'],], + cols => ['id', 'name', 'backend', 'description'], required => ['name', 'backend'], defaults => {description => undef}, }, TestSuites => { - keys => [['id'], ['name'],], + keys => [['id'], ['name'],], cols => ['id', 'name', 'description'], required => ['name'], defaults => {description => undef}, }, Products => { - keys => [['id'], ['distri', 'version', 'arch', 'flavor'],], - cols => ['id', 'distri', 'version', 'arch', 'flavor', 'description'], - required => ['distri', 'version', 'arch', 'flavor'], + keys => [['id'], ['distri', 'version', 'arch', 'flavor'],], + cols => ['id', 'distri', 'version', 'arch', 'flavor', 'description'], + required => ['distri', 'version', 'arch', 'flavor'], defaults => {description => "", name => ""}, }, ); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/openQA-4.5.1519128406.810fb68b/lib/OpenQA/WebAPI/Controller/Admin/Workers.pm new/openQA-4.5.1519929327.f726adcc/lib/OpenQA/WebAPI/Controller/Admin/Workers.pm --- old/openQA-4.5.1519128406.810fb68b/lib/OpenQA/WebAPI/Controller/Admin/Workers.pm 2018-02-20 13:06:46.000000000 +0100 +++ new/openQA-4.5.1519929327.f726adcc/lib/OpenQA/WebAPI/Controller/Admin/Workers.pm 2018-03-01 19:35:27.000000000 +0100 @@ -77,7 +77,7 @@ [qw(passed_module_count softfailed_module_count failed_module_count)], qw(id) ], initial_conds => [{assigned_worker_id => $self->param('worker_id')}], - additional_params => {prefetch => [qw(children parents)]}, + additional_params => {prefetch => [qw(children parents)]}, prepare_data_function => sub { my ($results) = @_; my @jobs = $results->all; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/openQA-4.5.1519128406.810fb68b/lib/OpenQA/Worker/Common.pm new/openQA-4.5.1519929327.f726adcc/lib/OpenQA/Worker/Common.pm --- old/openQA-4.5.1519128406.810fb68b/lib/OpenQA/Worker/Common.pm 2018-02-20 13:06:46.000000000 +0100 +++ new/openQA-4.5.1519929327.f726adcc/lib/OpenQA/Worker/Common.pm 2018-03-01 19:35:27.000000000 +0100 @@ -86,8 +86,6 @@ check_job => undef, # update status of running job update_status => undef, - # check for crashed backend and its running status - check_backend => undef, # trigger stop_job if running for > $max_job_time job_timeout => undef, # app call retry diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/openQA-4.5.1519128406.810fb68b/lib/OpenQA/Worker/Engines/isotovideo.pm new/openQA-4.5.1519929327.f726adcc/lib/OpenQA/Worker/Engines/isotovideo.pm --- old/openQA-4.5.1519128406.810fb68b/lib/OpenQA/Worker/Engines/isotovideo.pm 2018-02-20 13:06:46.000000000 +0100 +++ new/openQA-4.5.1519929327.f726adcc/lib/OpenQA/Worker/Engines/isotovideo.pm 2018-03-01 19:35:27.000000000 +0100 @@ -31,6 +31,7 @@ use Time::HiRes 'sleep'; use IO::Handle; use Mojo::IOLoop::ReadWriteProcess 'process'; +use Mojo::IOLoop::ReadWriteProcess::Session 'session'; my $isotovideo = "/usr/bin/isotovideo"; my $workerpid; @@ -125,12 +126,25 @@ sub engine_workit { my ($job) = @_; + session->enable; + session->reset; + session->enable_subreaper; + my ($sysname, $hostname, $release, $version, $machine) = POSIX::uname(); log_info('+++ setup notes +++', channels => 'autoinst'); log_info(sprintf("start time: %s", strftime("%F %T", gmtime)), channels => 'autoinst'); log_info(sprintf("running on $hostname:%d ($sysname $release $version $machine)", $instance), channels => 'autoinst'); + log_error("Failed enabling subreaper mode", channels => 'autoinst') unless session->subreaper; + + session->on( + collected_orphan => sub { + my ($session, $p) = @_; + log_info("Collected unknown process with pid " . $p->pid . " and exit status: " . $p->exit_status, + channels => 'autoinst'); + }); + # set base dir to the one assigned with webui OpenQA::Utils::change_sharedir($hosts->{$current_host}{dir}); @@ -177,20 +191,17 @@ $shared_cache = catdir($worker_settings->{CACHEDIRECTORY}, $host_to_cache); $vars{PRJDIR} = $shared_cache; - my $rsync = process(sub { cache_tests($shared_cache, $hosts->{$current_host}{testpoolserver}) }); - $rsync->set_pipes(0); - $rsync->start; - + my $rsync = process(sub { cache_tests($shared_cache, $hosts->{$current_host}{testpoolserver}) })->start; my $last_update = time; - while ($rsync->is_running) { - sleep .5; + while (defined(my $line = $rsync->getline)) { + log_info("rsync: " . $line, channels => 'autoinst'); if (time - $last_update > 5) { update_setup_status; $last_update = time; } } - $rsync->stop; + $rsync->wait_stop; return {error => "Failed to rsync tests: exit " . $rsync->exit_status} unless $rsync->exit_status == 0; @@ -216,8 +227,7 @@ mkdir($tmpdir) unless (-d $tmpdir); my $child = process( - code => sub { - + sub { setpgrp(0, 0); $ENV{TMPDIR} = $tmpdir; log_info("$$: WORKING " . $job->{id}); @@ -233,15 +243,23 @@ exec "perl", "$isotovideo", '-d'; die "exec failed: $!\n"; + }); + + $child->on( + collected => sub { + my $self = shift; + log_info("Isotovideo exit status: " . $self->exit_status, channels => 'autoinst'); + if ($self->exit_status != 0) { + OpenQA::Worker::Jobs::stop_job('died'); + } + else { + OpenQA::Worker::Jobs::stop_job('done'); + } + }); - }, - set_pipes => 0, - internal_pipes => 0, - blocking_stop => 1, - max_kill_attempts => 1, - _default_kill_signal => -POSIX::SIGTERM()); + $child->_default_kill_signal(-POSIX::SIGTERM())->_default_blocking_signal(-POSIX::SIGKILL()); + $child->set_pipes(0)->internal_pipes(0)->blocking_stop(1)->start(); - $child->start(); $workerpid = $child->pid(); return {child => $child}; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/openQA-4.5.1519128406.810fb68b/lib/OpenQA/Worker/Jobs.pm new/openQA-4.5.1519929327.f726adcc/lib/OpenQA/Worker/Jobs.pm --- old/openQA-4.5.1519128406.810fb68b/lib/OpenQA/Worker/Jobs.pm 2018-02-20 13:06:46.000000000 +0100 +++ new/openQA-4.5.1519929327.f726adcc/lib/OpenQA/Worker/Jobs.pm 2018-03-01 19:35:27.000000000 +0100 @@ -124,7 +124,6 @@ # stop all job related timers remove_timer('update_status'); - remove_timer('check_backend'); remove_timer('job_timeout'); # XXX: we need to wait if there is an update_status in progress. @@ -355,7 +354,7 @@ my $status = {uploading => 1, worker_id => $workerid}; api_call( 'post', "jobs/$job_id/status", - json => {status => $status}, + json => {status => $status}, callback => sub { _stop_job_2($aborted, $job_id); }); } @@ -449,14 +448,13 @@ $job_done = 1; } elsif ($aborted eq 'dead_children') { - log_debug('Dead children found. Launching systemd collection'); + log_debug('Dead children found.'); api_call( 'post', 'jobs/' . $job->{id} . '/set_done', params => {result => 'incomplete'}, callback => 'no' ); - die "Dead children!"; } } unless ($job_done || $aborted eq 'api-failure') { @@ -544,32 +542,21 @@ log_warning('job errored. Releasing job', channels => ['worker', 'autoinst'], default => 1); return stop_job("job run failure"); } - else { - $worker->{child}->on( - collect_status => sub { - my ($self, $status) = (@_, $?); - STDERR->printflush("collect status: $status\n"); - # TODO: deal when the job was restarted. The process is always killed. - # This is only problematic if we die, Otherwise this is just to exterminate - # all the family :-) - if ($status != 0) { - _stop_job_2('dead_children', $job->{id}); - } - }); - } - my $jobid = $job->{id}; # start updating status - slow updates if livelog is not running add_timer('update_status', STATUS_UPDATES_SLOW, \&update_status); - # start backend checks - add_timer('check_backend', 2, \&check_backend); # create job timeout timer add_timer( 'job_timeout', $job->{settings}->{MAX_JOB_TIME} || $max_job_time, sub { + # Prevent to determine status of job from exit_status + eval { + $worker->{child}->session->_protect(sub { $worker->{child}->unsubscribe('collected') }) + if $worker->{child}; + }; # abort job if it takes too long if ($job && $job->{id} eq $jobid) { log_warning("max job time exceeded, aborting $name"); @@ -913,17 +900,4 @@ return $worker->{child}->is_running; } -sub check_backend { - log_debug("checking backend state"); - - return log_debug("backend is running") if $worker->{child}->is_running(); - - if ($worker->{child}->is_running()) { - stop_job('died'); - } - else { - stop_job('done'); - } -} - 1; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/openQA-4.5.1519128406.810fb68b/t/10-jobs.t new/openQA-4.5.1519929327.f726adcc/t/10-jobs.t --- old/openQA-4.5.1519128406.810fb68b/t/10-jobs.t 2018-02-20 13:06:46.000000000 +0100 +++ new/openQA-4.5.1519929327.f726adcc/t/10-jobs.t 2018-03-01 19:35:27.000000000 +0100 @@ -526,14 +526,14 @@ sub _check_timers { my ($is_set) = @_; my $set = 0; - for my $t (qw(check_backend update_status job_timeout)) { + for my $t (qw(update_status job_timeout)) { my $timer = get_timer($t); if ($timer) { $set += 1 if Mojo::IOLoop->singleton->reactor->{timers}{$timer->[0]}; } } if ($is_set) { - is($set, 3, 'timers set'); + is($set, 2, 'timers set'); } else { is($set, 0, 'timers not set'); @@ -608,17 +608,20 @@ subtest 'check dead children stop job' => sub { sub OpenQA::Worker::Jobs::api_call { 1; } + use OpenQA::Utils; + my $log = add_log_channel('autoinst', level => 'debug', default => 'append'); + my @messages; + $log->on( + message => sub { + my ($log, $level, @lines) = @_; + push @messages, @lines; + }); $alive = 0; - my $exception = 1; - eval { - OpenQA::Worker::Jobs::_stop_job_2('dead_children'); - $exception = 0; - }; + eval { OpenQA::Worker::Jobs::_stop_job_2('dead_children'); }; - ok($exception, 'dead children got exception'); - like($@, qr/Dead children/, 'dead children match exception'); + like($messages[2], qr/result: dead_children/, 'dead children match exception'); }; done_testing(); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/openQA-4.5.1519128406.810fb68b/t/24-worker.t new/openQA-4.5.1519929327.f726adcc/t/24-worker.t --- old/openQA-4.5.1519128406.810fb68b/t/24-worker.t 2018-02-20 13:06:46.000000000 +0100 +++ new/openQA-4.5.1519929327.f726adcc/t/24-worker.t 2018-03-01 19:35:27.000000000 +0100 @@ -102,14 +102,14 @@ json => {status => 'RUNNING'}, ignore_errors => 1, tries => 1, - callback => sub { my $res = shift; is($res, undef, 'error ignored') }); + callback => sub { my $res = shift; is($res, undef, 'error ignored') }); combined_like( sub { OpenQA::Worker::Common::api_call( 'post', 'jobs/500/status', - json => {status => 'RUNNING'}, - tries => 1, + json => {status => 'RUNNING'}, + tries => 1, callback => sub { my $res = shift; is($res, undef, 'error handled'); Mojo::IOLoop->stop() }); while (Mojo::IOLoop->is_running) { Mojo::IOLoop->singleton->reactor->one_tick } }, @@ -278,7 +278,7 @@ @matches = ($stdout =~ m/\[DEBUG\] stop_job/g); ok(@matches == 1, 'Stop job log'); @matches = ($stdout =~ m/\[DEBUG\] ## removing timer/g); - ok(@matches == 3, 'Changing timer log'); + ok(@matches == 2, 'Changing timer log'); @matches = ($stdout =~ m/\[DEBUG\] waiting for update_status/g); ok(@matches == 1, 'Waiting for update status log'); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/openQA-4.5.1519128406.810fb68b/t/fixtures/01-jobs.pl new/openQA-4.5.1519929327.f726adcc/t/fixtures/01-jobs.pl --- old/openQA-4.5.1519128406.810fb68b/t/fixtures/01-jobs.pl 2018-02-20 13:06:46.000000000 +0100 +++ new/openQA-4.5.1519929327.f726adcc/t/fixtures/01-jobs.pl 2018-03-01 19:35:27.000000000 +0100 @@ -137,15 +137,15 @@ ] }, Jobs => { - id => 99937, - group_id => 1001, - priority => 35, - result => "passed", - state => "done", - t_finished => time2str('%Y-%m-%d %H:%M:%S', time - 536400, 'UTC'), # 149 hours ago - t_started => time2str('%Y-%m-%d %H:%M:%S', time - 540000, 'UTC'), # 150 hours ago - t_created => time2str('%Y-%m-%d %H:%M:%S', time - 7200, 'UTC'), # Two hours ago - TEST => "kde", + id => 99937, + group_id => 1001, + priority => 35, + result => "passed", + state => "done", + t_finished => time2str('%Y-%m-%d %H:%M:%S', time - 536400, 'UTC'), # 149 hours ago + t_started => time2str('%Y-%m-%d %H:%M:%S', time - 540000, 'UTC'), # 150 hours ago + t_created => time2str('%Y-%m-%d %H:%M:%S', time - 7200, 'UTC'), # Two hours ago + TEST => "kde", jobs_assets => [{asset_id => 1},], retry_avbl => 3, ARCH => 'i586', @@ -291,15 +291,15 @@ # Four hours ago t_started => time2str('%Y-%m-%d %H:%M:%S', time - 14400, 'UTC'), # Two hours ago - t_created => time2str('%Y-%m-%d %H:%M:%S', time - 7200, 'UTC'), - TEST => "textmode", - ARCH => 'i586', - FLAVOR => 'DVD', - DISTRI => 'opensuse', - BUILD => '0091', - VERSION => '13.1', - MACHINE => '32bit', - backend => 'qemu', + t_created => time2str('%Y-%m-%d %H:%M:%S', time - 7200, 'UTC'), + TEST => "textmode", + ARCH => 'i586', + FLAVOR => 'DVD', + DISTRI => 'opensuse', + BUILD => '0091', + VERSION => '13.1', + MACHINE => '32bit', + backend => 'qemu', jobs_assets => [{asset_id => 1}, {asset_id => 5}], retry_avbl => 3, result_dir => '00099946-opensuse-13.1-DVD-i586-Build0091-textmode', @@ -314,23 +314,23 @@ ] }, Jobs => { - id => 99945, - group_id => 1001, - clone_id => 99946, - priority => 35, - result => "passed", - state => "done", - backend => 'qemu', - t_finished => time2str('%Y-%m-%d %H:%M:%S', time - 14400, 'UTC'), # Four hour ago - t_started => time2str('%Y-%m-%d %H:%M:%S', time - 18000, 'UTC'), # Five hours ago - t_created => time2str('%Y-%m-%d %H:%M:%S', time - 7200, 'UTC'), # Two hours ago - TEST => "textmode", - FLAVOR => 'DVD', - DISTRI => 'opensuse', - BUILD => '0091', - VERSION => '13.1', - MACHINE => '32bit', - ARCH => 'i586', + id => 99945, + group_id => 1001, + clone_id => 99946, + priority => 35, + result => "passed", + state => "done", + backend => 'qemu', + t_finished => time2str('%Y-%m-%d %H:%M:%S', time - 14400, 'UTC'), # Four hour ago + t_started => time2str('%Y-%m-%d %H:%M:%S', time - 18000, 'UTC'), # Five hours ago + t_created => time2str('%Y-%m-%d %H:%M:%S', time - 7200, 'UTC'), # Two hours ago + TEST => "textmode", + FLAVOR => 'DVD', + DISTRI => 'opensuse', + BUILD => '0091', + VERSION => '13.1', + MACHINE => '32bit', + ARCH => 'i586', jobs_assets => [{asset_id => 1},], retry_avbl => 3, settings => [ @@ -342,23 +342,23 @@ {key => 'ISO_MAXSIZE', value => '4700372992'}] }, Jobs => { - id => 99944, - group_id => 1001, - clone_id => 99945, - priority => 35, - result => "softfailed", - state => "done", - backend => 'qemu', - t_finished => time2str('%Y-%m-%d %H:%M:%S', time - 14400, 'UTC'), # Four hours ago - t_started => time2str('%Y-%m-%d %H:%M:%S', time - 18000, 'UTC'), # Five hours ago - t_created => time2str('%Y-%m-%d %H:%M:%S', time - 7200, 'UTC'), # Two hours ago - TEST => "textmode", - FLAVOR => 'DVD', - DISTRI => 'opensuse', - BUILD => '0091', - VERSION => '13.1', - MACHINE => '32bit', - ARCH => 'i586', + id => 99944, + group_id => 1001, + clone_id => 99945, + priority => 35, + result => "softfailed", + state => "done", + backend => 'qemu', + t_finished => time2str('%Y-%m-%d %H:%M:%S', time - 14400, 'UTC'), # Four hours ago + t_started => time2str('%Y-%m-%d %H:%M:%S', time - 18000, 'UTC'), # Five hours ago + t_created => time2str('%Y-%m-%d %H:%M:%S', time - 7200, 'UTC'), # Two hours ago + TEST => "textmode", + FLAVOR => 'DVD', + DISTRI => 'opensuse', + BUILD => '0091', + VERSION => '13.1', + MACHINE => '32bit', + ARCH => 'i586', jobs_assets => [{asset_id => 1},], retry_avbl => 3, settings => [ @@ -370,22 +370,22 @@ {key => 'ISO_MAXSIZE', value => '4700372992'}] }, Jobs => { - id => 99947, - group_id => 1001, - priority => 35, - result => "passed", - state => "done", - backend => 'qemu', - t_finished => time2str('%Y-%m-%d %H:%M:%S', time - 7200, 'UTC'), # Two hours ago - t_started => time2str('%Y-%m-%d %H:%M:%S', time - 14300, 'UTC'), # Three hours ago - t_created => time2str('%Y-%m-%d %H:%M:%S', time - 3600, 'UTC'), # One hour ago - TEST => "textmode", - FLAVOR => 'DVD', - DISTRI => 'opensuse', - BUILD => '0092', - VERSION => '13.1', - MACHINE => '32bit', - ARCH => 'i586', + id => 99947, + group_id => 1001, + priority => 35, + result => "passed", + state => "done", + backend => 'qemu', + t_finished => time2str('%Y-%m-%d %H:%M:%S', time - 7200, 'UTC'), # Two hours ago + t_started => time2str('%Y-%m-%d %H:%M:%S', time - 14300, 'UTC'), # Three hours ago + t_created => time2str('%Y-%m-%d %H:%M:%S', time - 3600, 'UTC'), # One hour ago + TEST => "textmode", + FLAVOR => 'DVD', + DISTRI => 'opensuse', + BUILD => '0092', + VERSION => '13.1', + MACHINE => '32bit', + ARCH => 'i586', jobs_assets => [{asset_id => 1},], retry_avbl => 3, settings => [ @@ -397,21 +397,21 @@ {key => 'ISO_MAXSIZE', value => '4700372992'}] }, Jobs => { - id => 99963, - group_id => 1001, - priority => 35, - result => "none", - state => "running", - t_finished => undef, - t_started => time2str('%Y-%m-%d %H:%M:%S', time - 600, 'UTC'), # 10 minutes ago - t_created => time2str('%Y-%m-%d %H:%M:%S', time - 7200, 'UTC'), # Two hours ago - TEST => "kde", - BUILD => '0091', - DISTRI => 'opensuse', - FLAVOR => 'DVD', - MACHINE => '64bit', - VERSION => '13.1', - backend => 'qemu', + id => 99963, + group_id => 1001, + priority => 35, + result => "none", + state => "running", + t_finished => undef, + t_started => time2str('%Y-%m-%d %H:%M:%S', time - 600, 'UTC'), # 10 minutes ago + t_created => time2str('%Y-%m-%d %H:%M:%S', time - 7200, 'UTC'), # Two hours ago + TEST => "kde", + BUILD => '0091', + DISTRI => 'opensuse', + FLAVOR => 'DVD', + MACHINE => '64bit', + VERSION => '13.1', + backend => 'qemu', jobs_assets => [{asset_id => 2},], retry_avbl => 3, ARCH => 'x86_64', @@ -424,22 +424,22 @@ result_dir => '00099963-opensuse-13.1-DVD-x86_64-Build0091-kde', }, Jobs => { - id => 99962, - group_id => 1001, - clone_id => 99963, - priority => 35, - result => "failed", - state => "done", - t_finished => time2str('%Y-%m-%d %H:%M:%S', time - 10800, 'UTC'), # Three hour ago - t_started => time2str('%Y-%m-%d %H:%M:%S', time - 14400, 'UTC'), # Four hours ago - t_created => time2str('%Y-%m-%d %H:%M:%S', time - 7200, 'UTC'), # Two hours ago - TEST => "kde", - BUILD => '0091', - DISTRI => 'opensuse', - FLAVOR => 'DVD', - MACHINE => '64bit', - VERSION => '13.1', - backend => 'qemu', + id => 99962, + group_id => 1001, + clone_id => 99963, + priority => 35, + result => "failed", + state => "done", + t_finished => time2str('%Y-%m-%d %H:%M:%S', time - 10800, 'UTC'), # Three hour ago + t_started => time2str('%Y-%m-%d %H:%M:%S', time - 14400, 'UTC'), # Four hours ago + t_created => time2str('%Y-%m-%d %H:%M:%S', time - 7200, 'UTC'), # Two hours ago + TEST => "kde", + BUILD => '0091', + DISTRI => 'opensuse', + FLAVOR => 'DVD', + MACHINE => '64bit', + VERSION => '13.1', + backend => 'qemu', jobs_assets => [{asset_id => 2},], retry_avbl => 3, ARCH => 'x86_64', @@ -460,14 +460,14 @@ t_finished => time2str('%Y-%m-%d %H:%M:%S', time - 3000100, 'UTC'), t_started => undef, # Two hours ago - t_created => time2str('%Y-%m-%d %H:%M:%S', time - 7200, 'UTC'), - TEST => "RAID0", - VERSION => '13.1', - ARCH => 'i686', - FLAVOR => 'GNOME-Live', - MACHINE => '32bit', - BUILD => '0091', - DISTRI => 'opensuse', + t_created => time2str('%Y-%m-%d %H:%M:%S', time - 7200, 'UTC'), + TEST => "RAID0", + VERSION => '13.1', + ARCH => 'i686', + FLAVOR => 'GNOME-Live', + MACHINE => '32bit', + BUILD => '0091', + DISTRI => 'opensuse', jobs_assets => [{asset_id => 3},], retry_avbl => 3, settings => [ @@ -492,14 +492,14 @@ # 10 minutes ago t_started => time2str('%Y-%m-%d %H:%M:%S', time - 600, 'UTC'), # Two hours ago - t_created => time2str('%Y-%m-%d %H:%M:%S', time - 7200, 'UTC'), - TEST => "kde", - ARCH => 'x86_64', - BUILD => '0091', - DISTRI => 'opensuse', - FLAVOR => 'NET', - MACHINE => '64bit', - VERSION => '13.1', + t_created => time2str('%Y-%m-%d %H:%M:%S', time - 7200, 'UTC'), + TEST => "kde", + ARCH => 'x86_64', + BUILD => '0091', + DISTRI => 'opensuse', + FLAVOR => 'NET', + MACHINE => '64bit', + VERSION => '13.1', jobs_assets => [{asset_id => 2}, {asset_id => 6},], retry_avbl => 3, result_dir => '00099961-opensuse-13.1-DVD-x86_64-Build0091-kde',