Bug 1241392 - Failed to create app using source code since failed to create deploymentconfig
Summary: Failed to create app using source code since failed to create deploymentconfig
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: OKD
Classification: Red Hat
Component: Management Console
Version: 3.x
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: ---
: ---
Assignee: Samuel Padgett
QA Contact: Wei Sun
URL:
Whiteboard:
Depends On:
Blocks: 1245032
TreeView+ depends on / blocked
 
Reported: 2015-07-09 07:15 UTC by Wei Sun
Modified: 2015-09-08 20:13 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 1245032 (view as bug list)
Environment:
Last Closed: 2015-09-08 20:13:24 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Wei Sun 2015-07-09 07:15:31 UTC
Description of problem:
On web console,try to create the application using source code,but it failed.
The error is: 
Cannot create DeploymentConfig ruby-hello-world. DeploymentConfig "ruby-hello-world" is invalid: template.controllerTemplate.template.spec.containers[0].ports[0].name: invalid value 'ruby-hello-world-tcp-8080': must be an IANA_SVC_NAME (at most 15 characters, matching regex [a-z0-9]([a-z0-9-]*[a-z0-9])*, it must contain at least one letter [a-z], and hypens cannot be adjacent to other hyphens): e.g. "http"

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

How reproducible:
Always

Steps to Reproduce:
1.Create application using source code on web console
2.
3.

Actual results:
Failed to create ruby-hello-world in project wsuntest

Cannot create DeploymentConfig ruby-hello-world. DeploymentConfig "ruby-hello-world" is invalid: template.controllerTemplate.template.spec.containers[0].ports[0].name: invalid value 'ruby-hello-world-tcp-8080': must be an IANA_SVC_NAME (at most 15 characters, matching regex [a-z0-9]([a-z0-9-]*[a-z0-9])*, it must contain at least one letter [a-z], and hypens cannot be adjacent to other hyphens): e.g. "http"

Expected results:
Could create the application successfully

Additional info:
Could create the app using source code via oc
$ oc new-app openshift/ruby-20-centos7~https://github.com/openshift/ruby-hello-world.git -n wsuntest --config=openshift.local.config/master/admin.kubeconfig 
imagestreams/ruby-20-centos7
imagestreams/ruby-hello-world
buildconfigs/ruby-hello-world
deploymentconfigs/ruby-hello-world
services/ruby-hello-world
A build was created - you can run `oc start-build ruby-hello-world` to start it.
Service "ruby-hello-world" created at 172.30.82.227 with port mappings 8080.

Comment 1 weiwei jiang 2015-07-09 07:57:27 UTC
Management console doesn't check if the port.name exceed the limitation. 
https://github.com/openshift/origin/blob/master/assets/app/scripts/services/applicationGenerator.js#L58

And `oc new-app` will guarantee the port.name is a valid IANA_SVC_NAME.
https://github.com/openshift/origin/blob/master/pkg/generate/app/app.go#L343

So should the Management console do the same things like oc to generate a valid name?

Comment 2 Samuel Padgett 2015-07-17 13:23:43 UTC
There appears to be a problem with build configs as well:

Cannot create BuildConfig nodejs-example. BuildConfig "nodejs-example" is invalid: spec.output.to.kind: required value

Comment 3 Samuel Padgett 2015-07-17 14:05:24 UTC
https://github.com/openshift/origin/pull/3752

Comment 4 Wei Sun 2015-07-20 04:57:25 UTC
Checked this bug in devenv_fedora_2024,now could create the application successfully using source code on web console.
After the bug is moved to ON_QA,we will verify it.

Comment 5 Wei Sun 2015-07-21 01:51:30 UTC
Verified this bug in devenv-fedora_2032.
Now the application could be created successfully.


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