Fedora Account System
Red Hat Associate
Red Hat Customer
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.
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?
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
https://github.com/openshift/origin/pull/3752
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.
Verified this bug in devenv-fedora_2032. Now the application could be created successfully.