Use ePages Hotfixes | → 6.17.12 | Created: 6.14.3; Updated: 6.17.5 |
Table of Contents |
Each ePages version has its own hotfixes, say version 6.14.2 may have the hotfixes 6.14.2.1, 6.14.2.2 and 6.14.2.3. Each hotfix is based on the previous hotfix (but hotfix number 1); you can install hotfix 6.14.2.3 only if you installed 6.14.2.2 before (and ePages version is 6.14.2). Linux tools as yum or zypper (as described below) resolve such dependencies automatically.
Before installing a hofix you may read on web page http://www.epages.com/hotfix/VERSION/ what hotfixes for your version are available and what fixed bugs they include (where VERSION is your ePages version, e.g. http://www.epages.com/hotfix/6.14.2/ ).
If you use customized storetypes that have own cartridges (other than cartridges for storetype Store, as defined in $EPAGES/Cartridges/Cartridges.xml) then those storetypes must be reinstalled.
For Flex installations, neither [EPAGES_CUSTOM_STORETYPES] nor [reinstall_storetype] are relevant.
For Multistore installations, only [reinstall_storetype] is relevant, then run:
make reinstall_storetype STORE_TYPE=Master make reinstall_storetype STORE_TYPE=Multistore
If hotfix contains file Install/78-ReinstallCustomStoreTypes-shared.PL, you may set environment variable EPAGES_CUSTOM_STORETYPES to your customized storetypes, e.g.:
export EPAGES_CUSTOM_STORETYPES="MyStoreType MyOtherStoreType"
Put this line into /etc/default/epages6, then you don't need to set it always in the command line before installing a hotfix.
If hotfix does not contain file Install/78-ReinstallCustomStoreTypes-shared.PL, run reinstall_storetype for each customized storetype after hotfix installation, example:
. /etc/default/epages6 cd $EPAGES_CARTRIDGES/DE_EPAGES $PERL Makefile.PL make reinstall_storetype STORE_TYPE=MyStoreType make reinstall_storetype STORE_TYPE=MyOtherStoreType
A hotfix neither manages backup/restore nor downtime. It is strongly recommended that:
/etc/init.d/epages6 start_httpd close
After the installation open your shops by executing:
/etc/init.d/epages6 start_httpd open
This works only if you configured $EPAGES_CONFIG/WebInterface.conf properly, see Update Configuration to Restrict Outside Connections.
For Flex stores with ePages version 6.14.3 or higher, the installation of ePages hotfixes is enabled automatically:
rpm -q epages-hotfix-base
If the installation of ePages hotfixes is not enabled yet, run following command:
rpm -hiv http://www.epages.com/RPMS/epages-hotfix-base.noarch.rpm
The installation of the RPM package epages-hotfix-base is executed only once. After that you may install ePages hotfixes manually or automatically as a cronjob.
The installed RPM package provides you with:
→2 Automatic or manual installation of ePages hotfixes is executed by the script /etc/cron.daily/epages-hotfix (REDHAT means Redhat or CentOS):
# /etc/cron.daily/epages-hotfix -help Check if new hotfixes are available: /etc/cron.daily/epages-hotfix -check REDHAT ONLY: If new hotfixes are available, download them (do not install): /etc/cron.daily/epages-hotfix -download REDHAT ONLY: Install new hotfixes and show the output on the console: /etc/cron.daily/epages-hotfix -console REDHAT ONLY: Install new hotfixes silently, send an e-mail (used by cronjob): /etc/cron.daily/epages-hotfix The script gets configuration values from (see there): /etc/sysconfig/epages-hotfix
Following command just checks for new hotfixes (does not install):
# /etc/cron.daily/epages-hotfix -check New ePages hotfixes available for host: myhost.example.com: ============================================================================== Package Arch Version Repository ============================================================================== epages-hotfix-6_14_2_3 noarch 1-0 epages-hotfix
Following command installs all new hotfixes for your ePages version (output incomplete):
# /etc/cron.daily/epages-hotfix -console ... ========================================================================================= Package Arch Version Repository Size ========================================================================================= Installing: epages-hotfix-6_14_2_3 noarch 1-0 epages-hotfix 297 k Installing for dependencies: epages-hotfix-6_14_2_1 noarch 1-0 epages-hotfix 903 k epages-hotfix-6_14_2_2 noarch 1-0 epages-hotfix 141 k Transaction Summary ========================================================================================= Install 3 Package(s) Update 0 Package(s) Remove 0 Package(s) ...
You also may install single hotfixes by excuting yum directly:
yum --disablerepo '*' --enablerepo epages-hotfix install epages-hotfix-6_14_2_3
If the RPM package epages-hotfix-base is installed on RedHat/CentOS, /etc/cron.daily/epages-hotfix is executed each night, time depends on /etc/crontab. On my host the cronjob is executed 4:02 A.M.:
# grep cron.daily /etc/crontab 02 4 * * * root run-parts /etc/cron.daily
The init script /etc/init.d/epages-hotfix stops (or starts) the execution of /etc/cron.daily/epages-hotfix by cron:
# /etc/init.d/epages-hotfix stop Disabling nightly yum update: [ OK ] # /etc/init.d/epages-hotfix status Nightly update of ePages hotfixes is disabled. # /etc/init.d/epages-hotfix start Enabling nightly yum update: [ OK ] # /etc/init.d/epages-hotfix status Nightly update of ePages hotfixes is enabled.
The init script is started with each reboot:
# chkconfig --list epages-hotfix epages-hotfix 0:off 1:off 2:off 3:on 4:off 5:on 6:off
If you do not want to start /etc/init.d/epages-hotfix at boot time, disable it:
# chkconfig --del epages-hotfix
In the configuration file /etc/sysconfig/epages-hotfix you may define on what days of the week you want to run /etc/cron.daily/epages-hotfix by cron, simply adjust the value of DAYS_OF_WEEK=0123456 (default: each day) to your needs.
Patch and hotfix installation shall not be executed at once.
Therefore, /etc/init.d/epages-hotfix is used in ePages patches: the patch begins with /etc/init.d/epages-hotfix stop and ends with /etc/init.d/epages-hotfix start.
If a patch is installed with yum, it waits until a perhaps running hotfix installation has finished. If you install a patch package as .tag.gz under Linux (you should not!) make sure that no hotfix installation runs (execute /etc/init.d/epages-hotfix stop/start manually and wait until the hotfix installation has finished).
The hotfix installation script /etc/cron.daily/epages-hotfix is configured by /etc/sysconfig/epages-hotfix:
# Pass any given parameter to yum, as run in all the scripts invoked by # this package. Be aware that this is global, and yum is invoked in # several modes by these scripts for which your own parameter might not # be appropriate. YUM_PARAMETER="--disablerepo '*' --enablerepo epages-hotfix" # Don't install, just check (everything else than 'yes' is 'no'). CHECK_ONLY=no # Don't install, just check and download (everything else than 'yes' is # 'no'). DOWNLOAD_ONLY=no # RANDOMWAIT is used to wait random time before the yum update starts. # Default is 60 so yum waits random time from 1 to 60 minutes. RANDOMWAIT # is used only when executed as cronjob, on console yum doesn't wait. RANDOMWAIT=10 # If MAILTO is set and the mail command is available, the mail command is # used to deliver yum output. By default MAILTO is unset, so crond mails # the output by itself (example: MAILTO=root). MAILTO= # You may set SYSTEMNAME if you want your yum emails tagged differently. # Default is output of hostname command, this variable is used only if # MAILTO is set too. #SYSTEMNAME= # You may set DAYS_OF_WEEK to the days of the week you want to run. # Default is every day. #DAYS_OF_WEEK=0123456 # Set to yes to make the epages-hotfix service to wait for transactions # to complete. SERVICE_WAITS=yes # Set maximum time period (in seconds) for the epages-hotfix service to # wait for transactions to complete. The default is 300 seconds (5 minutes). SERVICE_WAIT_TIME=3600 # Init script lock file (don't change this). LOCK_SUBSYS=/var/lock/subsys/epages-hotfix # Cron script lock file (don't change this). LOCK_CRON=/var/lock/epages-hotfix.lock/pidfile # Yum transaction lock file (don't change this). LOCK_TS=/var/lock/epages-hotfix.lock/ts.lock
Hotfixes come in two flavours: RPM packages (as e.g. epages-hotfix-6_14_2_1-1-0.noarch.rpm) and tar.gz archives (as e.g. epages-hotfix-6.14.2.1.tar.gz). Both have the same content. The RPM package is unpacked into $EPAGES_SHARED/Patches, the tar.gz archive should be unpacked there as well.
Unpacking the package creates a directory with the hotfix name, e.g. $EPAGES_SHARED/Patches/epages-hotfix-6.14.2.1/ . The RPM package checks if the prerequisits are met; if not, the RPM package is not unpacked/installed.
After unpacking, perl install.PL is executed in the hotfix directory. If the RPM package should not start perl install.PL after unpacking, set and export the environment variable EPAGES_DO_PATCH on the command line, e.g.:
export EPAGES_DO_PATCH=0
The hotfix directory in $EPAGES_SHARED/Patches contains following files:
Make sure to close all outside connections before installing the hotfix and to open them afterwards, see Backup and Downtime.
Hotfix installation in distributed systems requires the installation of the RPM package epages-hotfix-base on all servers, see Enable Installation of ePages Hotfixes.
Install the hotfix first on the alpha server (a server that runs application processes), then on all other servers.
After successful hotfix installation, execute final tasks on the alpha server:
. /etc/default/epages6 $PERL $EPAGES_PATCHES/HotfixPostInstall.PL
In a distributed installation the alpha host executes all Perl scripts in <hotfix></hotfix>/Install/ that not end in '-local.PL'; all other servers execute all Perl scripts that not end in '-shared/-final.PL'.
If the hotfix fails on a single server or on the alpha server of a distributed installation, first remove line with hotfix version from $EPAGES_CONFIG/hotfixes/version.txt, e.g.:
grep -v 6.14.3.8 $EPAGES_CONFIG/hotfixes/version.txt > o && cat o > $EPAGES_CONFIG/hotfixes/version.txt
Then, in any case, run:
cd $EPAGES_PATCHES/epages-hotfix-*/ . /etc/default/epages6 $PERL Install/install.PL -nocheck