Bug 1357791 - "oc replace" of buildConfig reset "lastVersion" to 0
Summary: "oc replace" of buildConfig reset "lastVersion" to 0
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Build
Version: 3.2.0
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ---
: ---
Assignee: Ben Parees
QA Contact: Wang Haoran
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-07-19 07:49 UTC by Alexander Koksharov
Modified: 2019-12-16 06:08 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Cause: Updates to a build config via the replace mechanism would reset the build sequence count to zero if no value was specified in the update. Consequence: Builds would fail to start if the reset sequence number caused collisions with existing builds that used those the sequence number previously. Fix: Do not reset the sequence number during updates to the buildconfig. Result: Buildconfigs can be updated and the existing sequence number is preserved, so new builds do not collide with previously used sequence numbers.
Clone Of:
Environment:
Last Closed: 2016-09-27 09:40:56 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2016:1933 0 normal SHIPPED_LIVE Red Hat OpenShift Container Platform 3.3 Release Advisory 2016-09-27 13:24:36 UTC

Description Alexander Koksharov 2016-07-19 07:49:23 UTC
Description of problem:
When I do a replace of bc which has existing builds, e.g. oc replace -f java8-buildconfig.yaml 
The next time a build is triggered or started it complains that build '1' already exists.
I have to click "Start Build" until the build number increments to the next free number.  This is crazy slow when lots of builds.
Please can you have OS check for build when object is replaced and select the next available one - not start back at 1?

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

How reproducible:
- execute few builds
- do "oc replace" for build congif
- execute build again

Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Comment 1 Cesar Wong 2016-07-19 14:26:34 UTC
This should be fixed with a separate status resource for build configs.

Comment 2 Cesar Wong 2016-07-19 14:39:44 UTC
Reassigning to you Ben since you may have fixed it already.

Comment 3 Ben Parees 2016-07-19 17:37:04 UTC
This was fixed here:
https://github.com/openshift/origin/pull/9568

Comment 4 Ben Parees 2016-07-19 17:37:35 UTC
and it's not something i think we'd backport, so the fix will be in 3.3.

Comment 5 XiuJuan Wang 2016-07-20 03:24:41 UTC
oc v3.3.0.6
kubernetes v1.3.0+57fb9ac

When replace bc lastVersion to an older version than existing builds, the cli will prompt successfully. 
But lastVersion will not be changed.And could trigger new builds with available build numbers.
Move this bug as verified.

Comment 7 errata-xmlrpc 2016-09-27 09:40:56 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2016:1933


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