Bug 1307013

Summary: Deployment fails if "replicas" is set to 0.
Product: OpenShift Container Platform Reporter: Alexander Koksharov <akokshar>
Component: openshift-controller-managerAssignee: Dan Mace <dmace>
Status: CLOSED ERRATA QA Contact: zhou ying <yinzhou>
Severity: high Docs Contact:
Priority: medium    
Version: 3.1.0CC: aos-bugs, pep, tdawson
Target Milestone: ---Keywords: Reopened
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: v3.1.1.901 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-05-12 16:28:52 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:
Bug Depends On:    
Bug Blocks: 1267746, 1339502    

Description Alexander Koksharov 2016-02-12 12:55:41 UTC
Description of problem:
When in deploymentConfig "maxSurge" and "maxUnavailable" are defined as percentage and "replicas" is set to 0, only first deployment is successful. second attempt to deploy is failing with error message:
I0210 09:42:26.360825       1 deployer.go:198] Deploying from test-dev/holamundo-2 to test-dev/holamundo-3 (replicas: 0)
I0210 09:42:27.412523       1 rolling.go:232] RollingUpdater: Continuing update with existing controller holamundo-3.
F0210 09:42:27.431495       1 deployer.go:65] one of maxSurge or maxUnavailable must be specified

Defining "maxSurge" and "maxUnavailable" as absolute values eliminate the issue. 

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


How reproducible:
create deployment config with:
spec:
  replicas: 0
  strategy:
    resources: {}
    rollingParams:
      intervalSeconds: 1
      maxSurge: 25%
      maxUnavailable: 25%
      timeoutSeconds: 600
      updatePeriodSeconds: 1
    type: Rolling

try to deploy this config twice

Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Comment 1 Dan Mace 2016-02-12 13:18:54 UTC
Duplicate of https://bugzilla.redhat.com/show_bug.cgi?id=1293859

*** This bug has been marked as a duplicate of bug 1293859 ***

Comment 2 Josep 'Pep' Turro Mauri 2016-02-15 11:08:57 UTC
(In reply to Dan Mace from comment #1)
> *** This bug has been marked as a duplicate of bug 1293859 ***

Bug 1293859 is an upstream (origin) bug report, so reopening this one to track inclusion of the fix in OSE.

Comment 3 zhou ying 2016-02-16 07:57:22 UTC
I've confirmed with ami:devenv_rhel7_3433, the issue has fixed, please see:

spec:
  replicas: 0
  selector:
    name: mysql
  strategy:
    resources: {}
    rollingParams:
      intervalSeconds: 1
      maxSurge: 25%
      maxUnavailable: 25%
      timeoutSeconds: 600
      updatePeriodSeconds: 1
    type: Rolling

Deployment #2 (latest):
	Name:		hooks-2
	Created:	49 seconds ago
	Status:		Complete
	Replicas:	0 current / 0 desired
	Selector:	deployment=hooks-2,deploymentconfig=hooks,name=mysql
	Labels:		name=mysql,openshift.io/deployment-config.name=hooks
	Pods Status:	0 Running / 0 Waiting / 0 Succeeded / 0 Failed
Deployment #1:
	Created:	about a minute ago
	Status:		Complete
	Replicas:	0 current / 0 desired

When the latest OSE env ready, I'll verify again.

Comment 4 zhou ying 2016-02-18 05:20:59 UTC
confirmed on :
openshift v3.1.1.903
kubernetes v1.2.0-origin
etcd 2.2.2+git

The issue has fixed.

Comment 6 errata-xmlrpc 2016-05-12 16:28:52 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/RHSA-2016:1064