Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1214262

Summary: Normal user couldn't see the build logs
Product: OpenShift Container Platform Reporter: Gaoyun Pei <gpei>
Component: BuildAssignee: Cesar Wong <cewong>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 3.0.0CC: dmcphers, jialiu, jokerman, libra-onpremise-devel, mmccomas
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-09-08 17:34:44 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

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.