Bug 1119755

Summary: Stuck build taks
Product: [Community] Copr Reporter: Miroslav Suchý <msuchy>
Component: frontendAssignee: Adam Samalik <asamalik>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: unspecified   
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-07-15 12:55:54 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Miroslav Suchý 2014-07-15 12:45:05 UTC
Description of problem:
I see in db:
coprdb=# select * from build where copr_id=393 and pkgs like '%libsolv%' and canceled = False;
  id  |                                                          pkgs                                                          | canceled | repos |
 submitted_on | started_on |  ended_on  |                                results                                 | memory_reqs | timeout | user_id 
| copr_id | pkg_version | built_packages 
------+------------------------------------------------------------------------------------------------------------------------+----------+-------+
--------------+------------+------------+------------------------------------------------------------------------+-------------+---------+---------
+---------+-------------+----------------
 9072 | http://kojipkgs.fedoraproject.org/packages/libsolv/0.6.0/0.git05baf54.fc21/src/libsolv-0.6.0-0.git05baf54.fc21.src.rpm | f        |       |
   1397474647 | 1397474715 | 1397474993 | http://copr-be.cloud.fedoraproject.org/results/rhughes/f20-gnome-3-12/ |        2048 |       0 |     246 
|     393 |             | 
(1 row)

coprdb=# select * from build_chroot where build_id=9072;
 mock_chroot_id | build_id | status 
----------------+----------+--------
             11 |     9072 |      1
             12 |     9072 |      1


This task is in state "pending" and never picked up (waiting there for weeks).

Version-Release number of selected component (if applicable):
copr-frontend-1.39-1.fc20.noarch

Comment 1 Adam Samalik 2014-07-15 12:55:54 UTC
This happened previously when the build was cancelled and Copr didn't mark the builds in build_chroot table as cancelled. This has already been fixed before and we run a query on the database to fix states which had been left.

Comment 2 Miroslav Suchý 2014-07-15 13:07:44 UTC
For record: This fixed the leftovers:
coprdb=# update build_chroot set status=2 where status=4 and build_id in (select id from build where canceled=True);
UPDATE 254