Skip to content

don't allow slashes in resource names #1844

Closed

Description

@sosiouxme

Create an imagestream with following content:

    {
      "apiVersion": "v1beta1",
      "kind": "ImageStream",
      "metadata": {
        "name": "openshift/hello-openshift"
      }
    }

Now try to delete it. (This is with user "joe" in project "sinatra" but that doesn't matter much.)

$ osc get imageStreams                                                                                                                                                                           
NAME                        DOCKER REPO   TAGS
openshift/hello-openshift                 
$ osc delete imageStreams openshift/hello-openshift                                                                                    
Error: when passing arguments in resource/name form, all arguments must include the resource
$ osc delete imageStreams hello-openshift
Error from server: imageStream "hello-openshift" not found
$ osc delete imageStreams/openshift/hello-openshift
Error: arguments in resource/name form may not have more than one slash
$ osc delete imageStreams --all
Error: "/osapi/v1beta1/imageStreams/openshift/hello-openshift?namespace=sinatra" is forbidden because joe cannot delete on imageStreams/hello-openshift with name "openshift" in sinatra
  1. the resource parser is confused by the slash in the name
  2. the API call to delete is also confounded by the slash in the name

@deads2k et al

Activity

  1. sosiouxme commented on Apr 21, 2015

    @sosiouxme
    MemberAuthor

    Extra note, you can't even delete the project to get rid of the thing once it's created.

  2. liggitt commented on May 8, 2015

    @liggitt
    Contributor

    fixed in #1847

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

Metadata

Metadata

Assignees

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