Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 1374249 - Failed to build Jenkins master
Failed to build Jenkins master
Status: CLOSED ERRATA
Product: OpenShift Container Platform
Classification: Red Hat
Component: Containers (Show other bugs)
3.3.0
Unspecified Unspecified
medium Severity low
: ---
: ---
Assigned To: Jhon Honce
Dongbo Yan
:
: 1374127 (view as bug list)
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2016-09-08 06:29 EDT by Dongbo Yan
Modified: 2017-07-24 10 EDT (History)
14 users (show)

See Also:
Fixed In Version:
Doc Type: Enhancement
Doc Text:
Feature: Master/Slave Jenkins services cleanup to remove need for slave. Reason: Removing unneeded slave makes configuration simpler. Result:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2017-04-12 15:06:37 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2017:0884 normal SHIPPED_LIVE Red Hat OpenShift Container Platform 3.5 RPM Release Advisory 2017-04-12 18:50:07 EDT

  None (edit)
Description Dongbo Yan 2016-09-08 06:29:28 EDT
Description of problem:
Build failed when do a jenkins master build on openshift with container installation

Version-Release number of selected component (if applicable):

openshift v3.3.0.30
kubernetes v1.3.0+52492b4
etcd 2.3.0+git
registry.ops.../jenkins-1-rhel7 (a2b7f45b9e0d)

How reproducible:
always

Steps to Reproduce:
1.Create a jenkins master app.
oc new-app https://raw.githubusercontent.com/openshift/origin/master/examples/jenkins/master-slave/jenkins-master-template.json
2.Check jenkins master build
3.

Actual results:
 $ oc build-logs jenkins-master-1 
