Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 1392764 - oc new-app can create app with --name have more than 24 characters
oc new-app can create app with --name have more than 24 characters
Status: CLOSED ERRATA
Product: OpenShift Container Platform
Classification: Red Hat
Component: Build (Show other bugs)
3.5.0
Unspecified Unspecified
low Severity low
: ---
: ---
Assigned To: Jim Minter
Wang Haoran
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2016-11-08 03:02 EST by Wang Haoran
Modified: 2017-07-24 10 EDT (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: No Doc Update
Doc Text:
undefined
Story Points: ---
Clone Of:
Environment:
Last Closed: 2017-04-12 15:16:15 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)


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2017:0884 normal SHIPPED_LIVE Red Hat OpenShift Container Platform 3.5 RPM Release Advisory 2017-04-12 18:50:07 EDT

  None (edit)
Description Wang Haoran 2016-11-08 03:02:19 EST
Description of problem:

oc new-app can create app with --name have more than 24 characters
Version-Release number of selected component (if applicable):


How reproducible:
Alwasy

Steps to Reproduce:
1.oc new-app --code=https://github.com/openshift/ruby-ex --name=$(a="";for i in `seq 26`;do a=${a}a;done; echo $a )
2.
3.

Actual results:
--> Found image 5e772d2 (4 days old) in image stream "openshift/ruby" under tag "2.3" for "ruby"

    Ruby 2.3 
    -------- 
    Platform for building and running Ruby 2.3 applications

    Tags: builder, ruby, ruby23, rh-ruby23

    * The source repository appears to match: ruby
    * A source build using source code from https://github.com/openshift/ruby-ex will be created
      * The resulting image will be pushed to image stream "aaaaaaaaaaaaaaaaaaaaaaaaaa:latest"
      * Use 'start-build' to trigger a new build
    * This image will be deployed in deployment config "aaaaaaaaaaaaaaaaaaaaaaaaaa"
    * Port 8080/tcp will be load balanced by service "aaaaaaaaaaaaaaaaaaaaaaaaaa"
      * Other containers can access this service through the hostname "aaaaaaaaaaaaaaaaaaaaaaaaaa"

--> Creating resources ...
    imagestream "aaaaaaaaaaaaaaaaaaaaaaaaaa" created
    buildconfig "aaaaaaaaaaaaaaaaaaaaaaaaaa" created
    deploymentconfig "aaaaaaaaaaaaaaaaaaaaaaaaaa" created
    service "aaaaaaaaaaaaaaaaaaaaaaaaaa" created
--> Success
    Build scheduled, use 'oc logs -f bc/aaaaaaaaaaaaaaaaaaaaaaaaaa' to track its progress.
    Run 'oc status' to view your app.


Expected results:
should fail

Additional info:
Comment 2 Jim Minter 2016-11-14 06:07:22 EST
Wang, I'm not sure it's a problem per se that oc new-app can create an app when --name is longer than 24 characters.  However I do think it's an issue that oc new-app's creation of the dc can fail if --name is too long, but is nonetheless shorter than the 63 character limit which we validate.
Comment 3 Wang Haoran 2016-11-14 21:51:59 EST
(In reply to Jim Minter from comment #2)
It's designed the --name is no longer than 24 characters previously, but if the design changed, we can ignore this.
Comment 4 Jim Minter 2017-01-05 05:20:44 EST
https://github.com/openshift/origin/pull/12394
Comment 5 Jim Minter 2017-02-10 09:15:50 EST
https://github.com/openshift/origin/pull/12585
Comment 6 Troy Dawson 2017-02-10 17:49:42 EST
This has been merged into ocp and is in OCP v3.5.0.19 or newer.
Comment 8 Dongbo Yan 2017-02-14 07:22:20 EST
Verified

openshift v3.5.0.20+87266c6
kubernetes v1.5.2+43a9be4
etcd 3.1.0

# oc new-app --code=https://github.com/openshift/ruby-ex --name=$(a="";for i in `seq 59`;do a=${a}a;done; echo $a )
error: invalid name: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa. Must be an a lower case alphanumeric (a-z, and 0-9) string with a maximum length of 58 characters, where the first character is a letter (a-z), and the '-' character is allowed anywhere except the first or last character.
Comment 10 errata-xmlrpc 2017-04-12 15:16:15 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/RHBA-2017:0884

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