Description of problem: No service create when use'new-app' create perl and mysql apps, other images have created service. Version-Release number of selected component (if applicable): openshift v3.5.0.17+c55cf2b How reproducible: always Steps to Reproduce: 1.Create a perl app #oc new-app --image-stream=openshift/perl --code=https://github.com/openshift/sti-perl --context-dir=5.20/test/sample-test-app/ 2.Create a mysql app #oc new-app --image-stream=openshift/mysql -env=MYSQL_ROOT_PASSWORD\=test 3. Actual results: #oc new-app --image-stream=openshift/perl --code=https://github.com/openshift/sti-perl --context-dir=5.20/test/sample-test-app/ --> Creating resources with label app=test-perl ... imagestream "sti-perl" created buildconfig "sti-perl" created deploymentconfig "sti-perl" created --> Success #oc new-app --image-stream=openshift/mysql -env=MYSQL_ROOT_PASSWORD\=tes --> Creating resources ... deploymentconfig "mysql" created --> Success Expected results: Should create service Additional info:
worked ok for me. The reason this might happen is if for some reason the image metadata indicates the image has no PORT exposures. Can you rerun new-app with --loglevel=8 and provide the logs? also the output of "oc get is -n openshift -o yaml" would be helpful.
also your output looks stale(or perhaps you just cut off the top of the output), can you confirm the oc version you are using? here is my output for comparison: $ oc new-app --image-stream=openshift/perl --code=https://github.com/openshift/sti-perl --context-dir=5.20/test/sample-test-app/ --> Found image 733dc38 (3 weeks old) in image stream "openshift/perl" under tag "5.24" for "openshift/perl" Apache 2.4 with mod_perl/5.24 ----------------------------- Platform for building and running Perl 5.24 applications Tags: builder, perl, perl524 * The source repository appears to match: perl * A source build using source code from https://github.com/openshift/sti-perl will be created * The resulting image will be pushed to image stream "sti-perl:latest" * Use 'start-build' to trigger a new build * This image will be deployed in deployment config "sti-perl" * Port 8080/tcp will be load balanced by service "sti-perl" * Other containers can access this service through the hostname "sti-perl" --> Creating resources ... imagestream "sti-perl" created buildconfig "sti-perl" created deploymentconfig "sti-perl" created service "sti-perl" created --> Success Build scheduled, use 'oc logs -f bc/sti-perl' to track its progress. Run 'oc status' to view your app.
Created attachment 1248547 [details] new-app log
Created attachment 1248548 [details] imagestream of perl
Yes, I just cut off the top of the output. No port exposes indeed. $ oc new-app --image-stream=openshift/perl --code=https://github.com/openshift/sti-perl --context-dir=5.20/test/sample-test-app/ --name=app --> Found tag :5.20 in image stream "openshift/perl" for "openshift/perl" * The source repository appears to match: perl * A source build using source code from https://github.com/openshift/sti-perl will be created * The resulting image will be pushed to image stream "app:latest" * Use 'start-build' to trigger a new build * This image will be deployed in deployment config "app" --> Creating resources ... imagestream "app" created buildconfig "app" created deploymentconfig "app" created --> Success Build scheduled, use 'oc logs -f bc/app' to track its progress. Run 'oc status' to view your app. Paste the new-app log and imagestream info.
ok i was able to recreate this, it's caused by a path in which there is a "latest" imagestream tag which points to an imagestreamtag that was not successfully imported (in your case, latest points to 5.24, and 5.24 does not exist in your registry). Investigating.
fix is here: https://github.com/openshift/origin/pull/12878 but to be clear, the wrong behavior here is that we should have errored out telling you that perl:5.20 was a partial match for the requested imagestream openshift/perl and that you need to specify openshift/perl:5.20 explicitly. The reason for this is that your "latest" imagestreamtag points to "5.24" but "5.24" failed to import (appears not to exist in your registry). When you do not specify a tag explicitly (as in "openshift/perl"), the searcher defaults to searching for the "latest" tag and only a tag named "latest" or the tag pointed to by "latest" will be considered an exact match. Anything else will be treated as a partial match (with this fix).
This has been merged into ocp and is in OCP v3.5.0.19 or newer.
Test in Server https://*** openshift v3.5.0.19+199197c kubernetes v1.5.2+43a9be4 Return partial matches when default latest tag is unavailable. #oc new-app ruby-ex https://github.com/openshift/ruby-hello-world.git error: multiple images or templates matched "ruby-ex": 2 The argument "ruby-ex" could apply to the following Docker images, OpenShift image streams, or templates: * Image stream "ruby-ex" (tag "2.2") in project "xiuwang1" Use --image-stream="xiuwang1/ruby-ex:2.2" to specify this image or template * Image stream "ruby-ex" (tag "2.0") in project "xiuwang1" Use --image-stream="xiuwang1/ruby-ex:2.0" to specify this image or template Thanks