From 4a35fe9ea2dfe644f43d0dfd67b31148927d0cb7 Mon Sep 17 00:00:00 2001 From: Jimmy McCrory Date: Mon, 8 May 2017 16:02:33 -0700 Subject: [PATCH] Remove unused properties from environment files The 'service_name' property is a holdover from when there was a common role used to install all OpenStack services. This is now a default variable within each individual role. Similarly, the 'log_directory' property for galera containers is now handled by the 'log_dirs' variable within its playbook. The dynamic inventory script has been updated to create an empty 'properties' dict for any container skeletons within the environment that do not have one already defined. Change-Id: Icd852f24251c1cef0fa162d33e2422be83e0a833 --- deploy-guide/source/app-custom-layouts.rst | 2 -- osa_toolkit/generate.py | 4 ++-- playbooks/inventory/env.d/aodh.yml | 2 -- playbooks/inventory/env.d/barbican.yml | 2 -- playbooks/inventory/env.d/ceilometer.yml | 3 --- playbooks/inventory/env.d/ceph.yml | 3 --- playbooks/inventory/env.d/cinder.yml | 3 --- playbooks/inventory/env.d/designate.yml | 2 -- playbooks/inventory/env.d/galera.yml | 3 --- playbooks/inventory/env.d/glance.yml | 1 - playbooks/inventory/env.d/gnocchi.yml | 2 -- playbooks/inventory/env.d/haproxy.yml | 1 - playbooks/inventory/env.d/heat.yml | 4 ---- playbooks/inventory/env.d/horizon.yml | 2 -- playbooks/inventory/env.d/ironic.yml | 3 --- playbooks/inventory/env.d/keystone.yml | 2 -- playbooks/inventory/env.d/magnum.yml | 2 -- playbooks/inventory/env.d/memcache.yml | 2 -- playbooks/inventory/env.d/molteniron.yml | 2 -- playbooks/inventory/env.d/neutron.yml | 4 ---- playbooks/inventory/env.d/nova.yml | 13 ------------- playbooks/inventory/env.d/octavia.yml | 2 -- playbooks/inventory/env.d/pkg_repo.yml | 2 -- playbooks/inventory/env.d/rabbitmq.yml | 2 -- playbooks/inventory/env.d/rsyslog.yml | 2 -- playbooks/inventory/env.d/sahara.yml | 2 -- playbooks/inventory/env.d/swift-remote.yml | 1 - playbooks/inventory/env.d/swift.yml | 5 ----- playbooks/inventory/env.d/trove.yml | 2 -- playbooks/inventory/env.d/unbound.yml | 2 -- playbooks/inventory/env.d/utility.yml | 2 -- 31 files changed, 2 insertions(+), 82 deletions(-) diff --git a/deploy-guide/source/app-custom-layouts.rst b/deploy-guide/source/app-custom-layouts.rst index 14b4f7d500..c20b719744 100644 --- a/deploy-guide/source/app-custom-layouts.rst +++ b/deploy-guide/source/app-custom-layouts.rst @@ -148,8 +148,6 @@ following steps: contains: - galera properties: - log_directory: mysql_logs - service_name: galera is_metal: true .. note:: diff --git a/osa_toolkit/generate.py b/osa_toolkit/generate.py index 564c20b08e..d17bb015b2 100755 --- a/osa_toolkit/generate.py +++ b/osa_toolkit/generate.py @@ -682,7 +682,7 @@ def container_skel_load(container_skel, inventory, config): key, container_type, inventory, - value.get('properties') + value.get('properties', {}) ) else: cidr_networks = config.get('cidr_networks') @@ -932,7 +932,7 @@ def _check_config_settings(cidr_networks, config, container_skel): # search for any container that doesn't have is_metal flag set to true is_provider_networks_needed = False for key, value in container_skel.iteritems(): - properties = value.get('properties') + properties = value.get('properties', {}) is_metal = properties.get('is_metal', False) if not is_metal: is_provider_networks_needed = True diff --git a/playbooks/inventory/env.d/aodh.yml b/playbooks/inventory/env.d/aodh.yml index 73a6abecde..aa1a2604d0 100644 --- a/playbooks/inventory/env.d/aodh.yml +++ b/playbooks/inventory/env.d/aodh.yml @@ -22,8 +22,6 @@ container_skel: - aodh_listener - aodh_alarm_evaluator - aodh_alarm_notifier - properties: - service_name: aodh physical_skel: metering-alarm_containers: diff --git a/playbooks/inventory/env.d/barbican.yml b/playbooks/inventory/env.d/barbican.yml index b9ef685964..2906a06007 100644 --- a/playbooks/inventory/env.d/barbican.yml +++ b/playbooks/inventory/env.d/barbican.yml @@ -24,8 +24,6 @@ container_skel: - key-manager_containers contains: - barbican_api - properties: - service_name: barbican physical_skel: key-manager_containers: diff --git a/playbooks/inventory/env.d/ceilometer.yml b/playbooks/inventory/env.d/ceilometer.yml index efb2f465a7..63c1bca315 100644 --- a/playbooks/inventory/env.d/ceilometer.yml +++ b/playbooks/inventory/env.d/ceilometer.yml @@ -17,8 +17,6 @@ container_skel: contains: - ceilometer_agent_central - ceilometer_agent_notification - properties: - service_name: ceilometer metering-compute_container: belongs_to: - metering-compute_containers @@ -26,7 +24,6 @@ container_skel: - ceilometer_agent_compute properties: is_metal: true - service_name: ceilometer physical_skel: metering-compute_containers: diff --git a/playbooks/inventory/env.d/ceph.yml b/playbooks/inventory/env.d/ceph.yml index 707e6e9841..cfe6f26ae2 100644 --- a/playbooks/inventory/env.d/ceph.yml +++ b/playbooks/inventory/env.d/ceph.yml @@ -27,8 +27,6 @@ container_skel: - ceph-mon_containers contains: - ceph-mon - properties: - service_name: ceph ceph-osd_container: belongs_to: - ceph-osd_containers @@ -36,7 +34,6 @@ container_skel: - ceph-osd properties: is_metal: true - service_name: ceph physical_skel: ceph-mon_containers: diff --git a/playbooks/inventory/env.d/cinder.yml b/playbooks/inventory/env.d/cinder.yml index ce39488ae5..04158a2a5a 100644 --- a/playbooks/inventory/env.d/cinder.yml +++ b/playbooks/inventory/env.d/cinder.yml @@ -35,8 +35,6 @@ container_skel: contains: - cinder_api - cinder_scheduler - properties: - service_name: cinder cinder_volumes_container: belongs_to: - storage_containers @@ -51,7 +49,6 @@ container_skel: # leave is_metal off, alternatively you will have to migrate your volumes once # deployed on metal. is_metal: true - service_name: cinder physical_skel: diff --git a/playbooks/inventory/env.d/designate.yml b/playbooks/inventory/env.d/designate.yml index 8893e58af9..367bc44823 100644 --- a/playbooks/inventory/env.d/designate.yml +++ b/playbooks/inventory/env.d/designate.yml @@ -44,8 +44,6 @@ container_skel: - designate_worker - designate_producer - designate_sink - properties: - service_name: designate physical_skel: dnsaas_containers: diff --git a/playbooks/inventory/env.d/galera.yml b/playbooks/inventory/env.d/galera.yml index d994506b1a..5f7e6b4104 100644 --- a/playbooks/inventory/env.d/galera.yml +++ b/playbooks/inventory/env.d/galera.yml @@ -26,9 +26,6 @@ container_skel: - shared-infra_containers contains: - galera - properties: - log_directory: mysql_logs - service_name: galera physical_skel: diff --git a/playbooks/inventory/env.d/glance.yml b/playbooks/inventory/env.d/glance.yml index f50dc86f71..5e14c893bb 100644 --- a/playbooks/inventory/env.d/glance.yml +++ b/playbooks/inventory/env.d/glance.yml @@ -31,7 +31,6 @@ container_skel: - glance_api - glance_registry properties: - service_name: glance container_fs_size: 12G diff --git a/playbooks/inventory/env.d/gnocchi.yml b/playbooks/inventory/env.d/gnocchi.yml index 5a54412c28..4bce5fc0db 100644 --- a/playbooks/inventory/env.d/gnocchi.yml +++ b/playbooks/inventory/env.d/gnocchi.yml @@ -28,8 +28,6 @@ container_skel: contains: - gnocchi_api - gnocchi_metricd - properties: - service_name: gnocchi physical_skel: metrics_containers: diff --git a/playbooks/inventory/env.d/haproxy.yml b/playbooks/inventory/env.d/haproxy.yml index 42ad085d4a..dea5d2f0cb 100644 --- a/playbooks/inventory/env.d/haproxy.yml +++ b/playbooks/inventory/env.d/haproxy.yml @@ -26,7 +26,6 @@ container_skel: contains: - haproxy properties: - service_name: haproxy is_metal: true physical_skel: diff --git a/playbooks/inventory/env.d/heat.yml b/playbooks/inventory/env.d/heat.yml index 7b708eeb4b..df2ea8f077 100644 --- a/playbooks/inventory/env.d/heat.yml +++ b/playbooks/inventory/env.d/heat.yml @@ -37,16 +37,12 @@ container_skel: - heat_api_cloudwatch - heat_api_cfn - heat_api - properties: - service_name: heat heat_engine_container: belongs_to: - orchestration_containers - os-infra_containers contains: - heat_engine - properties: - service_name: heat physical_skel: diff --git a/playbooks/inventory/env.d/horizon.yml b/playbooks/inventory/env.d/horizon.yml index 631f6a5a54..e0640679f8 100644 --- a/playbooks/inventory/env.d/horizon.yml +++ b/playbooks/inventory/env.d/horizon.yml @@ -26,8 +26,6 @@ container_skel: - os-infra_containers contains: - horizon - properties: - service_name: horizon physical_skel: diff --git a/playbooks/inventory/env.d/ironic.yml b/playbooks/inventory/env.d/ironic.yml index dbba82af0f..c04447fade 100644 --- a/playbooks/inventory/env.d/ironic.yml +++ b/playbooks/inventory/env.d/ironic.yml @@ -37,8 +37,6 @@ container_skel: - ironic_api - ironic_conductor - ironic_server - properties: - service_name: ironic ironic_compute_container: belongs_to: - ironic-compute_containers @@ -50,7 +48,6 @@ container_skel: - neutron_openvswitch_agent properties: is_metal: false - service_name: nova physical_skel: diff --git a/playbooks/inventory/env.d/keystone.yml b/playbooks/inventory/env.d/keystone.yml index 3c11b505d9..7b579f3add 100644 --- a/playbooks/inventory/env.d/keystone.yml +++ b/playbooks/inventory/env.d/keystone.yml @@ -25,8 +25,6 @@ container_skel: - identity_containers contains: - keystone - properties: - service_name: keystone physical_skel: diff --git a/playbooks/inventory/env.d/magnum.yml b/playbooks/inventory/env.d/magnum.yml index c22200c8cd..0df3ad2c3e 100644 --- a/playbooks/inventory/env.d/magnum.yml +++ b/playbooks/inventory/env.d/magnum.yml @@ -27,8 +27,6 @@ container_skel: - magnum-infra_containers contains: - magnum - properties: - service_name: magnum physical_skel: magnum-infra_containers: diff --git a/playbooks/inventory/env.d/memcache.yml b/playbooks/inventory/env.d/memcache.yml index f25e9b2519..ec6c577863 100644 --- a/playbooks/inventory/env.d/memcache.yml +++ b/playbooks/inventory/env.d/memcache.yml @@ -26,8 +26,6 @@ container_skel: - shared-infra_containers contains: - memcached - properties: - service_name: memcached physical_skel: diff --git a/playbooks/inventory/env.d/molteniron.yml b/playbooks/inventory/env.d/molteniron.yml index 7b920d306b..5f15443df3 100644 --- a/playbooks/inventory/env.d/molteniron.yml +++ b/playbooks/inventory/env.d/molteniron.yml @@ -25,8 +25,6 @@ container_skel: - molteniron-server_containers contains: - molteniron - properties: - service_name: molteniron physical_skel: molteniron-server_containers: diff --git a/playbooks/inventory/env.d/neutron.yml b/playbooks/inventory/env.d/neutron.yml index 92e01b9e32..2b39b80f22 100644 --- a/playbooks/inventory/env.d/neutron.yml +++ b/playbooks/inventory/env.d/neutron.yml @@ -63,15 +63,11 @@ container_skel: - neutron_dhcp_agent - neutron_lbaas_agent - neutron_bgp_dragent - properties: - service_name: neutron neutron_server_container: belongs_to: - network_containers contains: - neutron_server - properties: - service_name: neutron physical_skel: diff --git a/playbooks/inventory/env.d/nova.yml b/playbooks/inventory/env.d/nova.yml index a173a0f980..5d2af12adc 100644 --- a/playbooks/inventory/env.d/nova.yml +++ b/playbooks/inventory/env.d/nova.yml @@ -44,24 +44,18 @@ container_skel: - os-infra_containers contains: - nova_api_metadata - properties: - service_name: nova nova_api_os_compute_container: belongs_to: - compute-infra_containers - os-infra_containers contains: - nova_api_os_compute - properties: - service_name: nova nova_api_placement_container: belongs_to: - compute-infra_containers - os-infra_containers contains: - nova_api_placement - properties: - service_name: nova nova_compute_container: belongs_to: - compute_containers @@ -72,31 +66,24 @@ container_skel: - nova_compute properties: is_metal: true - service_name: nova nova_conductor_container: belongs_to: - compute-infra_containers - os-infra_containers contains: - nova_conductor - properties: - service_name: nova nova_scheduler_container: belongs_to: - compute-infra_containers - os-infra_containers contains: - nova_scheduler - properties: - service_name: nova nova_console_container: belongs_to: - compute-infra_containers - os-infra_containers contains: - nova_console - properties: - service_name: nova physical_skel: diff --git a/playbooks/inventory/env.d/octavia.yml b/playbooks/inventory/env.d/octavia.yml index a444cfd303..157b573fc3 100644 --- a/playbooks/inventory/env.d/octavia.yml +++ b/playbooks/inventory/env.d/octavia.yml @@ -37,8 +37,6 @@ container_skel: - octavia-worker - octavia-housekeeping - octavia-health-manager - properties: - service_name: octavia physical_skel: octavia-infra_containers: diff --git a/playbooks/inventory/env.d/pkg_repo.yml b/playbooks/inventory/env.d/pkg_repo.yml index b59952399d..73de9ee458 100644 --- a/playbooks/inventory/env.d/pkg_repo.yml +++ b/playbooks/inventory/env.d/pkg_repo.yml @@ -25,8 +25,6 @@ container_skel: - repo-infra_containers contains: - pkg_repo - properties: - service_name: repo physical_skel: diff --git a/playbooks/inventory/env.d/rabbitmq.yml b/playbooks/inventory/env.d/rabbitmq.yml index cefe815c70..d753e14d83 100644 --- a/playbooks/inventory/env.d/rabbitmq.yml +++ b/playbooks/inventory/env.d/rabbitmq.yml @@ -26,8 +26,6 @@ container_skel: - shared-infra_containers contains: - rabbitmq - properties: - service_name: rabbitmq physical_skel: diff --git a/playbooks/inventory/env.d/rsyslog.yml b/playbooks/inventory/env.d/rsyslog.yml index 7094ec5880..67f95f4150 100644 --- a/playbooks/inventory/env.d/rsyslog.yml +++ b/playbooks/inventory/env.d/rsyslog.yml @@ -25,8 +25,6 @@ container_skel: - log_containers contains: - rsyslog - properties: - service_name: rsyslog physical_skel: diff --git a/playbooks/inventory/env.d/sahara.yml b/playbooks/inventory/env.d/sahara.yml index 3b4c9afe90..f3c62e10b9 100644 --- a/playbooks/inventory/env.d/sahara.yml +++ b/playbooks/inventory/env.d/sahara.yml @@ -26,8 +26,6 @@ container_skel: contains: - sahara_api - sahara_engine - properties: - service_name: sahara physical_skel: sahara-infra_containers: diff --git a/playbooks/inventory/env.d/swift-remote.yml b/playbooks/inventory/env.d/swift-remote.yml index c70db76421..b5ef181295 100644 --- a/playbooks/inventory/env.d/swift-remote.yml +++ b/playbooks/inventory/env.d/swift-remote.yml @@ -27,7 +27,6 @@ container_skel: - swift_remote properties: is_metal: true - service_name: swift physical_skel: diff --git a/playbooks/inventory/env.d/swift.yml b/playbooks/inventory/env.d/swift.yml index e73cd93b39..f43f06eb8d 100644 --- a/playbooks/inventory/env.d/swift.yml +++ b/playbooks/inventory/env.d/swift.yml @@ -34,8 +34,6 @@ container_skel: - swift-proxy_containers contains: - swift_proxy - properties: - service_name: swift swift_acc_container: belongs_to: - swift_containers @@ -43,7 +41,6 @@ container_skel: - swift_acc properties: is_metal: true - service_name: swift swift_obj_container: belongs_to: - swift_containers @@ -51,7 +48,6 @@ container_skel: - swift_obj properties: is_metal: true - service_name: swift swift_cont_container: belongs_to: - swift_containers @@ -59,7 +55,6 @@ container_skel: - swift_cont properties: is_metal: true - service_name: swift physical_skel: diff --git a/playbooks/inventory/env.d/trove.yml b/playbooks/inventory/env.d/trove.yml index 5d496708d5..e7cbbb73f0 100644 --- a/playbooks/inventory/env.d/trove.yml +++ b/playbooks/inventory/env.d/trove.yml @@ -35,8 +35,6 @@ container_skel: - trove_api - trove_conductor - trove_taskmanager - properties: - service_name: trove physical_skel: trove-infra_containers: diff --git a/playbooks/inventory/env.d/unbound.yml b/playbooks/inventory/env.d/unbound.yml index e2dc09d8c8..1d8da33f7a 100644 --- a/playbooks/inventory/env.d/unbound.yml +++ b/playbooks/inventory/env.d/unbound.yml @@ -24,8 +24,6 @@ container_skel: - unbound_containers contains: - unbound - properties: - service_name: unbound physical_skel: unbound_containers: diff --git a/playbooks/inventory/env.d/utility.yml b/playbooks/inventory/env.d/utility.yml index 66da659856..43e399b794 100644 --- a/playbooks/inventory/env.d/utility.yml +++ b/playbooks/inventory/env.d/utility.yml @@ -26,8 +26,6 @@ container_skel: - shared-infra_containers contains: - utility - properties: - service_name: utility physical_skel: