Bug 1214262 - Normal user couldn't see the build logs
Summary: Normal user couldn't see the build logs
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Build
Version: 3.0.0
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: ---
Assignee: Cesar Wong
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-04-22 10:17 UTC by Gaoyun Pei
Modified: 2015-09-08 17:34 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-09-08 17:34:44 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Gaoyun Pei 2015-04-22 10:17:30 UTC
Description of problem:
After starting a build, could not see the build logs.

Version-Release number of selected component (if applicable):
osc v0.4.3.2-118-g00515c1
kubernetes v0.14.1-582-gb12d75d


How reproducible:
Always

Steps to Reproduce:
1.As a non-admin user, create new app and trigger build.
[joe@master ~]$ osc new-app https://github.com/openshift/simple-openshift-sinatra-sti.git
[joe@master ~]$ osc start-build simple-openshift-sinatra-sti
[joe@master ~]$ osc get build
NAME                             TYPE      STATUS    POD
simple-openshift-sinatra-sti-1   STI       Running   simple-openshift-sinatra-sti-1
[joe@master ~]$ osc build-logs simple-openshift-sinatra-sti-1
Error from server: "/osapi/v1beta1/proxy/buildLogs/simple-openshift-sinatra-sti-1?namespace=quickstart" is forbidden because joe cannot proxy on buildLogs with name "simple-openshift-sinatra-sti-1" in quickstart


Actual results:
User "joe" was forbidden to see the logs. 
Only admin could see that.

Expected results:
Should get the build logs

Additional info:

Comment 2 Johnny Liu 2015-05-04 09:31:05 UTC
Verified this bug with openshift-0.4.3.2-0.git.141.3a39f33.el7ose.x86_64, PASS.

This bug is fixed in beta3, but there is no puddle, I download package from brew. Please refer to BZ#1217834 for more details.

$ osc build-logs simple-openshift-sinatra-sti-1
2015-05-04T09:28:53.247704016Z E0504 05:28:53.243489       1 cfg.go:50] /root/.dockercfg: stat /root/.dockercfg: no such file or directory
2015-05-04T09:28:53.247776049Z I0504 05:28:53.244653       1 sti.go:54] Creating a new STI builder with build request: &api.Request{BaseImage:"openshift/ruby-20-rhel7", DockerSocket:"unix:///var/run/docker.sock", PreserveWorkingDir:false, Source:"https://github.com/openshift/simple-openshift-sinatra-sti.git", Ref:"", Tag:"172.30.17.47:5000/jialiu/simple-openshift-sinatra-sti", Incremental:false, RemovePreviousImage:false, Environment:map[string]string{"OPENSHIFT_BUILD_NAME":"simple-openshift-sinatra-sti-1", "OPENSHIFT_BUILD_NAMESPACE":"jialiu", "OPENSHIFT_BUILD_SOURCE":"https://github.com/openshift/simple-openshift-sinatra-sti.git"}, CallbackURL:"", ScriptsURL:"", Location:"", ForcePull:false, WorkingDir:"", LayeredBuild:false, InstallDestination:"", Quiet:false, ContextDir:""}
2015-05-04T09:28:57.259597196Z I0504 05:28:57.256166       1 docker.go:157] Image openshift/ruby-20-rhel7 available locally

Comment 3 Josep 'Pep' Turro Mauri 2015-09-08 17:34:44 UTC
Closing this as part of a bulk update/cleanup of multiple bugs that were VERIFIED before OSE 3.0 GA but were left open and haven't been updated since.

If this bug was meant to stay open for some reason please reopen.


Note You need to log in before you can comment on or make changes to this bug.