25 import sqlalchemy |
25 import sqlalchemy |
26 |
26 |
27 from openstack_common import alter_mysql_tables, create_backups, modify_conf, \ |
27 from openstack_common import alter_mysql_tables, create_backups, modify_conf, \ |
28 move_conf |
28 move_conf |
29 |
29 |
30 |
|
31 NOVA_CONF_MAPPINGS = { |
30 NOVA_CONF_MAPPINGS = { |
32 # Deprecated group/name |
31 # Deprecated group/name for Kilo |
33 ('DEFAULT', 'rabbit_durable_queues'): ('DEFAULT', 'amqp_durable_queues'), |
32 ('DEFAULT', 'network_device_mtu'): (None, None), |
34 ('rpc_notifier2', 'topics'): ('DEFAULT', 'notification_topics'), |
33 ('DEFAULT', 'log-format'): (None, None), |
35 ('DEFAULT', 'quota_injected_file_path_bytes'): |
34 ('DEFAULT', 'use-syslog'): (None, None), |
36 ('DEFAULT', 'quota_injected_file_path_length'), |
35 ('cinder', 'http_timeout'): ('cinder', 'timeout'), |
37 ('DEFAULT', 'log_config'): ('DEFAULT', 'log_config_append'), |
36 ('ironic', 'client_log_level'): (None, None), |
38 ('DEFAULT', 'logfile'): ('DEFAULT', 'log_file'), |
37 ('DEFAULT', 'osapi_max_request_body_size'): |
39 ('DEFAULT', 'logdir'): ('DEFAULT', 'log_dir'), |
38 ('oslo_middleware', 'max_request_body_size'), |
40 ('DEFAULT', 'cinder_catalog_info'): ('cinder', 'catalog_info'), |
39 ('neutron', 'ca_certificates_file'): ('neutron', 'cafile'), |
41 ('DEFAULT', 'cinder_endpoint_template'): ('cinder', 'endpoint_template'), |
40 ('neutron', 'admin_user_id'): (None, None), |
42 ('DEFAULT', 'os_region_name'): ('cinder', 'os_region_name'), |
41 ('neutron', 'admin_tenant_id'): (None, None), |
43 ('DEFAULT', 'cinder_ca_certificates_file'): |
42 ('DEFAULT', 'log_format'): (None, None), |
44 ('cinder', 'ca_certificates_file'), |
43 ('cinder', 'api_insecure'): ('cinder', 'insecure'), |
45 ('DEFAULT', 'cinder_http_retries'): ('cinder', 'http_retries'), |
44 ('DEFAULT', 'share_dhcp_address'): (None, None), |
46 ('DEFAULT', 'cinder_http_timeout'): ('cinder', 'http_timeout'), |
45 ('neutron', 'api_insecure'): ('neutron', 'insecure'), |
47 ('DEFAULT', 'cinder_api_insecure'): ('cinder', 'api_insecure'), |
46 ('cinder', 'ca_certificates_file'): ('cinder', 'cafile'), |
48 ('DEFAULT', 'cinder_cross_az_attach'): ('cinder', 'cross_az_attach'), |
47 ('neutron', 'url_timeout'): ('neutron', 'timeout'), |
49 ('DEFAULT', 'db_backend'): ('database', 'backend'), |
48 ('neutron', 'allow_duplicate_networks'): (None, None), |
50 ('DEFAULT', 'sql_connection'): ('database', 'connection'), |
|
51 ('sql', 'connection'): ('database', 'connection'), |
|
52 ('DEFAULT', 'sql_idle_timeout'): ('database', 'idle_timeout'), |
|
53 ('DATABASE', 'sql_idle_timeout'): ('database', 'idle_timeout'), |
|
54 ('sql', 'idle_timeout'): ('database', 'idle_timeout'), |
|
55 ('DEFAULT', 'sql_min_pool_size'): ('database', 'min_pool_size'), |
|
56 ('DATABASE', 'sql_min_pool_size'): ('database', 'min_pool_size'), |
|
57 ('DEFAULT', 'sql_max_pool_size'): ('database', 'max_pool_size'), |
|
58 ('DATABASE', 'sql_max_pool_size'): ('database', 'max_pool_size'), |
|
59 ('DEFAULT', 'sql_max_retries'): ('database', 'max_retries'), |
|
60 ('DATABASE', 'sql_max_retries'): ('database', 'max_retries'), |
|
61 ('DEFAULT', 'sql_retry_interval'): ('database', 'retry_interval'), |
|
62 ('DATABASE', 'reconnect_interval'): ('database', 'retry_interval'), |
|
63 ('DEFAULT', 'sql_max_overflow'): ('database', 'max_overflow'), |
|
64 ('DATABASE', 'sqlalchemy_max_overflow'): ('database', 'max_overflow'), |
|
65 ('DEFAULT', 'sql_connection_debug'): ('database', 'connection_debug'), |
|
66 ('DEFAULT', 'sql_connection_trace'): ('database', 'connection_trace'), |
|
67 ('DATABASE', 'sqlalchemy_pool_timeout'): ('database', 'pool_timeout'), |
|
68 ('DEFAULT', 'glance_host'): ('glance', 'host'), |
|
69 ('DEFAULT', 'glance_port'): ('glance', 'port'), |
|
70 ('DEFAULT', 'glance_protocol'): ('glance', 'protocol'), |
|
71 ('DEFAULT', 'glance_api_servers'): ('glance', 'api_servers'), |
|
72 ('DEFAULT', 'glance_api_insecure'): ('glance', 'api_insecure'), |
|
73 ('DEFAULT', 'glance_num_retries'): ('glance', 'num_retries'), |
|
74 ('DEFAULT', 'memcache_servers'): |
|
75 ('keystone_authtoken', 'memcached_servers'), |
|
76 ('DEFAULT', 'matchmaker_ringfile'): ('matchmaker_ring', 'ringfile'), |
|
77 ('DEFAULT', 'service_neutron_metadata_proxy'): |
|
78 ('neutron', 'service_metadata_proxy'), |
|
79 ('DEFAULT', 'neutron_metadata_proxy_shared_secret'): |
|
80 ('neutron', 'metadata_proxy_shared_secret'), |
|
81 ('DEFAULT', 'neutron_url'): ('neutron', 'url'), |
|
82 ('DEFAULT', 'neutron_url_timeout'): ('neutron', 'url_timeout'), |
|
83 ('DEFAULT', 'neutron_admin_username'): ('neutron', 'admin_username'), |
|
84 ('DEFAULT', 'neutron_admin_password'): ('neutron', 'admin_password'), |
|
85 ('DEFAULT', 'neutron_admin_tenant_id'): ('neutron', 'admin_tenant_id'), |
|
86 ('DEFAULT', 'neutron_admin_tenant_name'): ('neutron', 'admin_tenant_name'), |
|
87 ('DEFAULT', 'neutron_region_name'): ('neutron', 'region_name'), |
|
88 ('DEFAULT', 'neutron_admin_auth_url'): ('neutron', 'admin_auth_url'), |
|
89 ('DEFAULT', 'neutron_api_insecure'): ('neutron', 'api_insecure'), |
|
90 ('DEFAULT', 'neutron_auth_strategy'): ('neutron', 'auth_strategy'), |
|
91 ('DEFAULT', 'neutron_ovs_bridge'): ('neutron', 'ovs_bridge'), |
|
92 ('DEFAULT', 'neutron_extension_sync_interval'): |
|
93 ('neutron', 'extension_sync_interval'), |
|
94 ('DEFAULT', 'neutron_ca_certificates_file'): |
|
95 ('neutron', 'ca_certificates_file'), |
|
96 ('DEFAULT', 'spicehtml5proxy_host'): ('spice', 'html5proxy_host'), |
|
97 ('DEFAULT', 'spicehtml5proxy_port'): ('spice', 'html5proxy_port'), |
|
98 } |
49 } |
99 |
50 |
100 NOVA_CONF_EXCEPTIONS = [ |
51 NOVA_CONF_EXCEPTIONS = [ |
101 ('DEFAULT', 'ec2_workers'), |
52 ('DEFAULT', 'ec2_workers'), |
102 ('DEFAULT', 'osapi_compute_workers'), |
53 ('DEFAULT', 'osapi_compute_workers'), |
111 ('keystone_authtoken', 'admin_user'), |
62 ('keystone_authtoken', 'admin_user'), |
112 ('keystone_authtoken', 'admin_password'), |
63 ('keystone_authtoken', 'admin_password'), |
113 ('keystone_authtoken', 'admin_tenant_name'), |
64 ('keystone_authtoken', 'admin_tenant_name'), |
114 ('neutron', 'service_metadata_proxy'), |
65 ('neutron', 'service_metadata_proxy'), |
115 ] |
66 ] |
116 |
|
117 NOVA_MOVE_CONFIG = { |
|
118 ('filter:authtoken', 'auth_uri'): ('keystone_authtoken', 'auth_uri'), |
|
119 ('filter:authtoken', 'identity_uri'): |
|
120 ('keystone_authtoken', 'identity_uri'), |
|
121 ('filter:authtoken', 'admin_tenant_name'): |
|
122 ('keystone_authtoken', 'admin_tenant_name'), |
|
123 ('filter:authtoken', 'admin_user'): ('keystone_authtoken', 'admin_user'), |
|
124 ('filter:authtoken', 'admin_password'): |
|
125 ('keystone_authtoken', 'admin_password'), |
|
126 ('filter:authtoken', 'signing_dir'): ('keystone_authtoken', 'signing_dir'), |
|
127 ('filter:authtoken', 'auth_version'): |
|
128 ('keystone_authtoken', 'auth_version'), |
|
129 } |
|
130 |
67 |
131 |
68 |
132 def start(): |
69 def start(): |
133 # pull out the current version of config/upgrade-id |
70 # pull out the current version of config/upgrade-id |
134 p = Popen(['/usr/bin/svcprop', '-p', 'config/upgrade-id', |
71 p = Popen(['/usr/bin/svcprop', '-p', 'config/upgrade-id', |