Bug 1510908 - jenkinsURL not available upon deployment
Summary: jenkinsURL not available upon deployment
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Build
Version: 3.6.0
Hardware: Unspecified
OS: Unspecified
unspecified
low
Target Milestone: ---
: 3.8.0
Assignee: Gabe Montero
QA Contact: Wenjing Zheng
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-11-08 12:35 UTC by Ruben Romero Montes
Modified: 2021-09-09 12:48 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-12-15 10:53:09 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Ruben Romero Montes 2017-11-08 12:35:33 UTC
Description of problem:
jenkinsUrl is included in file jenkins.model.JenkinsLocationConfiguration.xml which is not generated until a manual job is triggered. This is jenkinsURL is necessary for some plugins like the `stashnotifier-plugin`

Version-Release number of selected component (if applicable):
registry.access.redhat.com/openshift3/jenkins-2-rhel7 v3.6.173.0.49-5

How reproducible:
Always

Steps to Reproduce:
1. deploy jenkins from template (ephemeral or persistent)

Actual results:
The file /var/lib/jenkins.model.JenkinsLocationConfiguration.xml does not exist.

Expected results:
File /var/lib/jenkins.model.JenkinsLocationConfiguration.xml should exist and contain a jenkinsUrl element with a valid value

Additional info:
When a new job is manually created, then the file is created. Below an example:

<?xml version='1.0' encoding='UTF-8'?>
<jenkins.model.JenkinsLocationConfiguration>
  <jenkinsUrl>https://jenkins.apps.example.com/</jenkinsUrl>
</jenkins.model.JenkinsLocationConfiguration>

Comment 1 Gabe Montero 2017-11-08 16:15:29 UTC
The only way I see this happening is a hack where one of our plugins (the login plugin would probably be the best choice) calls Jenkins.getInstance().getRootUrl() for the value and then populates this file.

Comment 2 Ben Parees 2017-11-08 17:01:31 UTC
I'm curious how/if this works in a typical jenkins deployment.  What creates the file and when?

If this is jenkins behavior (that the file is not created until a job is manually created) then i don't see why we would be responsible for doing anything differently.

From what i can tell from a little experimenting, this is totally driven by jenkins behavior and you'd have to open an issue w/ upstream jenkins to get them to change how/when that file is created.

Comment 3 Cesar Wong 2017-11-08 19:06:02 UTC
I ran a simple non-scientific test by running the jenkins.war by itself. The jenkins.model.JenkinsLocationConfiguration.xml file is not created until I make a change to the config and save it.

Comment 6 Ruben Romero Montes 2017-12-15 10:53:09 UTC
Issue filed on Jenkins project:
  https://issues.jenkins-ci.org/browse/JENKINS-48079

Thanks for the effort


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