Cloning "git://github.com/openshift/origin" ...
	Commit:	31f2273690a6b67f3d3dd477f25ab0d365505bf7 (Merge pull request #10810 from lixiaobing10051267/masterTypo)
	Author:	Dan McPherson <dmcphers@redhat.com>
	Date:	Wed Sep 7 07:09:48 2016 -0400

---> Copying repository files ...
---> Installing Jenkins 8 plugins using /opt/openshift/plugins.txt ...
Downloading git-2.4.2 ...
Downloading git-client-1.19.0 ...
Downloading ssh-credentials-1.11 ...
Downloading mailer-1.16 ...
Downloading matrix-project-1.6 ...
Downloading scm-api-1.0 ...
Downloading script-security-1.13 ...
Downloading junit-1.2 ...
---> Removing sample Jenkins job ...
rm: cannot remove '/opt/openshift/configuration/jobs/OpenShift Sample': Directory not empty
---> Installing new Jenkins configuration ...
mv: cannot move '/tmp/tmp.KROeHhepEvjenkins/configuration/jobs' to '/opt/openshift/configuration/jobs': Directory not empty

error: build error: non-zero (13) exit code from registry.ops...jenkins-1-rhel7@sha256:4be90f13eb930e3f8dfbf604da7b7d6bec4287cc11a156e66b39fcb61336d037

Expected results:
Should build successfully.

Additional info:
Build successful on openshift with rpm installation, and no error in buildlog
Comment 1 Ben Parees 2016-09-08 11:27:34 EDT
Cesar has the most experience in running openshift in a container and the weirdness that can ensue.

Can you provide more details on how you setup your "openshift in a container" environment?
Comment 2 Ben Parees 2016-09-08 11:28:33 EDT
*** Bug 1374127 has been marked as a duplicate of this bug. ***
Comment 3 Gabe Montero 2016-09-08 11:45:47 EDT
I was taking a peek at this as well while Ben was updating.  I'll post my notes just in case it helps:

So that failure corresponds to this line in the s2i assemble script for jenkins:  https://github.com/openshift/jenkins/blob/master/1/contrib/s2i/assemble#L30

At first blush, I would think that `rm -rf ${JENKINS_DIR}/configuration/jobs` would work because of these calls to fix-permissions and chown:

https://github.com/openshift/jenkins/blob/master/1/Dockerfile.rhel7#L60-L61

I didn't know what what the actual image location referred to by "registry.ops.../jenkins-1-rhel7 (a2b7f45b9e0d)", so I'm not sure how old it is or if has the changes to the Dockerfile.rhel7 I just mentioned.
Comment 4 Cesar Wong 2016-09-08 11:48:08 EDT
I cannot reproduce this bug on a local 'cluster up' install which is running openshift containerized. It'd be also good to get a higher level of logging from the build:

oc set env bc/jenkins-master BUILD_LOGLEVEL=8

and run the build again:

oc start-build bc/jenkins-master --follow
Comment 5 Ben Parees 2016-09-08 11:48:58 EDT
The fundamental issue here is that it works fine in a "normal" openshift cluster, but fails when the cluster is being run inside containers... which should make absolutely no difference to the s2i assemble script running inside the jenkins container that i can think of.
Comment 6 Gabe Montero 2016-09-08 12:01:41 EDT
Perhaps a debug run could be performed while running in a container where the assemble script is modified to do a 
ls -la ${JENKINS_DIR}/configuration/jobs
ls -la ${JENKINS_DIR}/configuration
ls -la ${JENKINS_DIR}
prior to the rm -rf ?
Comment 7 Cesar Wong 2016-09-08 12:06:19 EDT
Gabe, should the script have 'set -e' at the beginning? 
Even if something failed earlier, the script would just keep going.
Comment 8 Gabe Montero 2016-09-08 12:11:08 EDT
Cesar, yeah, the job configuration for the slave really shouldn't have the openshift sample job as one of the jobs.

We don't want to build an image like that I would think.
Comment 10 Cesar Wong 2016-09-08 23:24:44 EDT
@dyan did you use ansible to setup the containerized install?
Comment 11 Dongbo Yan 2016-09-08 23:28:18 EDT
yes, I think so. I use our jenkins job to install openshift, but I'm not familiar with the installation process, sorry for that.
Comment 18 Derek Carr 2016-09-30 10:29:57 EDT
This appears to be overlayfs storage driver specific, assigning to containers team.
Comment 19 Daniel Walsh 2016-10-14 14:41:43 EDT
Is there a simple repeater you could generate to show this?
Comment 20 Dongbo Yan 2016-10-18 23:16:42 EDT
I can launch an openshift env if you need
Comment 21 Daniel Walsh 2016-11-10 11:49:59 EST
Could you attempt this with the docker-1.12 version using overlay2 as the back end?  There have been some changes in this code.
Comment 22 Vivek Goyal 2016-11-10 13:56:06 EST
Paste "docker info" output as well.

Noting in bug proves that it is an overlay issue. So provide a low level reproducer.

Following is error message and that does not suggest it is an overlay issue.

---> Removing sample Jenkins job ...
rm: cannot remove '/opt/openshift/configuration/jobs/OpenShift Sample': Directory not empty
---> Installing new Jenkins configuration ...
mv: cannot move '/tmp/tmp.KROeHhepEvjenkins/configuration/jobs' to '/opt/openshift/configuration/jobs': Directory not empty
Comment 23 Ben Parees 2016-11-10 14:03:44 EST
Vivek did you read the comment history?  this issue only occurs when the overlay filesystem is used with docker. it doesn't happy with device mapper.

https://bugzilla.redhat.com/show_bug.cgi?id=1374249#c14
Comment 25 Dongbo Yan 2017-01-10 01:24:17 EST
"examples/jenkins/master-slave" sub-dir has been clean up (https://github.com/openshift/origin/pull/11844), and cannot reproduce this issue any more
Comment 26 Troy Dawson 2017-01-27 12:52:02 EST
This should be working in OCP v3.5.0.10 or newer.
Comment 28 errata-xmlrpc 2017-04-12 15:06:37 EDT
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2017:0884

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