Fedora Account System
Red Hat Associate
Red Hat Customer
Description of problem: When project name length is fewer than 4 or more than 30 characters, builds in the project always failed, the project name length should be limited when it is created. Version-Release number of selected component (if applicable): # openshift version openshift v0.5-47-g4152d79 kubernetes v0.16.2-338-gc07896e How reproducible: ALways Steps to Reproduce: 1.On openshift server, create 3 project: dev, project1, project123456789123456789123456789 $osc new-project dev $osc new-project project1 $osc new-project project123456789123456789123456789 2.Create template in each project. $osc create -f origin/examples/sample-app/application-template-stibuild.json -n dev $osc create -f origin/examples/sample-app/application-template-stibuild.json -n project1 $osc create -f origin/examples/sample-app/application-template-stibuild.json -n project123456789123456789123456789 3.Create app from template on web console in each project.(Build is automatically triggered, if not ,start build manually) 4.Check the build status and logs in each project. $osc get builds -n <projectname> $osc build-logs <buildname> -n <projectname> Actual results: 4. (1)For project dev,the build failed: # osc build-logs ruby-sample-build-1 -n dev 2015-05-06T08:04:56.668959774Z E0506 08:04:56.666196 1 cfg.go:50] /root/.dockercfg: stat /root/.dockercfg: no such file or directory 2015-05-06T08:04:59.918398289Z I0506 08:04:59.918259 1 sti.go:371] ---> Installing application source 2015-05-06T08:04:59.921533315Z I0506 08:04:59.921468 1 sti.go:371] ---> Building your Ruby application from source 2015-05-06T08:04:59.922062471Z I0506 08:04:59.922031 1 sti.go:371] ---> Running 'bundle install --deployment' 2015-05-06T08:05:43.131078484Z I0506 08:05:43.130961 1 sti.go:371] Fetching source index from https://rubygems.org/ 2015-05-06T08:07:00.677650643Z I0506 08:07:00.677240 1 sti.go:371] Installing rake (10.3.2) 2015-05-06T08:07:01.591148360Z I0506 08:07:01.591041 1 sti.go:371] Installing i18n (0.6.11) 2015-05-06T08:07:04.429153400Z I0506 08:07:04.429073 1 sti.go:371] Installing json (1.8.1) 2015-05-06T08:07:06.003526084Z I0506 08:07:06.003457 1 sti.go:371] Installing minitest (5.4.2) 2015-05-06T08:07:07.157003485Z I0506 08:07:07.156927 1 sti.go:371] Installing thread_safe (0.3.4) 2015-05-06T08:07:08.252043963Z I0506 08:07:08.251971 1 sti.go:371] Installing tzinfo (1.2.2) 2015-05-06T08:07:09.933958910Z I0506 08:07:09.933890 1 sti.go:371] Installing activesupport (4.1.7) 2015-05-06T08:07:10.264046143Z I0506 08:07:10.263956 1 sti.go:371] Installing builder (3.2.2) 2015-05-06T08:07:10.611066182Z I0506 08:07:10.610969 1 sti.go:371] Installing activemodel (4.1.7) 2015-05-06T08:07:11.527443668Z I0506 08:07:11.527293 1 sti.go:371] Installing arel (5.0.1.20140414130214) 2015-05-06T08:07:12.801055840Z I0506 08:07:12.800974 1 sti.go:371] Installing activerecord (4.1.7) 2015-05-06T08:07:16.782454211Z I0506 08:07:16.782401 1 sti.go:371] Installing mysql2 (0.3.16) 2015-05-06T08:07:19.444358347Z I0506 08:07:19.444287 1 sti.go:371] Installing rack (1.5.2) 2015-05-06T08:07:19.844997074Z I0506 08:07:19.844932 1 sti.go:371] Installing rack-protection (1.5.3) 2015-05-06T08:07:20.291148134Z I0506 08:07:20.290966 1 sti.go:371] Installing tilt (1.4.1) 2015-05-06T08:07:22.123852707Z I0506 08:07:22.123771 1 sti.go:371] Installing sinatra (1.4.5) 2015-05-06T08:07:22.692938707Z I0506 08:07:22.692875 1 sti.go:371] Installing sinatra-activerecord (2.0.3) 2015-05-06T08:07:22.694943766Z I0506 08:07:22.694869 1 sti.go:371] Using bundler (1.3.5) 2015-05-06T08:07:22.694943766Z I0506 08:07:22.694891 1 sti.go:371] Your bundle is complete! 2015-05-06T08:07:22.694943766Z I0506 08:07:22.694910 1 sti.go:371] It was installed into ./bundle 2015-05-06T08:07:22.774444287Z I0506 08:07:22.774373 1 sti.go:371] ---> Cleaning up unused ruby gems 2015-05-06T08:07:28.821777415Z E0506 08:07:28.820690 1 cfg.go:50] /root/.dockercfg: stat /root/.dockercfg: no such file or directory 2015-05-06T08:07:28.821777415Z I0506 08:07:28.820759 1 sti.go:80] Pushing 172.30.74.228:5000/dev/origin-ruby-sample image ... 2015-05-06T08:07:28.832949840Z E0506 08:07:28.822603 1 sti.go:82] Failed to push image: API error (500): Invalid namespace name (dev). Cannot be fewer than 4 or more than 30 characters. 2015-05-06T08:07:29.570217231Z F0506 08:07:29.567555 1 builder.go:62] Build error: Failed to push image: API error (500): Invalid namespace name (dev). Cannot be fewer than 4 or more than 30 characters. (2)For project1, the build succeed: # osc build-logs ruby-sample-build-1 -n project1 2015-05-06T10:04:45.067116588Z E0506 10:04:45.064682 1 cfg.go:50] /root/.dockercfg: stat /root/.dockercfg: no such file or directory 2015-05-06T10:04:48.278710935Z I0506 10:04:48.278606 1 sti.go:371] ---> Installing application source 2015-05-06T10:04:48.284742160Z I0506 10:04:48.284696 1 sti.go:371] ---> Building your Ruby application from source 2015-05-06T10:04:48.284742160Z I0506 10:04:48.284710 1 sti.go:371] ---> Running 'bundle install --deployment' 2015-05-06T10:04:54.458079418Z I0506 10:04:54.457996 1 sti.go:371] Fetching gem metadata from https://rubygems.org/.......... 2015-05-06T10:04:58.652078409Z I0506 10:04:58.651998 1 sti.go:371] Installing rake (10.3.2) 2015-05-06T10:04:59.203921963Z I0506 10:04:59.203856 1 sti.go:371] Installing i18n (0.6.11) 2015-05-06T10:05:01.214316810Z I0506 10:05:01.214233 1 sti.go:371] Installing json (1.8.1) 2015-05-06T10:05:03.296157232Z I0506 10:05:03.296068 1 sti.go:371] Installing minitest (5.4.2) 2015-05-06T10:05:04.603986444Z I0506 10:05:04.603911 1 sti.go:371] Installing thread_safe (0.3.4) 2015-05-06T10:05:05.598224544Z I0506 10:05:05.598149 1 sti.go:371] Installing tzinfo (1.2.2) 2015-05-06T10:05:07.442140172Z I0506 10:05:07.442051 1 sti.go:371] Installing activesupport (4.1.7) 2015-05-06T10:05:07.952342130Z I0506 10:05:07.952299 1 sti.go:371] Installing builder (3.2.2) 2015-05-06T10:05:08.470973497Z I0506 10:05:08.470911 1 sti.go:371] Installing activemodel (4.1.7) 2015-05-06T10:05:09.337261569Z I0506 10:05:09.337198 1 sti.go:371] Installing arel (5.0.1.20140414130214) 2015-05-06T10:05:12.677036481Z I0506 10:05:12.676946 1 sti.go:371] Installing activerecord (4.1.7) 2015-05-06T10:05:18.040118899Z I0506 10:05:18.040035 1 sti.go:371] Installing mysql2 (0.3.16) 2015-05-06T10:05:23.428170077Z I0506 10:05:23.428078 1 sti.go:371] Installing rack (1.5.2) 2015-05-06T10:05:25.585084650Z I0506 10:05:25.584957 1 sti.go:371] Installing rack-protection (1.5.3) 2015-05-06T10:05:27.033667726Z I0506 10:05:27.033590 1 sti.go:371] Installing tilt (1.4.1) 2015-05-06T10:05:33.338001767Z I0506 10:05:33.337935 1 sti.go:371] Installing sinatra (1.4.5) 2015-05-06T10:05:34.564989677Z I0506 10:05:34.564914 1 sti.go:371] Installing sinatra-activerecord (2.0.3) 2015-05-06T10:05:34.564989677Z I0506 10:05:34.564949 1 sti.go:371] Using bundler (1.3.5) 2015-05-06T10:05:34.567157940Z I0506 10:05:34.567091 1 sti.go:371] Your bundle is complete! 2015-05-06T10:05:34.567157940Z I0506 10:05:34.567108 1 sti.go:371] It was installed into ./bundle 2015-05-06T10:05:34.596372020Z I0506 10:05:34.596308 1 sti.go:371] ---> Cleaning up unused ruby gems 2015-05-06T10:05:40.645069369Z E0506 10:05:40.644722 1 cfg.go:50] /root/.dockercfg: stat /root/.dockercfg: no such file or directory 2015-05-06T10:05:40.645069369Z I0506 10:05:40.644769 1 sti.go:80] Pushing 172.30.74.228:5000/project1/origin-ruby-sample image ... 2015-05-06T10:07:34.331610612Z I0506 10:07:34.311998 1 sti.go:85] Successfully pushed 172.30.74.228:5000/project1/origin-ruby-sampl (3)For project123456789123456789123456789, the build failed: # osc build-logs ruby-sample-build-1 -n project123456789123456789123456789 2015-05-06T10:08:32.651585352Z E0506 10:08:32.649193 1 cfg.go:50] /root/.dockercfg: stat /root/.dockercfg: no such file or directory 2015-05-06T10:08:35.892847566Z I0506 10:08:35.892749 1 sti.go:371] ---> Installing application source 2015-05-06T10:08:35.902688110Z I0506 10:08:35.902640 1 sti.go:371] ---> Building your Ruby application from source 2015-05-06T10:08:35.902688110Z I0506 10:08:35.902655 1 sti.go:371] ---> Running 'bundle install --deployment' 2015-05-06T10:08:44.812051049Z I0506 10:08:44.811986 1 sti.go:371] Fetching gem metadata from https://rubygems.org/.......... 2015-05-06T10:08:49.143943031Z I0506 10:08:49.143907 1 sti.go:371] Installing rake (10.3.2) 2015-05-06T10:08:50.091669202Z I0506 10:08:50.091622 1 sti.go:371] Installing i18n (0.6.11) 2015-05-06T10:08:53.576071645Z I0506 10:08:53.576031 1 sti.go:371] Installing json (1.8.1) 2015-05-06T10:08:55.600925389Z I0506 10:08:55.600852 1 sti.go:371] Installing minitest (5.4.2) 2015-05-06T10:08:58.072017597Z I0506 10:08:58.071952 1 sti.go:371] Installing thread_safe (0.3.4) 2015-05-06T10:09:00.401116964Z I0506 10:09:00.401022 1 sti.go:371] Installing tzinfo (1.2.2) 2015-05-06T10:09:05.197980781Z I0506 10:09:05.197903 1 sti.go:371] Installing activesupport (4.1.7) 2015-05-06T10:09:06.568885786Z I0506 10:09:06.568826 1 sti.go:371] Installing builder (3.2.2) 2015-05-06T10:09:07.729325093Z I0506 10:09:07.729254 1 sti.go:371] Installing activemodel (4.1.7) 2015-05-06T10:09:09.947069991Z I0506 10:09:09.947001 1 sti.go:371] Installing arel (5.0.1.20140414130214) 2015-05-06T10:09:16.197010999Z I0506 10:09:16.196937 1 sti.go:371] Installing activerecord (4.1.7) 2015-05-06T10:09:20.882759779Z I0506 10:09:20.882666 1 sti.go:371] Installing mysql2 (0.3.16) 2015-05-06T10:09:24.297164023Z I0506 10:09:24.297057 1 sti.go:371] Installing rack (1.5.2) 2015-05-06T10:09:25.444007438Z I0506 10:09:25.443932 1 sti.go:371] Installing rack-protection (1.5.3) 2015-05-06T10:09:26.879084395Z I0506 10:09:26.878985 1 sti.go:371] Installing tilt (1.4.1) 2015-05-06T10:09:35.349083049Z I0506 10:09:35.348941 1 sti.go:371] Installing sinatra (1.4.5) 2015-05-06T10:09:36.497220609Z I0506 10:09:36.497120 1 sti.go:371] Installing sinatra-activerecord (2.0.3) 2015-05-06T10:09:36.497220609Z I0506 10:09:36.497160 1 sti.go:371] Using bundler (1.3.5) 2015-05-06T10:09:36.497220609Z I0506 10:09:36.497166 1 sti.go:371] Your bundle is complete! 2015-05-06T10:09:36.497220609Z I0506 10:09:36.497171 1 sti.go:371] It was installed into ./bundle 2015-05-06T10:09:36.527527245Z I0506 10:09:36.527458 1 sti.go:371] ---> Cleaning up unused ruby gems 2015-05-06T10:09:42.289054580Z E0506 10:09:42.288644 1 cfg.go:50] /root/.dockercfg: stat /root/.dockercfg: no such file or directory 2015-05-06T10:09:42.289054580Z I0506 10:09:42.288701 1 sti.go:80] Pushing 172.30.74.228:5000/project123456789123456789123456789/origin-ruby-sample image ... 2015-05-06T10:09:42.293220428Z E0506 10:09:42.292490 1 sti.go:82] Failed to push image: API error (500): Invalid namespace name (project123456789123456789123456789). Cannot be fewer than 4 or more than 30 characters. 2015-05-06T10:09:43.165788875Z F0506 10:09:43.165742 1 builder.go:62] Build error: Failed to push image: API error (500): Invalid namespace name (project123456789123456789123456789). Cannot be fewer than 4 or more than 30 characters. Expected results: 4.Since other operations in projects are successful, and build failed due to project name length, it should prompt suitable project name length info when create new project. Additional info:
*** This bug has been marked as a duplicate of bug 1190052 ***