[JIRA] (JENKINS-58408) Jenkins configuration lost after safeRestart | Restart

12 views
Skip to first unread message

omar.velazquez@softtek.com (JIRA)

unread,
Jul 9, 2019, 2:36:02 PM7/9/19
to jenkinsc...@googlegroups.com
Omar Velazquez created an issue
 
Jenkins / Improvement JENKINS-58408
Jenkins configuration lost after safeRestart | Restart
Issue Type: Improvement Improvement
Assignee: Unassigned
Components: core, safe-restart
Created: 2019-07-09 18:35
Environment: Linux 3a2b97dce7c1 4.9.0-5-amd64 #1 SMP Debian 4.9.65-3+deb9u2 (2018-01-04) x86_64 GNU/Linux
Open JDK v1.8.0_212-b04
Jenkins ver. 2.176.1
Plugin saferestart ver. 0.3 
Jenkins Master is running on Docker container 
Docker image jenkins/jenkins:lts
Happening in Master Node
Browser: Chrome Version 75.0.3770.100 (Official Build) (64-bit)
Labels: jenkins config.xml configuration
Priority: Major Major
Reporter: Omar Velazquez

 

Jenkins configuration is lost after  safeRestart or Restart, is happening in all our Jenkins instances

Configuration that is lost:

  • Global security -> Matrix-based security : users and groups are missing, just 'original' configuration remains, I mean, all those users and groups generated at first time when Jenkins instance is provisioned.
  • Master executor changed from 1 to 0

From script console: "ls -lrt /var/jenkins_home/".execute().text

      1. Before restart:

drwxr-xr-x 4 root root 4096 Jul 9 12:20 backups
drwxr-xr-x 154 root root 28672 Jul 9 12:42 plugins
drwxr-xr-x 4 root root 4096 Jul 9 12:45 users
drwxr-xr-x 4 root root 4096 Jul 9 12:45 jobs
rw-rr- 1 root root 131 Jul 9 12:45 queue.xml.bak
rw-rr- 1 root root 16343 Jul 9 12:45 config.xml
rw-rr- 1 root root 7 Jul 9 12:45 jenkins.install.InstallUtil.lastExecVersion
rw-rr- 1 root root 0 Jul 9 13:03 ThinBackup Worker Thread.log

      1. After restart:

drwxr-xr-x 4 root root 4096 Jul 9 12:20 backups
drwxr-xr-x 154 root root 28672 Jul 9 12:42 plugins
drwxr-xr-x 4 root root 4096 Jul 9 12:45 users
drwxr-xr-x 4 root root 4096 Jul 9 12:45 jobs
rw-rr- 1 root root 131 Jul 9 13:06 queue.xml.bak
rw-rr- 1 root root 156 Jul 9 13:06 hudson.model.UpdateCenter.xml
rw-rr- 1 root root 907 Jul 9 13:06 nodeMonitors.xml
rw-rr- 1 root root 121 Jul 9 13:06 de.theit.jenkins.crowd.CrowdSecurityRealm.xml
rw-rr- 1 root root 7 Jul 9 13:06 jenkins.install.InstallUtil.lastExecVersion
rw-rr- 1 root root 0 Jul 9 13:06 ThinBackup Worker Thread.log
rw-rr- 1 root root 262 Jul 9 13:06 jenkins.model.JenkinsLocationConfiguration.xml
rw-rr- 1 root root 271 Jul 9 13:06 hudson.tasks.Mailer.xml
rw-rr- 1 root root 1401 Jul 9 13:06 hudson.plugins.emailext.ExtendedEmailPublisher.xml
rw-rr- 1 root root 747 Jul 9 13:06 com.cloudbees.jenkins.plugins.bitbucket.endpoints.BitbucketEndpointConfiguration.xml
rw-rr- 1 root root 932 Jul 9 13:06 hudson.plugins.sonar.SonarGlobalConfiguration.xml
rw-rr- 1 root root 686 Jul 9 13:06 hudson.plugins.sonar.SonarRunnerInstallation.xml
rw-rr- 1 root root 228 Jul 9 13:06 javaposse.jobdsl.plugin.GlobalJobDslSecurityConfiguration.xml
rw-rr- 1 root root 16426 Jul 9 13:06 config.xml

 

Thanks in advance

Add Comment Add Comment
 
