Bug 1437193 - Unable to specify maxSurge of 0
Summary: Unable to specify maxSurge of 0
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Management Console
Version: 3.4.1
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: ---
Assignee: Jessica Forrester
QA Contact: XiaochuanWang
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-03-29 17:39 UTC by Will Gordon
Modified: 2017-08-16 19:51 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Cause: DeploymentConfig maxSurge and maxUnavailable settings were being sent to the API as strings in cases where they needed to be sent as numbers. Consequence: User could not set maxSurge or maxUnavailable to whole numbers from the web console's deployment config editor. Fix: Console will now properly send these settings to the API as strings when set to a percentage or as numbers when set to a whole number. Result: User can set deployment configuration options maxSurge and maxUnavailable to either percentages or whole numbers from the web console.
Clone Of:
Environment:
Last Closed: 2017-08-10 05:20:02 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHEA-2017:1716 0 normal SHIPPED_LIVE Red Hat OpenShift Container Platform 3.6 RPM Release Advisory 2017-08-10 09:02:50 UTC

Description Will Gordon 2017-03-29 17:39:19 UTC
Description of problem:
When editing a deploymentconfig from the webconsole, changing Max Surge to a value of 0 causes the following error message in the web console:
An error occurred updating deployment config openshiftorg.DeploymentConfig "openshiftorg" is invalid: spec.strategy.rollingParams.maxSurge: Invalid value: "0": value should be int(5) or percentage(5%)

However, it's possible to use 0%.

Version-Release number of selected component (if applicable):
OpenShift Master: v3.4.1.10 (online version 3.4.1.14)
Kubernetes Master: v1.4.0+776c994

How reproducible:
always

Steps to Reproduce:
1. oc new-app php~https://github.com/wgordon17/openshift.org#deploy
2. Browse to https://console.preview.openshift.com/console/project/<project-name>/edit/dc/openshiftorg
3. Change "Maximum Number of Surge Pods" to 0
4. Hit save

Actual results:
An error occurred updating deployment config openshiftorg.DeploymentConfig "openshiftorg" is invalid: spec.strategy.rollingParams.maxSurge: Invalid value: "0": value should be int(5) or percentage(5%)

Expected results:
Successful save

Additional info:
Setting to 0 from CLI, `oc edit dc/openshiftorg` works without issue.

Comment 1 Jessica Forrester 2017-04-18 20:30:21 UTC
Will be fixed in https://github.com/openshift/origin-web-console/pull/1442

It is a problem for any whole number, not just zero.  It is also broken for max unavailable, or if trying to reset to the system defaults (by leaving the fields blank).

Comment 2 Troy Dawson 2017-04-19 19:33:50 UTC
This has been merged into ocp and is in OCP v3.6.39 or newer.

Comment 4 XiaochuanWang 2017-04-20 05:45:18 UTC
Verified on OpenShift v3.6.39

Any whole number for "Maximum Number of Surge Pods" including zero or leaving the field blank will not reproduce the error issue.

Leaving "Maximum Number of Surge Pods" blank will reset the value to zero which makes sense. SO it's verified on OpenShift v3.6.39

Comment 6 errata-xmlrpc 2017-08-10 05:20:02 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/RHEA-2017:1716


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