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

Debian post-inst clobbers working jenkins configuration with obsolete hudson configuration if /var/lib/hudson still exists

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • core
    • None
    • Ubuntu 12.04 LTS

      Background:

      • I had Hudson installed from http://hudson-ci.org/debian.
      • I upgraded Ubuntu from 10.04 LTS to 12.04 LTS.
      • I installed Jenkins 1.424 from stock Ubuntu repos (and ended up with both Hudson and Jenkins installed side by side, which was kind of nice for a gradual migration)
      • I moved all the jobs from Hudson to Jenkins manually, cleaning them up as I went, then shut down Hudson and disabled its startup script
      • As time passed I kept making changes to Jenkins (new jobs, etc.)

      Summary of the situation:

      • a hudson package is still installed from the old hudson-ci repo
      • jenkins and jenkins-common packages are installed from Ubuntu repos
      • /var/lib/hudson exists with old configuration
      • /var/lib/jenkins exists with new configuration
      • /var/lib/jenkins is a mountpoint for an ext4 filesystem (/var was too small)

      What I did next:

      What I expected:

      • jenkins is upgraded and doesn't destroy my working configuration in /var/lib/jenkins

      What actually happened:

      • important configuration files like /var/lib/jenkins/config.xml and /var/lib/jenkins/.gitconfig were overwritten with stale copies from /var/lib/hudson

      It's a good thing I had a backup!

      There were other speedbumps along the road, and I'll file separate bugs for them:

      • a conflict with a file from Ubuntu's jenkins-common, which I had to resolve by manually apt-get removing jenkins-common, after which I could run apt-get install jenkins again to continue the upgrade
      • jenkins's post-install script failed with a bunch of errors like

      mv: inter-device move failed: `/var/lib/hudson/jobs' to `/var/lib/jenkins/jobs'; unable to remove target: Is a directory

      and to continue I had to mv /var/lib/hudson /var/lib/hudson.DO-NOT-TOUCH and run dpkg --configure --pending.

            Unassigned Unassigned
            mgedmin Marius Gedminas
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: