Bug 1307013 - Deployment fails if "replicas" is set to 0.
Deployment fails if "replicas" is set to 0.
Status: CLOSED ERRATA
Product: OpenShift Container Platform
Classification: Red Hat
Component: Deployments (Show other bugs)
3.1.0
Unspecified Unspecified
medium Severity high
: ---
: ---
Assigned To: Dan Mace
zhou ying
: Reopened
Depends On:
Blocks: 1267746 1339502
  Show dependency treegraph
 
Reported: 2016-02-12 07:55 EST by Alexander Koksharov
Modified: 2016-05-25 04:55 EDT (History)
3 users (show)

See Also:
Fixed In Version: v3.1.1.901
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-05-12 12:28:52 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Alexander Koksharov 2016-02-12 07:55:41 EST
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 08:18:54 EST
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 06:08:57 EST
(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 02:57:22 EST
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 00:20:59 EST
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 12:28:52 EDT
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

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