Skip to content

osc new-app broken for conflicting image names #1546

Closed

Description

@bparees

I created an image repo in namespace test:
{
"apiVersion": "v1beta1",
"dockerImageRepository": "openshift/mysql-55-centos7",
"kind": "ImageRepository",
"metadata": {
"name": "mysql"
},
"tags": {
}

and then I invoke new-app:
osc new-app -n test git://github.com/openshift/ruby-hello-world.git openshift/ruby-20-centos7 mysql

The resulting message is confusing and the behavior seems to be broken:

The argument "mysql" could apply to the following images or image repositories:

++++++++++++++++++++++++++++

  • mysql (use --image="library/mysql")
    Image stream mysql (tag "latest") in namespace , tracks "openshift/mysql-55-centos7"
  • mysql (use --docker-image="mysql")
    Docker image "mysql", 97454fa, from

++++++++++++++++++++++++++++

  1. it should have preferred my "test/mysql" image repo automatically.
  2. the first bullet says to use --image=library/mysql (the docker hub image) but then indicates that is tracking openshift/mysql-55-centos7 (my image).
  3. there's a missing parameter where it says "in namespace ," (should indicate the namespace)
  4. the second bullet is also missing a parameter where it says "from"
  5. i'm not sure what the second bullet is trying to tell me.

I would have expected the message to be something like:

The argument "mysql" could apply to the following images or image repositories:

  • Image mysql from docker registry (default docker registry name here)
    • Use --image="library/mysql" to specify this image.
  • ImageRepository namespace/mysql which tracks image openshift/mysql-55-centos7
    • Use --imagerepository=mysql to specify this image repository.

If I run it as:
osc new-app -n test git://github.com/openshift/ruby-hello-world.git openshift/ruby-20-centos7 test/mysql

then it does work, but the service name it creates is "mysql-55-centos7" and not "mysql". I don't know if that's expected or not.

@smarterclayton @csrwng

Activity

  1. smarterclayton commented on Apr 1, 2015

    @smarterclayton
    Contributor

    Will handle the service name separately.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions