From b45460429dd65bccb9ee238de91695dc08913d7c Mon Sep 17 00:00:00 2001 From: Pradeep Kilambi Date: Fri, 22 Sep 2017 11:40:03 -0400 Subject: [PATCH] Always install gnocchi when ceilometer is enabled Dropping the CONFIG_GNOCCHI_INSTALL command line option and lets install gnocchi when ceilometer is enabled. Combining these two makes sense as database doesnt exist anymore for ceilometer. Change-Id: I18a724048541b84579866429ebc648a32661d661 (cherry picked from commit d4b28f35627242bf2f9a7353633e97dd94b74eac) --- docs/packstack.rst | 5 +---- packstack/plugins/gnocchi_790.py | 6 ++---- packstack/plugins/prescript_000.py | 14 -------------- .../puppet/modules/packstack/manifests/apache.pp | 2 +- .../packstack/manifests/mariadb/services.pp | 3 +-- .../packstack/manifests/mariadb/services_remote.pp | 2 +- packstack/puppet/templates/controller.pp | 8 ++++---- ...ve-config-gnocchi-install-ecfe10ce59f1d0da.yaml | 6 ++++++ tests/scenario001.sh | 1 - tests/scenario002.sh | 1 - 10 files changed, 16 insertions(+), 32 deletions(-) create mode 100644 releasenotes/notes/remove-config-gnocchi-install-ecfe10ce59f1d0da.yaml diff --git a/docs/packstack.rst b/docs/packstack.rst index 65c0d4b3c..ff7a1577f 100755 --- a/docs/packstack.rst +++ b/docs/packstack.rst @@ -60,14 +60,11 @@ Global Options Specify 'y' to install OpenStack Object Storage (swift). ['y', 'n'] **CONFIG_CEILOMETER_INSTALL** - Specify 'y' to install OpenStack Metering (ceilometer). ['y', 'n'] + Specify 'y' to install OpenStack Metering (ceilometer). Note this will also automatically install gnocchi service and configures it as the metrics backend. ['y', 'n'] **CONFIG_AODH_INSTALL** Specify 'y' to install OpenStack Telemetry Alarming (Aodh). Note Aodh requires Ceilometer to be installed as well. ['y', 'n'] -**CONFIG_GNOCCHI_INSTALL** - Specify 'y' to install OpenStack Metering as a Service (gnocchi). ['y', 'n'] - **CONFIG_PANKO_INSTALL** Specify 'y' to install OpenStack Events Service (panko). ['y', 'n'] diff --git a/packstack/plugins/gnocchi_790.py b/packstack/plugins/gnocchi_790.py index 98c6f985f..56c433dc5 100644 --- a/packstack/plugins/gnocchi_790.py +++ b/packstack/plugins/gnocchi_790.py @@ -62,8 +62,7 @@ def initConfig(controller): update_params_usage(basedefs.PACKSTACK_DOC, gnocchi_params) def use_gnocchi(config): - return (config['CONFIG_CEILOMETER_INSTALL'] == 'y' and - config['CONFIG_GNOCCHI_INSTALL'] == 'y') + return config['CONFIG_CEILOMETER_INSTALL'] == 'y' gnocchi_groups = [ {"GROUP_NAME": "GNOCCHI", @@ -79,8 +78,7 @@ def initConfig(controller): def initSequences(controller): - if (controller.CONF['CONFIG_GNOCCHI_INSTALL'] != 'y' or - controller.CONF['CONFIG_CEILOMETER_INSTALL'] != 'y'): + if controller.CONF['CONFIG_CEILOMETER_INSTALL'] != 'y': return steps = [{'title': 'Preparing Gnocchi entries', diff --git a/packstack/plugins/prescript_000.py b/packstack/plugins/prescript_000.py index c239e34cb..39aa902d3 100755 --- a/packstack/plugins/prescript_000.py +++ b/packstack/plugins/prescript_000.py @@ -231,20 +231,6 @@ def initConfig(controller): "NEED_CONFIRM": False, "CONDITION": False}, - {"CMD_OPTION": "os-gnocchi-install", - "PROMPT": ( - "Should Packstack install OpenStack Resource Metering (Gnocchi)" - ), - "OPTION_LIST": ["y", "n"], - "VALIDATORS": [validators.validate_options], - "DEFAULT_VALUE": "y", - "MASK_INPUT": False, - "LOOSE_VALIDATION": False, - "CONF_NAME": "CONFIG_GNOCCHI_INSTALL", - "USE_DEFAULT": False, - "NEED_CONFIRM": False, - "CONDITION": False}, - {"CMD_OPTION": "os-panko-install", "PROMPT": ( "Should Packstack install OpenStack Events Service (Panko)" diff --git a/packstack/puppet/modules/packstack/manifests/apache.pp b/packstack/puppet/modules/packstack/manifests/apache.pp index 63bd1cd26..f97458137 100644 --- a/packstack/puppet/modules/packstack/manifests/apache.pp +++ b/packstack/puppet/modules/packstack/manifests/apache.pp @@ -27,7 +27,7 @@ class packstack::apache () apache::listen { '8042': } } - if hiera('CONFIG_GNOCCHI_INSTALL') == 'y' { + if hiera('CONFIG_CEILOMETER_INSTALL') == 'y' { # Gnocchi port apache::listen { '8041': } } diff --git a/packstack/puppet/modules/packstack/manifests/mariadb/services.pp b/packstack/puppet/modules/packstack/manifests/mariadb/services.pp index 366669ad8..9b6e7dc28 100755 --- a/packstack/puppet/modules/packstack/manifests/mariadb/services.pp +++ b/packstack/puppet/modules/packstack/manifests/mariadb/services.pp @@ -25,8 +25,7 @@ class packstack::mariadb::services () } } - if hiera('CONFIG_GNOCCHI_INSTALL') == 'y' and - hiera('CONFIG_CEILOMETER_INSTALL') == 'y' { + if hiera('CONFIG_CEILOMETER_INSTALL') == 'y' { class { '::gnocchi::db::mysql': password => hiera('CONFIG_GNOCCHI_DB_PW'), host => '%', diff --git a/packstack/puppet/modules/packstack/manifests/mariadb/services_remote.pp b/packstack/puppet/modules/packstack/manifests/mariadb/services_remote.pp index 87df08bd7..c22be4832 100755 --- a/packstack/puppet/modules/packstack/manifests/mariadb/services_remote.pp +++ b/packstack/puppet/modules/packstack/manifests/mariadb/services_remote.pp @@ -90,7 +90,7 @@ class packstack::mariadb::services_remote () { } } - if hiera('CONFIG_GNOCCHI_INSTALL') == 'y' { + if hiera('CONFIG_CEILOMETER_INSTALL') == 'y' { remote_database { 'gnocchi': ensure => 'present', charset => 'utf8', diff --git a/packstack/puppet/templates/controller.pp b/packstack/puppet/templates/controller.pp index 3999f3e20..e945056eb 100644 --- a/packstack/puppet/templates/controller.pp +++ b/packstack/puppet/templates/controller.pp @@ -168,10 +168,6 @@ if hiera('CONFIG_PROVISION_TEMPEST') == 'y' { include '::packstack::provision::tempest' } -if hiera('CONFIG_CEILOMETER_INSTALL') == 'y' and hiera('CONFIG_GNOCCHI_INSTALL') == 'y' { - include '::packstack::keystone::gnocchi' - include '::packstack::gnocchi' -} if hiera('CONFIG_CEILOMETER_INSTALL') == 'y' and hiera('CONFIG_PANKO_INSTALL') == 'y' { include '::packstack::keystone::panko' @@ -179,6 +175,10 @@ if hiera('CONFIG_CEILOMETER_INSTALL') == 'y' and hiera('CONFIG_PANKO_INSTALL') = } if hiera('CONFIG_CEILOMETER_INSTALL') == 'y' { + # setup gnocchi + include '::packstack::keystone::gnocchi' + include '::packstack::gnocchi' + # setup ceilometer include '::packstack::keystone::ceilometer' include '::packstack::ceilometer::rabbitmq' include '::packstack::ceilometer' diff --git a/releasenotes/notes/remove-config-gnocchi-install-ecfe10ce59f1d0da.yaml b/releasenotes/notes/remove-config-gnocchi-install-ecfe10ce59f1d0da.yaml new file mode 100644 index 000000000..c2b2ca0f9 --- /dev/null +++ b/releasenotes/notes/remove-config-gnocchi-install-ecfe10ce59f1d0da.yaml @@ -0,0 +1,6 @@ +--- +fixes: + - | + Remove CONFIG_GNOCCHI_INSTALL command line option and make gnocchi install + part of ceilometer install. We will always need gnocchi for ceilometer, so + this makes sense and one less option for user to worry about. diff --git a/tests/scenario001.sh b/tests/scenario001.sh index d828c8207..d63166a09 100755 --- a/tests/scenario001.sh +++ b/tests/scenario001.sh @@ -22,7 +22,6 @@ $SUDO packstack ${ADDITIONAL_ARGS} \ --default-password="packstack" \ --os-aodh-install=n \ --os-ceilometer-install=n \ - --os-gnocchi-install=n \ --os-swift-install=n \ --os-manila-install=y \ --os-horizon-ssl=y \ diff --git a/tests/scenario002.sh b/tests/scenario002.sh index 203967bb7..2b54a4169 100755 --- a/tests/scenario002.sh +++ b/tests/scenario002.sh @@ -23,7 +23,6 @@ $SUDO packstack ${ADDITIONAL_ARGS} \ --default-password="packstack" \ --os-aodh-install=n \ --os-ceilometer-install=n \ - --os-gnocchi-install=n \ --os-cinder-install=n \ --os-horizon-install=n \ --glance-backend=swift \