Skip to content

Error messages from ACL are really, really confusing #13445

Closed

Description

@smarterclayton
$ oc project myproject
Already on project "myproject" on server "https://10.1.2.2:8443".
$ oc new-build -D $'FROM centos:centos7\nCMD /bin/sleep\n' test
--> Found Docker image be5b4a9 (3 days old) from Docker Hub for "centos:centos7"

    * An image stream will be created as "centos:centos7" that will track the source image
    * A Docker build using a predefined Dockerfile will be created
      * The resulting image will be pushed to image stream "origin:latest"
      * Every time "centos:centos7" changes a new build will be triggered

--> Creating resources with label build=origin ...
    error: User "developer" cannot create image.openshift.io.imagestreams in project "default"
    error: User "developer" cannot create image.openshift.io.imagestreams in project "default"
    error: User "developer" cannot create build.openshift.io.buildconfigs in project "default"
--> Failed

That isn't right at all.

@mfojtik @bparees

Activity

  1. smarterclayton commented on Mar 19, 2017

    @smarterclayton
    ContributorAuthor

    Also, that error is pretty terrible.

  2. smarterclayton commented on Mar 19, 2017

    @smarterclayton
    ContributorAuthor

    From a brand new oc cluster up.

  3. mfojtik commented on Mar 19, 2017

    @mfojtik
    Contributor

    @smarterclayton why it is creating imagestreams and buildconfigs in project "default"?

  4. smarterclayton commented on Mar 19, 2017

    @smarterclayton
    ContributorAuthor

    That's the bug - it looks like it isn't recognizing those resources as being namespaced, possibly.

  5. mfojtik commented on Mar 19, 2017

    @mfojtik
    Contributor

    @smarterclayton i doubt that something like that will pass the tests, also I don't think it is really hitting the "/apis" endpoint (oc still use the legacy client).

    agree on the error is terrible, I will try to fix the source of it.

  6. smarterclayton commented on Mar 19, 2017

    @smarterclayton
    ContributorAuthor

    oc is not using the legacy client here - with --loglevel=8:

    I0319 16:01:42.833320   84936 request.go:559] Request Body: "{\"kind\":\"ImageStream\",\"apiVersion\":\"image.openshift.io/v1\",\"metadata\":{\"name\":\"centos\",\"creationTimestamp\":null,\"labels\":{\"build\":\"origin\"},\"annotations\":{\"openshift.io/generated-by\":\"OpenShiftNewBuild\"}},\"spec\":{\"dockerImageRepository\":\"centos\"},\"status\":{\"dockerImageRepository\":\"\"}}\n"
    I0319 16:01:42.833354   84936 round_trippers.go:296] POST https://10.1.2.2:8443/apis/image.openshift.io/v1/namespaces/default/imagestreams
    
  7. mfojtik commented on Mar 19, 2017

    @mfojtik
    Contributor

    interesting, must be discovery...

  8. smarterclayton commented on Mar 19, 2017

    @smarterclayton
    ContributorAuthor

    I think the problem is the test argument being interpreted as a directory, and somehow deciding to create things in default. That's a ben problem.

    If you can look at making that message better in a separate issue I would appreciate it - it's pretty confusing and I know what it's trying to tell me.

  9. mfojtik commented on Mar 19, 2017

    @mfojtik
    Contributor

    @smarterclayton there are many places where the messages contain the API group... i can sweep them all the try to fix or we can put some fix in upstream. We discussed with @sttts that something like "HumanName()" used in all errors reported (404, etc.) would make the messages much nicer...

  10. smarterclayton commented on Mar 19, 2017

    @smarterclayton
    ContributorAuthor

    Hrm, no, that's not it. This is really weird. oc cluster up vs a GCE cluster behave differently.

  11. smarterclayton commented on Mar 19, 2017

    @smarterclayton
    ContributorAuthor

    @mfojtik the order alone is really confusing - builds.....buildconfigs.

  12. smarterclayton commented on Mar 19, 2017

    @smarterclayton
    ContributorAuthor

    Well, new-build is broken somehow.

  13. mfojtik commented on Mar 19, 2017

    @mfojtik
    Contributor

    @smarterclayton what images you use? openshift/origin:v1.5.0-alpha.3 ?

  14. smarterclayton commented on Mar 19, 2017

    @smarterclayton
    ContributorAuthor

    BAH. Never mind, it was environment variables set that caused in-cluster config to be used. That's fixed.

  15. changed the title [-]can't create dockerbuild on master[/-] [+]Error messages from ACL are really, really confusing[/+] on Mar 19, 2017
  16. smarterclayton commented on Mar 19, 2017

    @smarterclayton
    ContributorAuthor

    Repurposing this to just be the error messages.

  17. added this to the milestone on Mar 19, 2017
  18. smarterclayton commented on Mar 19, 2017

    @smarterclayton
    ContributorAuthor
    oc get build test-1-build -o yaml
    Error from server (NotFound): builds.build.openshift.io "test-1-build" not found
    

    Yeah this is better ^

  19. enj commented on Mar 20, 2017

    @enj
    Contributor

    Duplicate of #13155

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

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions