wiki:jessie-upgrade-tech-notes

Technical notes on upgrading from wheezy to jessie

Welcome to upgrade Saturday! Our plan is to upgrade all the moshes today.

Start by reviewing this page to familiarize yourself with the steps and the potential problems. Then, go to the upgrade page to see the list of servers. Edit the page and put your name next to the server you want to start with so we don't step on each other's toes. Then, when you are done, put a strike through the server to indicate that it is done. Feel free to work on a few at the same time.

Steps to take

  • Before starting, get puppet up to date (so puppet doesn't try to run during your upgrade)
      freepuppet-origin-pull-and-run
      freepuppet-run
    
  • Ensure current distribution is up to date:
    apt-get update
    apt-get dist-upgrade
    
  • Delete all files in /etc/apt/sources.list.d and /etc/apt/preferences.d (these are controlled by puppet and will be replaced when we next run puppet)
  • Edit /etc/apt/sources.list and change wheezy to jessie sed -i 's/wheezy/jessie/g' /etc/apt/sources.list
  • Run: apt-get update to update to the current distribution
  • Run: apt-get install dpkg apt mysql-server apache2 dovecot-core to update the package install tools and reduce downtime for core services
  • Run: apt-get upgrade to upgrade packages that don't have any new dependencies
  • Run: apt-get dist-upgrade to upgrade all packages
  • Install ruby-rgen
    apt-get install ruby-rgen
    
  • Delete /etc/puppet/puppet.conf
    rm -f /etc/puppet/puppet.conf
    
  • Run: freepuppet-origin-pull-and-run
  • Run: freepuppet-run
  • Run: apt-get update to refresh the package list
  • Run: apt-get dist-upgrade to pull in new packages based on puppet changes
  • Run: apt-get autoremove to remove any packages we no longer need
  • Run: deborphan look at additional unneeded packages
  • Run: apt-get purge $(deborphan) remove those unneeded packages.
  • Run: apt-get update && apt-get autoremove for completeness.
  • Edit /usr/local/etc/red/red_web_conf.apache2.conf Change:
    +$reload_apache_cmd = '/bin/systemctl restart apache2.service';
    -$reload_apache_cmd = '/etc/init.d/apache2 reload';
    
  • Run: mf-turn-off-auto-fscks to ensure we don't have to wait for fsck's on reboot
  • Check /etc/network/interfaces an make sure no additional interfaces are enabled. If there are additional resources, you may need to add a gateway stanza to them for the server to get networking access after reboot. Example:
    auto eth0:ibew177
    iface eth0:ibew177 inet static
            address 64.145.66.158 
            netmask 255.255.255.224
            network 64.145.66.128
            broadcast 64.145.66.159
            gateway 64.145.66.129
    
  • Run: shutdown -h now to reboot the system (yes, we say "-h" which means halt, but our virtualization engine will detect that it is off and restart it for us)
  • Rebuild all web configurations: /usr/local/share/red/node/sbin/red-regenerate-web-config
  • Ensure that postgrey is running. If not:
    systemctl enable postgrey
    systemctl start postgrey
    
  • Run: diff -u /etc/security/limits.conf.dpkg-old /etc/security/limits.conf. If you see ulimit settings removed, you'll need to restore them in /etc/security/limit.d/$(hostname).conf. (See ticket:11200 for elaboration.) If limits.conf.dpkg-old doesn't exist, then nothing to do.

Errors and special situations

  • When upgrading phpmyadmin you will be asked if you want to create the phpmyadmin database. Answer Yes. When prompted for the admin password, open a new root terminal and copy and paste the password in /root/.my.cnf.
  • Apache has changed from reading /etc/apache2/conf.d to reading /etc/apache2/conf-enabled (which should contain symlinks to /etc/apache2/conf-available). Apache may warn:
    Directory /etc/apache2/conf.d is not empty - leaving as is
    Please note, that directory is considered obsolete and not read anymore by default
    
    Do a directory listing of /etc/apache2/conf.d. If the only files you see are phpmyadmin and maxclients.conf, you can safely: rm -rf /etc/apache2/conf.d. If you see other files, check to see if they have been properly added to /etc/apache2/conf-{available,enabled}.
  • Apache may also warn:
    AH00526: Syntax error on line 9 of /etc/apache2/mods-enabled/php5.conf:
    Invalid command 'Order', perhaps misspelled or defined by a module not included in the server configuration
    
  • This seems to be due to the order in which Apache and PHP is ugpraded. You can ignore it.
  • Apache may warn about:
    The SSLCertificateChainFile directive (/etc/apache2/sites-enabled/001-octavia.mayfirst.org.ssl.conf:29) is deprecated, SSLCertificateFile should be used instead
    
    Many of our members still use a ChainFile. Jaime is working on fixing those. You can safely ignore this.

Configuration files to keep

When upgrading, you will be prompted to overwrite some files. You generally want to install the package maintainer's version. If we need to modify the file - those modifications should be handled by puppet so you don't have to worry about them when upgrading.

The following are exceptions to this rule. For the following files, please keep the local version:

  • /etc/cron.d/awstats
  • /etc/default/grub
  • /var/log/sysstat: The newer version of sysstat asks that you delete the current files, do it
Last modified 8 years ago Last modified on May 2, 2016, 10:53:07 AM