提交 68178574 编写于 作者: M Marbin Tan 提交者: Marbin Tan

Removing gpmigrator

gpmigrator and gpmigrator_mirror are older utilities
to help the upgrade from 4.2 -> 4.3.
This is no longer necessary; we are removing all
related gpmigrator calls and mentions.

* Remove gpmigrator from travis
* Remove upgrade test
Signed-off-by: NChumki Roy <croy@pivotal.io>
上级 62125d58
......@@ -95,7 +95,6 @@ script:
- initdb --version
- createdb --version
- psql --version
- gpmigrator --version
- gpssh --version
- gpmapreduce --version
- gpfdist --version
......
......@@ -889,8 +889,6 @@ SET_VERSION_SCRIPTS = \
bin/gpinitsystem \
bin/gpload.py \
bin/gplogfilter \
bin/gpmigrator \
bin/gpmigrator_mirror \
bin/gpmovemirrors \
bin/gprecoverseg \
bin/gpreload \
......
......@@ -20,8 +20,6 @@ SET_VERSION_SCRIPTS = \
bin/gpinitsystem \
bin/gpload.py \
bin/gplogfilter \
bin/gpmigrator \
bin/gpmigrator_mirror \
bin/gpmovemirrors \
bin/gprecoverseg \
bin/gpreload \
......
......@@ -43,7 +43,6 @@ bin/gpload - Sets env variables and calls gpload.py
List of Management Scripts Written in Python (no libraries)
-----------------------------------------------------------
bin/gpload.py - Loads data into a Greenplum Database
bin/gpmigrator - Upgrades from previous versions
bin/gpsys1 - Print system information on a host (???)
......
此差异已折叠。
此差异已折叠。
......@@ -1684,7 +1684,6 @@ def createTempDirectoryName(masterDataDirectory, tempDirPrefix):
#-------------------------------------------------------------------------
# gp_dbid methods moved to gp_dbid.py, but this class was left here
# to avoid changing gpmigrator and gpmigrator_mirror (which is the only caller).
#
class GpCreateDBIdFile(Command):
......
......@@ -19,8 +19,8 @@ STANDBY_DBID_RE = re.compile(r"standby_dbid\s*=\s*(\d+)")
class GpDbidFile:
"""
Used by gpstart, gpinitstandby, gpactivatestandby and indirectly
by gpmigrator via gpsetdbid.py to manage the gp_dbid file.
Used by gpstart, gpinitstandby, and gpactivatestandby
via gpsetdbid.py to manage the gp_dbid file.
"""
def __init__(self, datadir, do_read=False, logger=None):
......
......@@ -1494,7 +1494,6 @@ class GpArray:
(called by gpexpand.)
Note: Currently this is only used by the gpexpand rollback facility,
and by gpmigrator utility,
there is currently NO expectation that this file format is saved
on disk in any long term fashion.
......
import unittest2 as unittest
from gppylib.operations.gpMigratorUtil import is_supported_version, UpgradeError
from gppylib.gpversion import GpVersion
class MigratorTests(unittest.TestCase):
def test_is_supported_version_weird(self):
v = GpVersion('4.4.0.0 build monkey')
with self.assertRaisesRegexp(UpgradeError,
"Greenplum Version '4.4.0.0 build monkey' is not supported for upgrade"):
is_supported_version(v)
def test_is_supported_version_low(self):
v = GpVersion('main') << 2
with self.assertRaisesRegexp(UpgradeError,
"Greenplum Version '4.1.0.0 build dev' is not supported for upgrade"):
is_supported_version(v)
def test_is_supported_version_high(self):
v = GpVersion('99.99')
with self.assertRaisesRegexp(UpgradeError,
"To upgrade Greenplum Version '99.99 build dev' use the upgrade tool shipped with that release"):
is_supported_version(v)
#!/usr/bin/env python
#
# Copyright (c) Pivotal Inc 2014. All Rights Reserved.
#
import os
import unittest2 as unittest
from gppylib.gpversion import GpVersion
from gppylib.operations.gpMigratorUtil import is_supported_version
from mock import patch, MagicMock, Mock
class IsSupportedVersionTestCase(unittest.TestCase):
def test_is_supported_version_major_version_upgrade(self):
v = GpVersion('4.3.0.0')
self.assertTrue(is_supported_version(v))
def test_is_supported_minor_version_upgrade(self):
v = GpVersion('4.3.8.0')
self.assertTrue(is_supported_version(v))
def test_is_supported_dev_build_version_upgrade(self):
v = GpVersion('4.3 build dev')
self.assertTrue(is_supported_version(v))
def test_is_supported_version_hotfix_upgrade(self):
v = GpVersion('4.3.7.3EC7')
self.assertTrue(is_supported_version(v))
def test_is_supported_version_major_version_unsupported_upgrade(self):
v = GpVersion('4.0.0.0')
with self.assertRaisesRegexp(Exception, "Greenplum Version '4.0.0.0 build dev' is not supported for upgrade"):
is_supported_version(v)
def test_is_supported_version_awesome_build_upgrade(self):
v = GpVersion('4.3.3.4__AWESOME_BUILD__')
self.assertTrue(is_supported_version(v))
def test_is_supported_version_space_in_build_upgrade(self):
v = GpVersion('4.3.3.4 EC7')
self.assertTrue(is_supported_version(v))
def test_is_supported_version_major_version_downgrade(self):
v = GpVersion('4.3.0.0')
self.assertTrue(is_supported_version(v, False))
def test_is_supported_minor_version_downgrade(self):
v = GpVersion('4.3.8.0')
self.assertTrue(is_supported_version(v, False))
def test_is_supported_dev_build_version_downgrade(self):
v = GpVersion('4.3 build dev')
self.assertTrue(is_supported_version(v, False))
def test_is_supported_version_hotfix_downgrade(self):
v = GpVersion('4.3.7.3EC7')
self.assertTrue(is_supported_version(v, False))
def test_is_supported_version_major_version_unsupported_downgrade(self):
v = GpVersion('4.0.0.0')
with self.assertRaisesRegexp(Exception, "Greenplum Version '4.0.0.0 build dev' is not supported for downgrade"):
is_supported_version(v, False)
def test_is_supported_version_awesome_build_downgrade(self):
v = GpVersion('4.3.3.4__AWESOME_BUILD__')
self.assertTrue(is_supported_version(v, False))
def test_is_supported_version_space_in_build_downgrade(self):
v = GpVersion('4.3.3.4 EC7')
self.assertTrue(is_supported_version(v))
#!/bin/bash
#
# gpmigrator requires calling itself on individual hosts, but it is a python script
# so it needs certain environment variables to be setup before it can successfully
# execute itself.
#
# This is a bash script (since /bin/bash is guaranteed) that sets up the environment
# needed to execute a python script. It uses the path to itself as the basis from
# which it determines GPHOME.
......
......@@ -11,9 +11,6 @@ gpbitmapreindex -m { r | d | {l [-o <output_sql_file>]} }
[-h <master_host>] [-p <master_port>]
[-n <number_of_processes>] [-v]
gpmigrator --version
gpmigrator --help | -?
*****************************************************
......
COMMAND NAME: gpmigrator
Upgrades an existing Greenplum Database 4.2.x system
without mirrors to 4.3.x.
Use gpmigrator_mirror to upgrade a 4.2.x system that
has mirrors.
NOTE: Using gpmigrator on a system with mirrors causes
an error.
*****************************************************
SYNOPSIS
*****************************************************
gpmigrator <old_GPHOME_path> <new_GPHOME_path>
[-d <master_data_directory>]
[-l <logfile_directory>] [-q]
[--check-only] [--debug] [-R]
gpmigrator --version | -v
gpmigrator --help | -h
*****************************************************
PREREQUISITES
*****************************************************
The following tasks should be performed prior to executing an upgrade:
* Make sure you are logged in to the master host as the Greenplum Database
superuser (gpadmin).
* Install the Greenplum Database 4.3 binaries on all Greenplum hosts.
* Copy any custom modules you use into your 4.3 installation. Make sure
you obtain the latest version of any custom modules and that they are
compatible with Greenplum Database 4.3.
* Copy or preserve any additional folders or files (such as backup folders)
that you have added in the Greenplum data directories or $GPHOME directory.
Only files or folders strictly related to Greenplum Database operations are
preserved by the migration utility.
* (Optional) Run VACUUM on all databases, and remove old server log files
from pg_log in your master and segment data directories. This is not required,
but will reduce the size of Greenplum Database files to be backed up and migrated.
* Check for and recover any failed segments in your current Greenplum Database
system (gpstate, gprecoverseg).
* (Optional, but highly recommended) Backup your current databases (gpcrondump
or ZFS snapshots). If you find any issues when testing your upgraded system,
you can restore this backup.
* Remove the standby master from your system configuration (gpinitstandby -r).
* Do a clean shutdown of your current system (gpstop).
* Update your environment to source the 4.3 installation.
* Inform all database users of the upgrade and lockout time frame. Once the
upgrade is in process, users will not be allowed on the system until the
upgrade is complete.
*****************************************************
DESCRIPTION
*****************************************************
The gpmigrator utility upgrades an existing Greenplum Database 4.2.x.x
system without mirrors to 4.3. This utility updates the system catalog
and internal version number, but not the actual software binaries.
During the migration process, all client connections to Greenplum
Database will be locked out.
*****************************************************
OPTIONS
*****************************************************
<old_GPHOME_path>
Required. The absolute path to the current version of Greenplum
Database software you want to migrate away from.
<new_GPHOME_path>
Required. The absolute path to the new version of Greenplum Database
software you want to migrate to.
-d <master_data_directory>
Optional. The current master host data directory. If not specified,
the value set for $MASTER_DATA_DIRECTORY will be used.
-l <logfile_directory>
The directory to write the log file. Defaults to ~/gpAdminLogs.
-q (quiet mode)
Run in quiet mode. Command output is not displayed on the screen, but is
still written to the log file.
-R (revert)
In the event of an error during upgrade, reverts all changes made by gpmigrator.
--check-only
Runs pre-migrate checks to verify that your database is healthy.
Checks include:
* Check catalog health
* Check that the Greenplum Database binaries on each segment match
those on the master
* Check for a minimum amount of free disk space
NOTE: Performing a pre-migration check of your database should done
during a database maintenance period. If the utility detects catalog
errors, the utility stops the database.
--help | -h
Displays the online help.
--debug
Sets logging level to debug.
--version | -v
Displays the version of this utility.
*****************************************************
EXAMPLE
*****************************************************
Upgrade to version 4.3.x from version 4.2.x (make sure you are using the
4.3 version of gpmigrator). This example upgrades to version 4.3.0.0
from version 4.2.6.3:
/usr/local/greenplum-db-4.3.0.0/bin/gpmigrator \
/usr/local/greenplum-db-4.2.6.3 \
/usr/local/greenplum-db-4.3.0.0
*****************************************************
SEE ALSO
*****************************************************
gpmigrator_mirror, gpstop, gpstate, gprecoverseg, gpcrondump
\ No newline at end of file
COMMAND NAME: gpmigrator_mirror
Upgrades an existing Greenplum Database 4.2.x system
with mirrors to 4.3.x.
Use gpmigrator to upgrade a 4.2.x system that does not
have mirrors.
NOTE: Using gpmigrator_mirror on a system without mirrors
causes an error.
*****************************************************
SYNOPSIS
*****************************************************
gpmigrator_mirror <old_GPHOME_path> <new_GPHOME_path>
[-d <master_data_directory>]
[-l <logfile_directory>] [-q]
[--check-only] [--debug]
gpmigrator_mirror --version | -v
gpmigrator_mirror --help | -h
*****************************************************
PREREQUISITES
*****************************************************
The following tasks should be performed prior to executing an upgrade:
* Make sure you are logged in to the master host as the Greenplum Database
superuser (gpadmin).
* Install the Greenplum Database 4.3 binaries on all Greenplum hosts.
* Copy any custom modules you use into your 4.3 installation. Make sure
you obtain the latest version of any custom modules and that they are
compatible with Greenplum Database 4.3.
* Copy or preserve any additional folders or files (such as backup folders)
that you have added in the Greenplum data directories or $GPHOME directory.
Only files or folders strictly related to Greenplum Database operations are
preserved by the migration utility.
* (Optional) Run VACUUM on all databases, and remove old server log files
from pg_log in your master and segment data directories. This is not required,
but will reduce the size of Greenplum Database files to be backed up and migrated.
* Check for and recover any failed segments in your current Greenplum Database
system (gpstate, gprecoverseg).
* (Optional, but highly recommended) Backup your current databases (gpcrondump
or ZFS snapshots). If you find any issues when testing your upgraded system,
you can restore this backup.
* Remove the standby master from your system configuration (gpinitstandby -r).
* Do a clean shutdown of your current system (gpstop).
* Update your environment to source the 4.3 installation.
* Inform all database users of the upgrade and lockout time frame. Once the
upgrade is in process, users will not be allowed on the system until the
upgrade is complete.
*****************************************************
DESCRIPTION
*****************************************************
The gpmigrator utility upgrades an existing Greenplum Database 4.2.x.x
system with mirrors to 4.3. This utility updates the system catalog
and internal version number, but not the actual software binaries.
During the migration process, all client connections to Greenplum
Database will be locked out.
*****************************************************
OPTIONS
*****************************************************
<old_GPHOME_path>
Required. The absolute path to the current version of Greenplum
Database software you want to migrate away from.
<new_GPHOME_path>
Required. The absolute path to the new version of Greenplum Database
software you want to migrate to.
-d <master_data_directory>
Optional. The current master host data directory. If not specified,
the value set for $MASTER_DATA_DIRECTORY will be used.
-l <logfile_directory>
The directory to write the log file. Defaults to ~/gpAdminLogs.
-q (quiet mode)
Run in quiet mode. Command output is not displayed on the screen, but is
still written to the log file.
--check-only
Runs pre-migrate checks to verify that your database is healthy.
Checks include:
* Check catalog health
* Check that the Greenplum Database binaries on each segment match
those on the master
* Check for a minium amount of free disk space
NOTE: Performing a pre-migration check of your database should done
during a database maintenance period. If the utility detects catalog
errors, the utility stops the database.
--help | -h
Displays the online help.
--debug
Sets logging level to debug.
--version | -v
Displays the version of this utility.
*****************************************************
EXAMPLE
*****************************************************
Upgrade to version 4.3.x from version 4.2.x with mirrors (make sure you
are using the 4.3 version of gpmigrator_mirror). This example upgrades
to 4.3.0.0 from 4.2.6.3:
/usr/local/greenplum-db-4.3.0.0/bin/gpmigrator_mirror \
/usr/local/greenplum-db-4.2.6.3 \
/usr/local/greenplum-db-4.3.0.0
*****************************************************
SEE ALSO
*****************************************************
gpmigrator, gpstop, gpstate, gprecoverseg, gpcrondump
\ No newline at end of file
此差异已折叠。
......@@ -88,8 +88,6 @@
<topicref href="utility_guide/admin_utilities/gplogfilter.xml"/>
<topicref href="utility_guide/admin_utilities/gpmapreduce.xml"/>
<topicref href="utility_guide/admin_utilities/gpmfr.xml"/>
<topicref href="utility_guide/admin_utilities/gpmigrator.xml"/>
<topicref href="utility_guide/admin_utilities/gpmigrator_mirror.xml"/>
<!-- hidden until testing is complete -msk
<topicref href="utility_guide/admin_utilities/gpmovemirrors.xml"/>
-->
......
......@@ -4,9 +4,8 @@
<topic id="topic1"><title id="oq141610">gpbitmapreindex</title><body><p>Rebuilds bitmap indexes after a 3.3.x to 4.0.x upgrade.</p><section id="section2"><title>Synopsis</title><codeblock><b>gpbitmapreindex</b> <b>-m</b> { <b>r</b> | <b>d</b> | {<b>l</b> [<b>-o</b> <varname>output_sql_file</varname>]} }
[<b>-h</b> <varname>master_host</varname>] [<b>-p</b> <varname>master_port</varname>] [<b>-n</b> <varname>number_of_processes</varname>] [<b>-v</b>]
<b>gpmigrator</b> <b>--version</b>
<b>gpmigrator</b> <b>--help</b> | <b>-?</b></codeblock></section><section id="section3"><title>Description</title><p>The on-disk format of bitmap indexes has changed from release 3.3.x to 4.0.x. Users who upgrade
</codeblock></section><section id="section3"><title>Description</title><p>The on-disk format of bitmap indexes has changed from release 3.3.x to 4.0.x. Users who upgrade
must rebuild all bitmap indexes after upgrading to 4.0. The <codeph>gpbitmapreindex</codeph>
utility facilitates the upgrade of bitmap indexes by either running the
<codeph>REINDEX</codeph> command to reindex them, or running the <codeph>DROP
......@@ -24,4 +23,4 @@ can be used to recreate the bitmap indexes.</pd></plentry><plentry><pt>-p <varna
is listening for connections. If not specified, reads from the environment
variable <codeph>PGPORT</codeph> or defaults to 5432.</pd></plentry><plentry><pt>-v | --verbose</pt><pd>Show verbose output.</pd></plentry><plentry><pt>--version</pt><pd>Displays the version of this utility. </pd></plentry><plentry><pt>-? | --help</pt><pd>Displays the online help.</pd></plentry></parml></section><section id="section5"><title>Examples</title><p>Reindex all bitmap indexes:</p><codeblock>gpbitmapreindex -m r</codeblock><p>Output a file of SQL commands that can be used to recreate all bitmap
indexes:</p><codeblock>gpbitmapreindex -m list --outfile /home/gpadmin/bmp_ix.sql</codeblock><p>Drop all bitmap indexes and run in verbose mode:</p><codeblock>gpbitmapreindex -m d -v</codeblock></section><section id="section6"><title>See Also</title><p><i>Greenplum Database Reference Guide</i>: <codeph>REINDEX</codeph>,<codeph> DROP
INDEX</codeph>,<codeph> CREATE INDEX</codeph></p></section></body></topic>
\ No newline at end of file
INDEX</codeph>,<codeph> CREATE INDEX</codeph></p></section></body></topic>
......@@ -83,12 +83,6 @@
<p>
<xref href="gpmfr.xml#topic1" type="topic" format="dita"/>
</p>
<p>
<xref href="gpmigrator.xml#topic1" type="topic" format="dita"/>
</p>
<p>
<xref href="gpmigrator_mirror.xml#topic1" type="topic" format="dita"/>
</p>
<!-- hidden until testing is complete -msk
<p>
<xref href="gpmovemirrors.xml#topic1"/>
......
......@@ -23,8 +23,6 @@
<topicref href="admin_utilities/gplogfilter.xml"/>
<topicref href="admin_utilities/gpmapreduce.xml"/>
<topicref href="admin_utilities/gpmfr.xml"/>
<topicref href="admin_utilities/gpmigrator.xml"/>
<topicref href="admin_utilities/gpmigrator_mirror.xml"/>
<!-- hidden until testing is complete -msk
<topicref href="admin_utilities/gpmovemirrors.xml"/>
-->
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册