Skip to content

build-logs error is confusing when build pod is gone #2541

Closed

Description

@sosiouxme
# osc get builds                                                                                                                                                                          
NAME                  TYPE      STATUS    POD
ruby-sample-build-1   Docker    Failed    ruby-sample-build-1
# osc build-logs ruby-sample-build-1
Error from server: pods "ruby-sample-build-1" not found

While I know that the real problem is that the build pod has disappeared (or in the case of "Pending", not been created yet), the relationship is not going to be immediately obvious to the user.

Could build-logs go on to explain that builds run in pods and if the pod is not there yet/anymore, you can't get the build logs, sorry?

Activity

  1. soltysh commented on May 28, 2015

    @soltysh
    Contributor

    The #2465 was addressing this problem (meaning syncing builds and their build pods), can you please check once again with this change?

  2. danmcp commented on May 29, 2015

    @danmcp
  3. sosiouxme commented on Jun 15, 2015

    @sosiouxme
    MemberAuthor

    It's hard for me to tell what #2465 was supposed to address, but it doesn't quite do it for this issue. I think it's improved a little bit in that it now reports the correct name of the pod that's not there (with the -build). And I haven't seen the case where there's a build without a pod, except by deleting the pod myself.

    Still, the error message doesn't explain anything for the n00b user. You ask for build logs and you get an error that a pod was not found. Why was it looking for a pod when you wanted build logs? Maybe just change the error to something like "The pod pod_id for executing the build build_id was not found, so no build logs could be retrieved."

    I would agree with classifying this as a P3 though.

  4. soltysh commented on Jun 16, 2015

    @soltysh
    Contributor

    👍 on changing the output to more appropriate that the build pod wasn't found.

  5. modified the milestone: 1.1.0 on Jun 17, 2015
  6. jhadvig commented on Jul 7, 2015

    @jhadvig
    Member

    @sosiouxme what are the steps for reproducing this issue ? I only manage to reproduce it when I manually remove the build pod. Is there any other way ? Cause if the user manages to delete his build pod then its basically his fault.

  7. sosiouxme commented on Jul 7, 2015

    @sosiouxme
    MemberAuthor

    At the time I ran into it quite by accident. I think there was a delay
    between kicking off a build and having a pod, or perhaps the build pod went
    away after a certain amount of time. It may not be as easy now. One
    approach to reproduce might be to prevent the build pod being scheduled,
    e.g. by making all nodes unschedulable, or the project using a region with
    no available nodes, or having them exceed project quota.

    On Tue, Jul 7, 2015 at 12:20 PM, Jakub Hadvig [email protected]
    wrote:

    @sosiouxme https://github.com/sosiouxme what are the steps for
    reproducing this issue ? I only manage to reproduce it when I manually
    remove the build pod. Is there any other way ? Cause if the user manages to
    delete his build pod then its basically his fault.

    —
    Reply to this email directly or view it on GitHub
    #2541 (comment).

  8. rhcarvalho commented on Jul 24, 2015

    @rhcarvalho
    Contributor

    Also I've seen many people confusing build names, like ruby-example-1-build instead of ruby-example-1 (example). Would it be helpful for the user experience if, after invoking oc build-logs ruby-example-1-build and there's no build named ruby-example-1-build, we would either:

    1. automatically use ruby-example-1
    2. show a message proposing the right build name

    Thoughts?

  9. soltysh commented on Jul 24, 2015

    @soltysh
    Contributor

    There was a proposal (I can't find where, sorry) to show last couple of builds, which would fall into yours no 2, which I really liked.

  10. rhcarvalho commented on Jul 24, 2015

    @rhcarvalho
    Contributor

    @soltysh are you referring to #3359? I have a PR solving that one, but it just list recent builds if you invoke oc build-logs with no arguments.

    My no. 2 basically means doing the same when you provide a build name that doesn't exist, or not the same, but also trying to find a better match and say "you probably meant ...".

  11. soltysh commented on Jul 24, 2015

    @soltysh
    Contributor

    Yup, that's what I'd suggest.

  12. self-assigned this
    on Sep 2, 2015
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