switch instance_discovery to libvirt_metadata
Since Gnocchi is the recommended backend, and other are deprecated. We can switch instance_discovery to the libvirt_metadata. Change-Id: Ib846b87bfb76c359fdec28d6cd258781fd201348
This commit is contained in:
parent
40da6c9748
commit
13aeba410b
@ -41,7 +41,7 @@ OPTS = [
|
|||||||
'compute agents to be run simultaneously. '
|
'compute agents to be run simultaneously. '
|
||||||
'(replaced by instance_discovery_method)'),
|
'(replaced by instance_discovery_method)'),
|
||||||
cfg.StrOpt('instance_discovery_method',
|
cfg.StrOpt('instance_discovery_method',
|
||||||
default='naive',
|
default='libvirt_metadata',
|
||||||
choices=['naive', 'workload_partitioning', 'libvirt_metadata'],
|
choices=['naive', 'workload_partitioning', 'libvirt_metadata'],
|
||||||
help="Ceilometer offers many methods to discover the instance"
|
help="Ceilometer offers many methods to discover the instance"
|
||||||
"running on a compute node: \n"
|
"running on a compute node: \n"
|
||||||
|
@ -124,6 +124,9 @@ class TestDiscovery(base.BaseTestCase):
|
|||||||
self.CONF.set_override('host', 'test')
|
self.CONF.set_override('host', 'test')
|
||||||
|
|
||||||
def test_normal_discovery(self):
|
def test_normal_discovery(self):
|
||||||
|
self.CONF.set_override("instance_discovery_method",
|
||||||
|
"naive",
|
||||||
|
group="compute")
|
||||||
dsc = discovery.InstanceDiscovery(self.CONF)
|
dsc = discovery.InstanceDiscovery(self.CONF)
|
||||||
resources = dsc.discover(mock.MagicMock())
|
resources = dsc.discover(mock.MagicMock())
|
||||||
|
|
||||||
@ -140,6 +143,9 @@ class TestDiscovery(base.BaseTestCase):
|
|||||||
self.CONF.host, "2016-01-01T00:00:00+00:00")
|
self.CONF.host, "2016-01-01T00:00:00+00:00")
|
||||||
|
|
||||||
def test_discovery_with_resource_update_interval(self):
|
def test_discovery_with_resource_update_interval(self):
|
||||||
|
self.CONF.set_override("instance_discovery_method",
|
||||||
|
"naive",
|
||||||
|
group="compute")
|
||||||
self.CONF.set_override("resource_update_interval", 600,
|
self.CONF.set_override("resource_update_interval", 600,
|
||||||
group="compute")
|
group="compute")
|
||||||
dsc = discovery.InstanceDiscovery(self.CONF)
|
dsc = discovery.InstanceDiscovery(self.CONF)
|
||||||
|
@ -243,7 +243,6 @@ function _ceilometer_configure_storage_backend {
|
|||||||
iniset $CEILOMETER_CONF DEFAULT meter_dispatchers database
|
iniset $CEILOMETER_CONF DEFAULT meter_dispatchers database
|
||||||
iniset $CEILOMETER_CONF database metering_connection mongodb://localhost:27017/ceilometer
|
iniset $CEILOMETER_CONF database metering_connection mongodb://localhost:27017/ceilometer
|
||||||
elif [ "$CEILOMETER_BACKEND" = 'gnocchi' ] ; then
|
elif [ "$CEILOMETER_BACKEND" = 'gnocchi' ] ; then
|
||||||
iniset $CEILOMETER_CONF compute instance_discovery_method libvirt_metadata
|
|
||||||
iniset $CEILOMETER_CONF DEFAULT meter_dispatchers gnocchi
|
iniset $CEILOMETER_CONF DEFAULT meter_dispatchers gnocchi
|
||||||
iniset $CEILOMETER_CONF DEFAULT event_dispatchers gnocchi
|
iniset $CEILOMETER_CONF DEFAULT event_dispatchers gnocchi
|
||||||
# NOTE(gordc): set higher retry in case gnocchi is started after ceilometer on a slow machine
|
# NOTE(gordc): set higher retry in case gnocchi is started after ceilometer on a slow machine
|
||||||
|
@ -0,0 +1,7 @@
|
|||||||
|
---
|
||||||
|
upgrade:
|
||||||
|
- |
|
||||||
|
Ceilometer legacy backends and Ceilometer API are now deprecated. Polling
|
||||||
|
all nova instances from compute agent is no more required with Gnocchi. So
|
||||||
|
we switch the [compute]instance_discovery_method to libvirt_metadata.
|
||||||
|
To switch back to the old deprecated behavior you can set it back to 'naive'.
|
Loading…
x
Reference in New Issue
Block a user