Bug 1418386 - sometimes parallel builds start before serial builds complete with policy change to parallel
Summary: sometimes parallel builds start before serial builds complete with policy cha...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: OKD
Classification: Red Hat
Component: Build
Version: 3.x
Hardware: Unspecified
OS: Unspecified
unspecified
low
Target Milestone: ---
: 3.x
Assignee: Ben Parees
QA Contact: Wenjing Zheng
URL:
Whiteboard: online_3.4.1
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-02-01 17:16 UTC by Aleksandar Kostadinov
Modified: 2017-11-10 21:34 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-11-10 21:34:08 UTC
Target Upstream Version:


Attachments (Terms of Use)

Description Aleksandar Kostadinov 2017-02-01 17:16:26 UTC
Description of problem:
Sometimes builds are run out of order.

> $  oc get builds --namespace=03d3u
> NAME                 TYPE      FROM          STATUS      STARTED              DURATION
> ruby-hello-world-1   Source    Git@e79d887   Cancelled   6 minutes ago        23s
> ruby-hello-world-2   Source    Git@e79d887   Cancelled   4 minutes ago        12s
> ruby-hello-world-3   Source    Git           New                              
> ruby-hello-world-4   Source    Git@e79d887   Running     About a minute ago   1m56s
> ruby-hello-world-5   Source    Git@e79d887   Running     About a minute ago   1m53s
> ruby-hello-world-6   Source    Git@e79d887   Running     About a minute ago   1m57s

Version-Release number of selected component (if applicable):
STG 3.4.1.2

How reproducible:
often

Steps to Reproduce:
1. oc new-build openshift/ruby~https://github.com/openshift/ruby-hello-world
2. oc start-build bc/ruby-hello-world # 3 times
3. oc patch bc/ruby-hello-world -p '{"spec":{"runPolicy":"Parallel"}}'
4. oc start-build bc/ruby-hello-world # 3 times
5. oc get build -w

Actual results:
see above, parallel builds may kick in before a serial build

Expected results:
parallel builds wait for serial builds to complete

Comment 1 Aleksandar Kostadinov 2017-02-01 17:28:03 UTC
Actually I could not reproduce when builds execute and complete normally. If after step #4 though, I issue the command

> oc cancel-build ruby-hello-world-1

then builds could end up like:

> NAME                 TYPE      FROM          STATUS	 STARTED	  DURATI
ON
> ruby-hello-world-1   Source    Git@e79d887   Cancelled   2 minutes ago    36s
> ruby-hello-world-2   Source    Git           New
> ruby-hello-world-3   Source    Git           New
> ruby-hello-world-4   Source    Git           Pending
> ruby-hello-world-5   Source    Git           Pending
> ruby-hello-world-6   Source    Git@e79d887   Running     10 seconds ago   9s

So it appears to be related to canceling build. Or that just makes it easier to reproduce. If the issue does not manifest after canceling first build, then it can manifest after second build is canceled.

Comment 2 Ben Parees 2017-02-01 19:58:33 UTC
This was fixed by https://github.com/openshift/origin/pull/12699

Comment 4 Aleksandar Kostadinov 2017-07-06 13:49:33 UTC
Can't reproduce anymore with v3.6.135


Note You need to log in before you can comment on or make changes to this bug.