{"action":"created","issue":{"url":"https://api.github.com/repos/openshift/jenkins-plugin/issues/103","repository_url":"https://api.github.com/repos/openshift/jenkins-plugin","labels_url":"https://api.github.com/repos/openshift/jenkins-plugin/issues/103/labels{/name}","comments_url":"https://api.github.com/repos/openshift/jenkins-plugin/issues/103/comments","events_url":"https://api.github.com/repos/openshift/jenkins-plugin/issues/103/events","html_url":"https://github.com/openshift/jenkins-plugin/issues/103","id":186351490,"number":103,"title":"Jenkins plugin using default serviceaccount instead of \"jenkins\"","user":{"login":"jupierce","id":19783215,"avatar_url":"https://avatars.githubusercontent.com/u/19783215?v=3","gravatar_id":"","url":"https://api.github.com/users/jupierce","html_url":"https://github.com/jupierce","followers_url":"https://api.github.com/users/jupierce/followers","following_url":"https://api.github.com/users/jupierce/following{/other_user}","gists_url":"https://api.github.com/users/jupierce/gists{/gist_id}","starred_url":"https://api.github.com/users/jupierce/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jupierce/subscriptions","organizations_url":"https://api.github.com/users/jupierce/orgs","repos_url":"https://api.github.com/users/jupierce/repos","events_url":"https://api.github.com/users/jupierce/events{/privacy}","received_events_url":"https://api.github.com/users/jupierce/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":6,"created_at":"2016-10-31T17:51:53Z","updated_at":"2016-11-01T18:50:59Z","closed_at":"2016-10-31T20:08:54Z","body":"Still trying to figure out what changed here, but several origin extended test failures have induced me to track this problem. When running within OpenShift, the Jenkins plugin is attempting to access APIServer resources using the \"default\" service account instead of the \"jenkins\" service account. \r\n\r\n@gabemontero @oatmealraisin @csrwng \r\n\r\nErrors:\r\n1. \r\n```\r\nStarting \"Tag OpenShift Image\" with the source [image stream:tag] \"multitag:orig\" from the project \"extended-test-jenkins-plugin-eg2xp-6vdhc\" and destination stream(s) \"multitag\" with tag(s) \"prod\" from the project \"extended-test-jenkins-plugin-eg2xp-6vdhc\".\r\nERROR: Build step failed with exception\r\ncom.openshift.restclient.authorization.ResourceForbiddenException: User \"system:serviceaccount:extended-test-jenkins-plugin-eg2xp-6vdhc-jenkins:default\" cannot get imagestreams in project \"extended-test-jenkins-plugin-eg2xp-6vdhc\" User \"system:serviceaccount:extended-test-jenkins-plugin-eg2xp-6vdhc-jenkins:default\" cannot get imagestreams in project \"extended-test-jenkins-plugin-eg2xp-6vdhc\"\r\n    at com.openshift.internal.restclient.okhttp.ResponseCodeInterceptor.createOpenShiftException(ResponseCodeInterceptor.java:106)\r\n    at com.openshift.internal.restclient.okhttp.ResponseCodeInterceptor.intercept(ResponseCodeInterceptor.java:65)\r\n    at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:92)\r\n    at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:67)\r\n    at okhttp3.RealCall.getResponseWithInterceptorChain(RealCall.java:170)\r\n    at okhttp3.RealCall.execute(RealCall.java:60)\r\n    at com.openshift.internal.restclient.DefaultClient.execute(DefaultClient.java:217)\r\n    at com.openshift.internal.restclient.DefaultClient.execute(DefaultClient.java:194)\r\n    at com.openshift.internal.restclient.DefaultClient.execute(DefaultClient.java:183)\r\n    at com.openshift.internal.restclient.DefaultClient.get(DefaultClient.java:291)\r\n    at com.openshift.jenkins.plugins.pipeline.model.IOpenShiftImageTagger.coreLogic(IOpenShiftImageTagger.java:139)\r\n    at com.openshift.jenkins.plugins.pipeline.model.IOpenShiftPlugin.doItCore(IOpenShiftPlugin.java:299)\r\n    at com.openshift.jenkins.plugins.pipeline.model.IOpenShiftPlugin.doIt(IOpenShiftPlugin.java:312)\r\n    at com.openshift.jenkins.plugins.pipeline.OpenShiftBaseStep.perform(OpenShiftBaseStep.java:81)\r\n    at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)\r\n    at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:782)\r\n    at hudson.model.Build$BuildExecution.build(Build.java:205)\r\n    at hudson.model.Build$BuildExecution.doRun(Build.java:162)\r\n    at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:534)\r\n    at hudson.model.Run.execute(Run.java:1738)\r\n    at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)\r\n    at hudson.model.ResourceController.execute(ResourceController.java:98)\r\n    at hudson.model.Executor.run(Executor.java:410)\r\nBuild step 'Tag OpenShift Image' marked build as failure\r\nFinished: FAILURE\r\n```\r\n\r\n2. https://ci.openshift.redhat.com/jenkins/job/origin_extended_image_tests/731/consoleFull\r\n```\r\n[image_ecosystem][jenkins] schedule jobs on pod slaves\r\n/data/src/github.com/openshift/origin/test/extended/image_ecosystem/kubernetes_plugin.go:169\r\n  use of jenkins with kubernetes plugin\r\n  /data/src/github.com/openshift/origin/test/extended/image_ecosystem/kubernetes_plugin.go:168\r\n    by creating slave from existing builder and adding it to Jenkins master [It]\r\n    /data/src/github.com/openshift/origin/test/extended/image_ecosystem/kubernetes_plugin.go:167\r\n\r\n    Expected\r\n        <string>: User \"system:serviceaccount:extended-test-jenkins-kube-a67wm-tv3ra:default\" cannot list imagestreams in project \"extended-test-jenkins-kube-a67wm-tv3ra\"\r\n        User \"system:serviceaccount:extended-test-jenkins-kube-a67wm-tv3ra:default\" cannot list imagestreams in project \"extended-test-jenkins-kube-a67wm-tv3ra\"\r\n        Generating kubernetes-plugin configuration (/opt/openshift/configuration/config.xml.tpl) ...\r\n        Generating kubernetes-plugin credentials (/var/lib/jenkins/credentials.xml.tpl) ...\r\n        Copying Jenkins configuration to /var/lib/jenkins ...\r\n        Copying 73 Jenkins plugins to /var/lib/jenkins ...\r\n        Creating initial Jenkins 'admin' user ...\r\n        Running from: /usr/lib/jenkins/jenkins.war\r\n        webroot: EnvVars.masterEnvVars.get(\"JENKINS_HOME\")\r\n        Oct 31, 2016 5:29:38 AM org.eclipse.jetty.util.log.JavaUtilLog info\r\n        INFO: Logging initialized @626ms\r\n        Oct 31, 2016 5:29:38 AM winstone.Logger logInternal\r\n        INFO: Beginning extraction from war file\r\n        Oct 31, 2016 5:29:39 AM org.eclipse.jetty.util.log.JavaUtilLog warn\r\n        WARNING: Empty contextPath\r\n        Oct 31, 2016 5:29:39 AM org.eclipse.jetty.util.log.JavaUtilLog info\r\n        INFO: jetty-9.2.z-SNAPSHOT\r\n        Oct 31, 2016 5:29:41 AM org.eclipse.jetty.util.log.JavaUtilLog info\r\n        INFO: NO JSP Support for /, did not find org.eclipse.jetty.jsp.JettyJspServlet\r\n        Jenkins home directory: /var/lib/jenkins found at: EnvVars.masterEnvVars.get(\"JENKINS_HOME\")\r\n        Oct 31, 2016 5:29:41 AM org.eclipse.jetty.util.log.JavaUtilLog info\r\n        INFO: Started w.@51cd7ffc{/,file:/var/lib/jenkins/war/,AVAILABLE}{/var/lib/jenkins/war}\r\n        Oct 31, 2016 5:29:41 AM org.eclipse.jetty.util.log.JavaUtilLog info\r\n        INFO: Started ServerConnector@6c6c5427{HTTP/1.1}{0.0.0.0:8080}\r\n        Oct 31, 2016 5:29:41 AM org.eclipse.jetty.util.log.JavaUtilLog info\r\n        INFO: Started @4137ms\r\n        Oct 31, 2016 5:29:41 AM winstone.Logger logInternal\r\n        INFO: Winstone Servlet Engine v2.0 running: controlPort=disabled\r\n        Oct 31, 2016 5:29:42 AM jenkins.InitReactorRunner$1 onAttained\r\n        INFO: Started initialization\r\n        Oct 31, 2016 5:29:48 AM jenkins.InitReactorRunner$1 onAttained\r\n        INFO: Listed all plugins\r\n        Oct 31, 2016 5:29:54 AM jenkins.InitReactorRunner$1 onAttained\r\n        INFO: Prepared all plugins\r\n        Oct 31, 2016 5:29:54 AM jenkins.InitReactorRunner$1 onAttained\r\n        INFO: Started all plugins\r\n        Oct 31, 2016 5:29:56 AM io.fabric8.jenkins.openshiftsync.GlobalPluginConfiguration configChange\r\n        SEVERE: Failed to configure OpenShift Jenkins Sync Plugin: io.fabric8.kubernetes.client.KubernetesClientException: Failure executing: GET at: https://kubernetes.default.svc/oapi/v1/namespaces/extended-test-jenkins-kube-a67wm-tv3ra/buildconfigs. Message: Forbidden!Configured service account doesn't have access. Service account may have been revoked..\r\n        Oct 31, 2016 5:29:56 AM jenkins.InitReactorRunner$1 onAttained\r\n        INFO: Augmented all extensions\r\n        Oct 31, 2016 5:29:57 AM jenkins.InitReactorRunner$1 onAttained\r\n        INFO: Loaded all jobs\r\n        Oct 31, 2016 5:29:57 AM hudson.model.AsyncPeriodicWork$1 run\r\n        INFO: Started Download metadata\r\n        Oct 31, 2016 5:29:58 AM org.jenkinsci.main.modules.sshd.SSHD start\r\n        INFO: Started SSHD at port 40096\r\n        Oct 31, 2016 5:29:58 AM jenkins.InitReactorRunner$1 onAttained\r\n        INFO: Completed initialization\r\n        Oct 31, 2016 5:29:58 AM org.springframework.context.support.AbstractApplicationContext prepareRefresh\r\n        INFO: Refreshing org.springframework.web.context.support.StaticWebApplicationContext@44a6b6f7: display name [Root WebApplicationContext]; startup date [Mon Oct 31 05:29:58 UTC 2016]; root of context hierarchy\r\n        Oct 31, 2016 5:29:58 AM org.springframework.context.support.AbstractApplicationContext obtainFreshBeanFactory\r\n        INFO: Bean factory for application context [org.springframework.web.context.support.StaticWebApplicationContext@44a6b6f7]: org.springframework.beans.factory.support.DefaultListableBeanFactory@3675bac6\r\n        Oct 31, 2016 5:29:58 AM org.springframework.beans.factory.support.DefaultListableBeanFactory preInstantiateSingletons\r\n        INFO: Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@3675bac6: defining beans [authenticationManager]; root of factory hierarchy\r\n        Oct 31, 2016 5:29:59 AM org.springframework.context.support.AbstractApplicationContext prepareRefresh\r\n        INFO: Refreshing org.springframework.web.context.support.StaticWebApplicationContext@247edd9c: display name [Root WebApplicationContext]; startup date [Mon Oct 31 05:29:59 UTC 2016]; root of context hierarchy\r\n        Oct 31, 2016 5:29:59 AM org.springframework.context.support.AbstractApplicationContext obtainFreshBeanFactory\r\n        INFO: Bean factory for application context [org.springframework.web.context.support.StaticWebApplicationContext@247edd9c]: org.springframework.beans.factory.support.DefaultListableBeanFactory@628b2e73\r\n        Oct 31, 2016 5:29:59 AM org.springframework.beans.factory.support.DefaultListableBeanFactory preInstantiateSingletons\r\n        INFO: Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@628b2e73: defining beans [filter,legacy]; root of factory hierarchy\r\n        Oct 31, 2016 5:30:00 AM org.openshift.jenkins.plugins.openshiftlogin.OpenShiftItemListener onLoaded\r\n        INFO: OpenShift OAuth: enable oauth set to null\r\n        Oct 31, 2016 5:30:00 AM hudson.WebAppMain$3 run\r\n        INFO: Jenkins is fully up and running\r\n        Oct 31, 2016 5:30:00 AM hudson.model.UpdateSite updateData\r\n        INFO: Obtained the latest update center data file for UpdateSource default\r\n        Oct 31, 2016 5:30:00 AM hudson.model.DownloadService$Downloadable load\r\n        INFO: Obtained the updated data file for hudson.tasks.Maven.MavenInstaller\r\n        Oct 31, 2016 5:30:01 AM hudson.model.DownloadService$Downloadable load\r\n        INFO: Obtained the updated data file for hudson.tools.JDKInstaller\r\n        Oct 31, 2016 5:30:01 AM hudson.model.AsyncPeriodicWork$1 run\r\n        INFO: Finished Download metadata. 3,606 ms\r\n    to contain substring\r\n        <string>: Adding image ruby-22-centos7-jenkins-slave:latest as Kubernetes slave\r\n\r\n    /data/src/github.com/openshift/origin/test/extended/image_ecosystem/kubernetes_plugin.go:153\r\n```"},"comment":{"url":"https://api.github.com/repos/openshift/jenkins-plugin/issues/comments/257658626","html_url":"https://github.com/openshift/jenkins-plugin/issues/103#issuecomment-257658626","issue_url":"https://api.github.com/repos/openshift/jenkins-plugin/issues/103","id":257658626,"user":{"login":"jupierce","id":19783215,"avatar_url":"https://avatars.githubusercontent.com/u/19783215?v=3","gravatar_id":"","url":"https://api.github.com/users/jupierce","html_url":"https://github.com/jupierce","followers_url":"https://api.github.com/users/jupierce/followers","following_url":"https://api.github.com/users/jupierce/following{/other_user}","gists_url":"https://api.github.com/users/jupierce/gists{/gist_id}","starred_url":"https://api.github.com/users/jupierce/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jupierce/subscriptions","organizations_url":"https://api.github.com/users/jupierce/orgs","repos_url":"https://api.github.com/users/jupierce/repos","events_url":"https://api.github.com/users/jupierce/events{/privacy}","received_events_url":"https://api.github.com/users/jupierce/received_events","type":"User","site_admin":false},"created_at":"2016-11-01T18:50:59Z","updated_at":"2016-11-01T18:50:59Z","body":"See for followup:\r\n- openshift/origin#11676\r\n- openshift/origin#11711"}}
{"actor":{"display_login":"jupierce"}}