Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-12231

RPM upgrade does not honor JENKINS_USER, and always resets files ownership to "jenkins"

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • core
    • None
    • Linux, CentOS and Fedora. Using RPM installation and upgrade

      I have a Jenkins installation for which I changed the "JENKINS_USER" and "JENKINS_HOME" (in /etc/sysconfig/jenkins) from the defaults.
      When I do an upgrade via yum/RPM, it sets the ownership of /var/log/jenkins back to default user "jenkins" (instead of honoring my JENKINS_USER configuration).

      This prevents Jenkins from starting after an upgrade. And since it cannot write to the log file, it may not be easy to figure out what went wrong.

          [JENKINS-12231] RPM upgrade does not honor JENKINS_USER, and always resets files ownership to "jenkins"

          Code changed in jenkins
          User: Nicolas De loof
          Path:
          rpm/SPECS/jenkins.spec
          http://jenkins-ci.org/commit/jenkins/4335bd435f9e5258831c5631bfab2fd837fd7719
          Log:
          [FIXED JENKINS-12231] ensure right owner

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Nicolas De loof Path: rpm/SPECS/jenkins.spec http://jenkins-ci.org/commit/jenkins/4335bd435f9e5258831c5631bfab2fd837fd7719 Log: [FIXED JENKINS-12231] ensure right owner

          dogfood added a comment -

          Integrated in jenkins_main_trunk #3174
          [FIXED JENKINS-12231] ensure right owner (Revision 4335bd435f9e5258831c5631bfab2fd837fd7719)

          Result = SUCCESS
          Nicolas De Loof : 4335bd435f9e5258831c5631bfab2fd837fd7719
          Files :

          • rpm/SPECS/jenkins.spec

          dogfood added a comment - Integrated in jenkins_main_trunk #3174 [FIXED JENKINS-12231] ensure right owner (Revision 4335bd435f9e5258831c5631bfab2fd837fd7719) Result = SUCCESS Nicolas De Loof : 4335bd435f9e5258831c5631bfab2fd837fd7719 Files : rpm/SPECS/jenkins.spec

          This solution is really bad for me and for anyone with a very big jenkins installation, as the chown is taking around 1hr for each jenkins upgrade.

          Maybe the script could skip the chown if there is a specific sysconfig variable set? (SKIP_CHOWN?)

          Francisco Lozano added a comment - This solution is really bad for me and for anyone with a very big jenkins installation, as the chown is taking around 1hr for each jenkins upgrade. Maybe the script could skip the chown if there is a specific sysconfig variable set? (SKIP_CHOWN?)

          Georg Sash added a comment -

          I guess excluding the "jobs" sub directory in the data location from the chown operation would solve this.

          Georg Sash added a comment - I guess excluding the "jobs" sub directory in the data location from the chown operation would solve this.

          Still having the same problem:

          root     21289 21286  3 11:19 pts/0    00:00:02 chown -R jenkins /mnt/ebs/jenkins
          

          stuck for +1hr while updating jenkins:

            Updating   : jenkins-1.556-1.1.noarch                                                                                                                                                                                                                          263/505
          

          Francisco Lozano added a comment - Still having the same problem: root 21289 21286 3 11:19 pts/0 00:00:02 chown -R jenkins /mnt/ebs/jenkins stuck for +1hr while updating jenkins: Updating : jenkins-1.556-1.1.noarch 263/505

          Daniel Beck added a comment -

          Is there a reason the patch does not include /var/cache/jenkins? And that it's recursive is probably really unnecessary, as noted in JENKINS-23273.

          Francisco Lozano: Doesn't your /etc/sysconfig/jenkins define as JENKINS_USER the name of the Jenkins user?

          Daniel Beck added a comment - Is there a reason the patch does not include /var/cache/jenkins? And that it's recursive is probably really unnecessary, as noted in JENKINS-23273 . Francisco Lozano: Doesn't your /etc/sysconfig/jenkins define as JENKINS_USER the name of the Jenkins user?

          Olaf Lenz added a comment -

          I think that this issue is fixed. When setting the JENKINS_USER in /etc/sysconfig/jenkins, the ownership is set correctly. The problem about long times required to chown is handled in JENKINS-23273.

          Olaf Lenz added a comment - I think that this issue is fixed. When setting the JENKINS_USER in /etc/sysconfig/jenkins, the ownership is set correctly. The problem about long times required to chown is handled in JENKINS-23273 .

          Olaf Lenz added a comment -

          This is fixed since a while.

          Olaf Lenz added a comment - This is fixed since a while.

          Code changed in jenkins
          User: Nicolas De loof
          Path:
          SPECS/jenkins.spec
          http://jenkins-ci.org/commit/packaging/144b7bd6ec71092162030e648c02e879506f81fa
          Log:
          [FIXED JENKINS-12231] ensure right owner
          Originally-From: jenkins-ci.org/commit/core/4335bd435f9e5258831c5631bfab2fd837fd7719

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Nicolas De loof Path: SPECS/jenkins.spec http://jenkins-ci.org/commit/packaging/144b7bd6ec71092162030e648c02e879506f81fa Log: [FIXED JENKINS-12231] ensure right owner Originally-From: jenkins-ci.org/commit/core/4335bd435f9e5258831c5631bfab2fd837fd7719

          Code changed in jenkins
          User: Vojtěch-Zweibrücken-Šafařík
          Path:
          rpm/build/SPECS/jenkins.spec
          http://jenkins-ci.org/commit/packaging/d7b16bc1f25c534572ef238a885bb28571455b99
          Log:
          JENKINS-23273 Revert sticky bit to not reopen JENKINS-12231 like
          situations

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Vojtěch-Zweibrücken-Šafařík Path: rpm/build/SPECS/jenkins.spec http://jenkins-ci.org/commit/packaging/d7b16bc1f25c534572ef238a885bb28571455b99 Log: JENKINS-23273 Revert sticky bit to not reopen JENKINS-12231 like situations

            Unassigned Unassigned
            fernando Fernando Dobladez
            Votes:
            1 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved: