Remove deprecated ceilometer-dbsync

Change-Id: Ib7875909cc6b997fb25003cbd48eb1434b20fd35
This commit is contained in:
Julien Danjou 2016-10-19 15:02:20 +02:00
parent 97183a872b
commit 779673534f
6 changed files with 18 additions and 20 deletions

View File

@ -20,14 +20,14 @@ from six import moves
import six.moves.urllib.parse as urlparse
import sqlalchemy as sa
from ceilometer.i18n import _LE, _LI, _LW
from ceilometer.i18n import _LE, _LI
from ceilometer import service
from ceilometer import storage
LOG = log.getLogger(__name__)
def upgrade(default_skip_gnocchi_resource_types=False):
def upgrade():
cfg.CONF.register_cli_opts([
cfg.BoolOpt('skip-metering-database',
help='Skip metering database upgrade.',
@ -37,7 +37,7 @@ def upgrade(default_skip_gnocchi_resource_types=False):
default=False),
cfg.BoolOpt('skip-gnocchi-resource-types',
help='Skip gnocchi resource-types upgrade.',
default=default_skip_gnocchi_resource_types),
default=False),
])
service.prepare_service()
@ -61,12 +61,6 @@ def upgrade(default_skip_gnocchi_resource_types=False):
gnocchi_client.upgrade_resource_types(cfg.CONF)
def dbsync():
LOG.warning(_LW('ceilometer-dbsync is deprecated in favor of '
'ceilometer-upgrade'))
upgrade(default_skip_gnocchi_resource_types=True)
def expirer():
service.prepare_service()

View File

@ -38,8 +38,9 @@ class BinTestCase(base.BaseTestCase):
super(BinTestCase, self).tearDown()
os.remove(self.tempfile)
def test_dbsync_run(self):
subp = subprocess.Popen(['ceilometer-dbsync',
def test_upgrade_run(self):
subp = subprocess.Popen(['ceilometer-upgrade',
'--skip-gnocchi-resource-types',
"--config-file=%s" % self.tempfile])
self.assertEqual(0, subp.wait())

View File

@ -67,8 +67,8 @@ upgrade_project ceilometer $RUN_DIR $BASE_DEVSTACK_BRANCH $TARGET_DEVSTACK_BRANC
# Migrate the database
# NOTE(chdent): As we evolve BIN_DIR is likely to be defined, but
# currently it is not.
CEILOMETER_BIN_DIR=$(dirname $(which ceilometer-dbsync))
$CEILOMETER_BIN_DIR/ceilometer-dbsync || die $LINENO "DB sync error"
CEILOMETER_BIN_DIR=$(dirname $(which ceilometer-upgrade))
$CEILOMETER_BIN_DIR/ceilometer-upgrade --skip-gnocchi-resource-types || die $LINENO "ceilometer-upgrade error"
# Start Ceilometer
start_ceilometer

View File

@ -31,12 +31,12 @@ one pass.
1. Upgrade the database (if applicable)
Run ceilometer-dbsync to upgrade the database if using one of Ceilometer's
databases (see :ref:`choosing_db_backend`). The database does not need to be
taken offline as no data is modified or deleted. Ideally this should be done
during a period of low activity. Best practices should still be followed
(ie. back up your data). If not using a Ceilometer database, you should
consult the documentation of that storage beforehand.
Run ceilometer-upgrade to upgrade the storage backend if using one of
Ceilometer's databases (see :ref:`choosing_db_backend`). The database does
not need to be taken offline. Ideally this should be done during a period of
low activity. Best practices should still be followed (ie. back up your
data). If not using a Ceilometer database, you should consult the
documentation of that storage beforehand.
2. Upgrade the collector service(s)

View File

@ -0,0 +1,4 @@
---
other:
- The deprecated ceilometer-dbsync has been removed.
Use ceilometer-upgrade instead.

View File

@ -259,7 +259,6 @@ console_scripts =
ceilometer-polling = ceilometer.cmd.polling:main
ceilometer-agent-notification = ceilometer.cmd.agent_notification:main
ceilometer-send-sample = ceilometer.cmd.sample:send_sample
ceilometer-dbsync = ceilometer.cmd.storage:dbsync
ceilometer-upgrade = ceilometer.cmd.storage:upgrade
ceilometer-db-legacy-clean = ceilometer.cmd.storage:db_clean_legacy
ceilometer-expirer = ceilometer.cmd.storage:expirer