This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)

omar.velazquez@softtek.com (JIRA)

unread,
Jul 9, 2019, 2:37:02 PM7/9/19
to jenkinsc...@googlegroups.com
Omar Velazquez updated an issue
Change By: Omar Velazquez
 

Jenkins configuration is lost after  safeRestart or Restart, is happening in all our Jenkins instances

Configuration that is lost:
* Global security -> Matrix-based security : users and groups are missing, just 'original' configuration remains, I mean, all those users and groups generated at first time when Jenkins instance is provisioned.
* Master executor changed from 1 to 0


From script console: "ls -lrt /var/jenkins_home/".execute().text

### * Before restart: *

{color:#de350b}drwxr-xr-x 4 root root 4096 Jul 9 12:20 backups{color}
{color:#de350b}drwxr-xr-x 154 root root 28672 Jul 9 12:42 plugins{color}
{color:#de350b}drwxr-xr-x 4 root root 4096 Jul 9 12:45 users{color}
{color:#de350b}drwxr-xr-x 4 root root 4096 Jul 9 12:45 jobs{color}
{color:#de350b}-rw-r--r-- 1 root root 131 Jul 9 12:45 queue.xml.bak{color}
{color:#
FF0000 ff0000 }-rw-r--r-- 1 root root 16343 *Jul 9 12:45* *config.xml*{color}
-rw-r--r-- 1 root root 7 Jul 9 12:45 jenkins.install.InstallUtil.lastExecVersion
-rw-r--r-- 1 root root 0 Jul 9 13:03 ThinBackup Worker Thread.log

### * After restart rertart : *

{color:#de350b}drwxr-xr-x 4 root root 4096 Jul 9 12:20 backups{color}
{color:#de350b}drwxr-xr-x 154 root root 28672 Jul 9 12:42 plugins{color}
{color:#de350b}drwxr-xr-x 4 root root 4096 Jul 9 12:45 users{color}
{color:#de350b}drwxr-xr-x 4 root root 4096 Jul 9 12:45 jobs{color}
{color:#de350b}-rw-r--r-- 1 root root 131 Jul 9 13:06 queue.xml.bak{color}
-rw-r--r-- 1 root root 156 Jul 9 13:06 hudson.model.UpdateCenter.xml
-rw-r--r-- 1 root root 907 Jul 9 13:06 nodeMonitors.xml
-rw-r--r-- 1 root root 121 Jul 9 13:06 de.theit.jenkins.crowd.CrowdSecurityRealm.xml
-rw-r--r-- 1 root root 7 Jul 9 13:06 jenkins.install.InstallUtil.lastExecVersion
-rw-r--r-- 1 root root 0 Jul 9 13:06 ThinBackup Worker Thread.log
-rw-r--r-- 1 root root 262 Jul 9 13:06 jenkins.model.JenkinsLocationConfiguration.xml
-rw-r--r-- 1 root root 271 Jul 9 13:06 hudson.tasks.Mailer.xml
-rw-r--r-- 1 root root 1401 Jul 9 13:06 hudson.plugins.emailext.ExtendedEmailPublisher.xml
-rw-r--r-- 1 root root 747 Jul 9 13:06 com.cloudbees.jenkins.plugins.bitbucket.endpoints.BitbucketEndpointConfiguration.xml
-rw-r--r-- 1 root root 932 Jul 9 13:06 hudson.plugins.sonar.SonarGlobalConfiguration.xml
-rw-r--r-- 1 root root 686 Jul 9 13:06 hudson.plugins.sonar.SonarRunnerInstallation.xml
-rw-r--r-- 1 root root 228 Jul 9 13:06 javaposse.jobdsl.plugin.GlobalJobDslSecurityConfiguration.xml
{color:#de350b}-rw-r--r-- 1 root root 16426 *Jul 9 13:06* *config.xml*{color}

 

Thanks in advance

omar.velazquez@softtek.com (JIRA)

unread,
Jul 9, 2019, 2:37:02 PM7/9/19
to jenkinsc...@googlegroups.com
Omar Velazquez updated an issue
 

Jenkins configuration is lost after  safeRestart or Restart, is happening in all our Jenkins instances

Configuration that is lost:
* Global security -> Matrix-based security : users and groups are missing, just 'original' configuration remains, I mean, all those users and groups generated at first time when Jenkins instance is provisioned.
* Master executor changed from 1 to 0

From script console: "ls -lrt /var/jenkins_home/".execute().text

*Before restart:*


{color:#de350b}drwxr-xr-x 4 root root 4096 Jul 9 12:20 backups{color}
{color:#de350b}drwxr-xr-x 154 root root 28672 Jul 9 12:42 plugins{color}
{color:#de350b}drwxr-xr-x 4 root root 4096 Jul 9 12:45 users{color}
{color:#de350b}drwxr-xr-x 4 root root 4096 Jul 9 12:45 jobs{color}
{color:#de350b}-rw-r--r-- 1 root root 131 Jul 9 12:45 queue.xml.bak{color}
{color:#ff0000}-rw-r--r-- 1 root root 16343 *Jul 9 12:45* *config.xml*{color}

-rw-r--r-- 1 root root 7 Jul 9 12:45 jenkins.install.InstallUtil.lastExecVersion
-rw-r--r-- 1 root root 0 Jul 9 13:03 ThinBackup Worker Thread.log

*After rertart restart :*


{color:#de350b}drwxr-xr-x 4 root root 4096 Jul 9 12:20 backups{color}
{color:#de350b}drwxr-xr-x 154 root root 28672 Jul 9 12:42 plugins{color}
{color:#de350b}drwxr-xr-x 4 root root 4096 Jul 9 12:45 users{color}
{color:#de350b}drwxr-xr-x 4 root root 4096 Jul 9 12:45 jobs{color}
{color:#de350b}-rw-r--r-- 1 root root 131 Jul 9 13:06 queue.xml.bak{color}
-rw-r--r-- 1 root root 156 Jul 9 13:06 hudson.model.UpdateCenter.xml
-rw-r--r-- 1 root root 907 Jul 9 13:06 nodeMonitors.xml
-rw-r--r-- 1 root root 121 Jul 9 13:06 de.theit.jenkins.crowd.CrowdSecurityRealm.xml
-rw-r--r-- 1 root root 7 Jul 9 13:06 jenkins.install.InstallUtil.lastExecVersion
-rw-r--r-- 1 root root 0 Jul 9 13:06 ThinBackup Worker Thread.log
-rw-r--r-- 1 root root 262 Jul 9 13:06 jenkins.model.JenkinsLocationConfiguration.xml
-rw-r--r-- 1 root root 271 Jul 9 13:06 hudson.tasks.Mailer.xml
-rw-r--r-- 1 root root 1401 Jul 9 13:06 hudson.plugins.emailext.ExtendedEmailPublisher.xml
-rw-r--r-- 1 root root 747 Jul 9 13:06 com.cloudbees.jenkins.plugins.bitbucket.endpoints.BitbucketEndpointConfiguration.xml
-rw-r--r-- 1 root root 932 Jul 9 13:06 hudson.plugins.sonar.SonarGlobalConfiguration.xml
-rw-r--r-- 1 root root 686 Jul 9 13:06 hudson.plugins.sonar.SonarRunnerInstallation.xml
-rw-r--r-- 1 root root 228 Jul 9 13:06 javaposse.jobdsl.plugin.GlobalJobDslSecurityConfiguration.xml
{color:#de350b}-rw-r--r-- 1 root root 16426 *Jul 9 13:06* *config.xml*{color}

 

Thanks in advance

omar.velazquez@softtek.com (JIRA)

unread,
Jul 9, 2019, 3:47:02 PM7/9/19
to jenkinsc...@googlegroups.com
Omar Velazquez closed an issue as Fixed
 

Root cause located at initialization scripts, thanks

Change By: Omar Velazquez
Status: Open Closed
Resolution: Fixed

omar.velazquez@softtek.com (JIRA)

unread,
Jul 9, 2019, 3:58:02 PM7/9/19
to jenkinsc...@googlegroups.com
Root cause located at initialization scripts, thanks


Just clarify:

From Dockerfile:

COPY x_y.groovy /usr/share/jenkins/ref/init.groovy.d/x_y.groovy

[https://wiki.jenkins.io/display/JENKINS/Configuring+Jenkins+upon+start+up]

[https://wiki.jenkins.io/display/JENKINS/Post-initialization+script]

 
Reply all
Reply to author
Forward
0 new messages