Current KB applies to migration of Linux-based POA Management Node form hosts running RHEL/CentOS 4.x to hosts running RHEL/CentOS 5.x. It contains latest migration scripts, instructions and known issues.
Migration scripts
ZIP archive containing latest backup script and OA Updater RPM (restore script) is attached. To use the latest migration scripts perform the following before OA MN migration:
Upload attached
POA\MN\Migration\<version>.ZIP
to OA MNExtract ZIP contents
Upgrade OA Updater RPM package to one from current archive (use MN OS correponding RPM package)
Backup
/usr/local/pem/bin/backup.sh
file- Replace
/usr/local/pem/bin/backup.sh
file with one from ZIP archive
Migration instructions
OA 5.5 instruction see here.
Known issues
POA-82594 Migration could fail due to violation of package dependency
Symptom
During restore procedure the following error may occur during SaaS reinstall:
2014-11-11 11:18:51.618 WARN Package 'SaaS' failed to re-install due to error: ['/usr/local/pem/bin/ppm_ctl', '-f', '/usr/local/pem/etc/pleskd.props', '-b', '-q', 'reinstall', '1', '3023'] exited with non-zero status 1 Ignore this package and continue migration? ((Y)es/(N)o): n
In /var/log/poa-migrate.log:
ERROR [xinstallPackage] ExSystem: module_id:'PPM', ex_type_id:'3110',Message:'Command '/usr/local/pem/bin/saas_ctl upgrade_aps_db ../APS/database' execution failed with code 127: /usr/local/pem/bin/saas_ctl: error while loading shared libraries: libboost_regex.so.1.41.0: cannot open shared object file: No such file or directory', deprecated_codes = (0, 0), properties = { exit_code: '127',command: '/usr/local/pem/bin/saas_ctl upgrade_aps_db ../APS/database',stderr: '/usr/local/pem/bin/saas_ctl: error while loading shared libraries: libboost_regex.so.1.41.0: cannot open shared object file: No such file or directory', }
Cause
During MN restore OA PPM packages are being re-installed. Packages may be re-installed in wrong order.
Solution
1 Re-create OA MN backup using latest migration scripts.
2 If still no luck then perform the following:
In OA DB get component IDs:
plesk=> SELECT component_id, name FROM packages p JOIN components c ON (c.pkg_id = p.pkg_id) JOIN hosts h ON (c.host_id = h.host_id) WHERE c.uninstalled = 'n' AND h.host_id = 1 and name in ('libvirtualization', 'libservices'); component_id | name --------------+------------------- 3508 | libservices 3759 | libvirtualization (2 rows)
Execute the following commnads (specify component IDs from the previous query result):
/usr/local/pem/bin/ppm_ctl -f /usr/local/pem/etc/pleskd.props -b -q reinstall 1 3508 /usr/local/pem/bin/ppm_ctl -f /usr/local/pem/etc/pleskd.props -b -q reinstall 1 3759
Restart the migration
POA-82606 POA migration script does not create redis services on destination POA MN
Symptom
NG Web Hosting is used on installation
Solution
Create OA MN backup using latest migration scripts
Restore OA MN in accordance with instructions
Execute
sh POA_backup/redis_restore-<time stamp>.sh
- Login to OA CP as admin and perform NG cluster database sync
POA-85511 Migration of Management Node from RHEL/CentOS 4.x does not migrate SSH keys
Solution
Use latest migration scripts or manually copy SSH keys.
POA-83840 MN RHES4-CentOS6 migraton fails to reinstall package: Attempt to add package with bad signature
Solution
Ignore failed action. OA 5.5.8 will fix the issue permanently.
POA-82595 POA migration fails due to missing pgsql_firewall.sh
Symptom
2013-12-12 00:02:31.651 ERROR ExecFailed ['sh', '/root/POA_backup/pgsql_firewall.sh'] exited with non-zero status 127 2013-12-12 00:02:31.651 ERROR <class 'poaupdater.uUtil.ExecFailed'>
Solution
Grab
/usr/local/pem/bin/pgsql_firewall.sh
script from old OA installation and put it intoPOA_backup
directory- Rerun restore
WAP RPM is not installed to OA MN automatically after the migration.
Solution
- Obtain the same version of WAP RPM as installed on the source OA MN server and install it
- Copy the folder
/usr/local/share/WAP
from the source OA MN Restart WAP:
# service WAP restart
After the migration is done, set
onboot
parameter tono
for the source container (if MN was running inside the container):# grep -ri boot /vz/private/10/ve.conf ONBOOT="yes" # vzctl set 10 --onboot no --save Saved parameters for Container 10
There should be no packages of type
service
on POA MN except forPrivacyProxy
. The script checks it using the following query:++ psql -Uplesk -hlocalhost -d plesk -tAc 'SELECT STRING_AGG(name, '\'', '\'') FROM services WHERE host_id = 1 AND name NOT IN ('\''PrivacyProxy'\'');'
Therefore, if there are some services present on the Management Node (usually - logparser, proftpd, etc), they should be deleted from POA MN before migration.
backup.sh could fail with the following error:
dumping global objects server version: 9.1.6; pg_dumpall version: 8.1.11 aborting because of version mismatch (Use the -i option to proceed anyway.) backup.sh error: failed to dump global pgsql objects
It fails because the version of
pg_dumpall
is too old. To fix the error, please reinstall the packagepostgresql91*
on the POA Management Node.Restoration can fail with the following error:
2015-07-01 04:19:37.134 WARN Package 'PrivilegesEvents' failed to re-install due to error: ['/usr/local/pem/bin/ppm_ctl', '-f', '/usr/local/pem/etc/pleskd.props', '-b', '-q', 'reinstall', '1', '61'] exited with non-zero status 1
In
/var/log/poa-migrate.log
:ERROR [xinstallPackage] ExSystem: module_id:'db_service', ex_type_id:'1',Message:''ERROR: permission denied for relation dual; Error while executing the query' while ' INSERT INTO privilege_groups(name, mode) SELECT ?, ? FROM dual WHERE NOT EXISTS (SELECT 1 FROM privilege_groups WHERE name = ? )'', deprecated_codes = (0, 0), properties = { sqlcode: 'HY000',reason: 'ERROR: permission denied for relation dual; Error while executing the query',action: ' INSERT INTO privilege_groups(name, mode) SELECT ?, ? FROM dual WHERE NOT EXISTS (SELECT 1 FROM privilege_groups WHERE name = ? )', } TRACE [xinstallPackage] <=== EXIT [1.297927]
Solution
log in to psql with posgresq user:
psql -U postgres -h `hostname` plesk
assign all permissions for the user
plesk
todual
table:plesk=# GRANT ALL PRIVILEGES ON TABLE dual to plesk; GRANT
- retry the above-mentioned operation
Re-installation of redis package can fail with the following error:
2015-07-01 04:31:18.927 INFO Reinstall package (other-redis-2.4.12) to host 1 2015-07-01 04:31:29.439 WARN Package 'redis' failed to re-install due to error: ['/usr/local/pem/bin/ppm_ctl', '-f', '/usr/local/pem/etc/pleskd.props', '-b', '-q', 'reinstall', '1', '6214'] exited with non-zero status 1
Solution
assign correct ownership to redis.conf file:
chown redis:redis /etc/redis.conf
- retry the above-mentioned operation
POA-99598 Not possible to migrate management node
Symptoms:
The following error occurs:
ERROR IOError [Errno 2] No such file or directory: './upgrade/update.udl2'
Workaround:
Create subdirectory
'upgrade'
in directory where'install.py'
script is located and create file'update.udl2'
in that subdirectory with next content:<UDL2 name="poa-6.0" />
You could use following commands as example:
# mkdir upgrade # echo "<UDL2 name=\"poa-6.0\" />" > upgrade/update.udl2
Limitations of the migration procedure
- It is not possible to store MN backup on separate server (i.e. no remote backup/remote restore allowed)
Migration scripts moves both MN itself and database to one server. Therefore, if OA MN has remote DB, the following steps should be performed:
- assign the IP address allocated for the remote DB server to the destination MN server
- if it is changed, reflect these changes in the file
/usr/local/pem/etc/odbc.ini
- if required, after the migration is performed, split MN and DB using the article https://kb.cloudblue.com/113830
backup.sh
script does not compress data significantly, so the approximate size of the backup equals the size of DB +/usr/local/pem
folder. Some unneeded directories inside/usr/loca/pem
can be excluded from the backup using-x
parameter.