Skip to content

getting build logs: 500 when pod is not scheduled yet #1813

Closed

Description

@TomasTomecek

Our workflow:

  1. create build object (POST /builds)
  2. fetch logs from the build right away

Unfortunately, master returns 500 when we try to do that:

< HTTP/1.1 500 Internal Server Error
< Date: Mon, 20 Apr 2015 15:39:09 GMT
< Server: Apache/2.4.6 (Red Hat Enterprise Linux) OpenSSL/1.0.1e-fips
< Content-Type: application/json
< Content-Length: 206
< Connection: close
< 
* Closing connection 2
2015-04-20 17:46:05,361 - osbs.core - DEBUG - {u'status': u'Failure', u'kind': u'Status', u'code': 500, u'apiVersion': u'v1beta1', u'message': u"Pod.Status: invalid value 'Pending': must be Running, Succeeded or Failed", u'creationTimestamp': None}

It would be much nicer if master blocked and started returning logs as the pod gets scheduled. Or do you think that better workflow would be to: submit build, watch the namespace (GET watch/builds/) and once build is running, start fetching logs?

Activity

  1. csrwng commented on Apr 20, 2015

    @csrwng
    Contributor

    @TomasTomecek In the CLI we give you the option to start a build and follow the logs. Essentially we do what you proposed... watch the build and and wait for it to be in a state in which we can start pulling the logs. Relevant code starts here: https://github.com/openshift/origin/blob/master/pkg/cmd/cli/cmd/startbuild.go#L87

  2. TomasTomecek commented on Apr 20, 2015

    @TomasTomecek
    ContributorAuthor

    Thanks Cesar! Closing this then.

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