components/openstack/glance/files/glance-upgrade
branchs11u3-sru
changeset 6035 c9748fcc32de
parent 4625 18adb92d4193
equal deleted inserted replaced
6016:a477397bba8b 6035:c9748fcc32de
     1 #!/usr/bin/python2.7
     1 #!/usr/bin/python2.7
     2 
     2 
     3 # Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
     3 # Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
     4 #
     4 #
     5 #    Licensed under the Apache License, Version 2.0 (the "License"); you may
     5 #    Licensed under the Apache License, Version 2.0 (the "License"); you may
     6 #    not use this file except in compliance with the License. You may obtain
     6 #    not use this file except in compliance with the License. You may obtain
     7 #    a copy of the License at
     7 #    a copy of the License at
     8 #
     8 #
    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 
    28 
    29 
    29 
    30 GLANCE_API_MAPPINGS = {
    30 GLANCE_API_MAPPINGS = {
    31     # Deprecated group/name
    31     # Deprecated group/name
    32     ('DEFAULT', 'db_backend'): ('database', 'backend'),
    32     ('DEFAULT', 'container_formats'): ('image_format', 'container_formats'),
    33     ('DEFAULT', 'sql_connection'): ('database', 'connection'),
    33     ('DEFAULT', 'disk_formats'): ('image_format', 'disk_formats'),
    34     ('DATABASE', 'sql_connection'): ('database', 'connection'),
    34     ('DEFAULT', 'matchmaker_ringfile'): ('matchmaker_ring', 'ringfile'),
    35     ('sql', 'connection'): ('database', 'connection'),
    35     ('DEFAULT', 'rabbit_durable_queues'): ('oslo_messaging_qpid',
    36     ('DEFAULT', 'sql_idle_timeout'): ('database', 'idle_timeout'),
    36                                            'amqp_durable_queues'),
    37     ('DATABASE', 'sql_idle_timeout'): ('database', 'idle_timeout'),
    37     ('DEFAULT', 'qpid_hostname'): ('oslo_messaging_qpid', 'qpid_hostname'),
    38     ('sql', 'idle_timeout'): ('database', 'idle_timeout'),
    38     ('DEFAULT', 'qpid_port'): ('oslo_messaging_qpid', 'qpid_port'),
    39     ('DEFAULT', 'sql_min_pool_size'): ('database', 'min_pool_size'),
    39     ('DEFAULT', 'qpid_username'): ('oslo_messaging_qpid', 'qpid_username'),
    40     ('DATABASE', 'sql_min_pool_size'): ('database', 'min_pool_size'),
    40     ('DEFAULT', 'qpid_password'): ('oslo_messaging_qpid', 'qpid_password'),
    41     ('DEFAULT', 'sql_max_pool_size'): ('database', 'max_pool_size'),
    41     ('DEFAULT', 'qpid_sasl_mechanisms'): ('oslo_messaging_qpid',
    42     ('DATABASE', 'sql_max_pool_size'): ('database', 'max_pool_size'),
    42                                           'qpid_sasl_mechanisms'),
    43     ('DEFAULT', 'sql_max_retries'): ('database', 'max_retries'),
    43     ('DEFAULT', 'qpid_heartbeat'): ('oslo_messaging_qpid', 'qpid_heartbeat'),
    44     ('DATABASE', 'sql_max_retries'): ('database', 'max_retries'),
    44     ('DEFAULT', 'qpid_protocol'): ('oslo_messaging_qpid', 'qpid_protocol'),
    45     ('DEFAULT', 'sql_retry_interval'): ('database', 'retry_interval'),
    45     ('DEFAULT', 'qpid_tcp_nodelay'): ('oslo_messaging_qpid',
    46     ('DATABASE', 'reconnect_interval'): ('database', 'retry_interval'),
    46                                       'qpid_tcp_nodelay'),
    47     ('DEFAULT', 'sql_max_overflow'): ('database', 'max_overflow'),
    47     ('DEFAULT', 'rabbit_host'): ('oslo_messaging_rabbit', 'rabbit_host'),
    48     ('DATABASE', 'sqlalchemy_max_overflow'): ('database', 'max_overflow'),
    48     ('DEFAULT', 'rabbit_port'): ('oslo_messaging_rabbit', 'rabbit_port'),
    49     ('DEFAULT', 'sql_connection_debug'): ('database', 'connection_debug'),
    49     ('DEFAULT', 'rabbit_use_ssl'): ('oslo_messaging_rabbit', 'rabbit_use_ssl'),
    50     ('DEFAULT', 'sql_connection_trace'): ('database', 'connection_trace'),
    50     ('DEFAULT', 'rabbit_userid'): ('oslo_messaging_rabbit', 'rabbit_userid'),
    51     ('DATABASE', 'sqlalchemy_pool_timeout'): ('database', 'pool_timeout'),
    51     ('DEFAULT', 'rabbit_password'): ('oslo_messaging_rabbit',
    52     ('DEFAULT', 'filesystem_store_datadir'):
    52                                      'rabbit_password'),
    53         ('glance_store', 'filesystem_store_datadir'),
    53     ('DEFAULT', 'rabbit_virtual_host'): ('oslo_messaging_rabbit',
    54     ('DEFAULT', 'swift_store_auth_version'):
    54                                          'rabbit_virtual_host'),
    55          ('glance_store', 'swift_store_auth_version'),
    55     ('task', 'eventlet_executor_pool_size'):
    56     ('DEFAULT', 'swift_store_auth_address'):
    56         ('taskflow_executor', 'max_workers'),
    57          ('glance_store', 'swift_store_auth_address'),
    57     ('DEFAULT', 'log-format'): (None, None),
    58     ('DEFAULT', 'swift_store_user'): ('glance_store', 'swift_store_user'),
    58     ('DEFAULT', 'log_format'): (None, None),
    59     ('DEFAULT', 'swift_store_key'): ('glance_store', 'swift_store_key'),
    59     ('DEFAULT', 'use-syslog'): (None, None),
    60     ('DEFAULT', 'swift_store_container'):
    60     ('glance_store', 'vmware_datacenter_path'): (None, None),
    61          ('glance_store', 'swift_store_container'),
    61     ('glance_store', 'vmware_datastore_name'): (None, None),
    62     ('DEFAULT', 'swift_store_create_container_on_put'):
       
    63          ('glance_store', 'swift_store_create_container_on_put'),
       
    64     ('DEFAULT', 'swift_store_large_object_size'):
       
    65          ('glance_store', 'swift_store_large_object_size'),
       
    66     ('DEFAULT', 'swift_store_large_object_chunk_size'):
       
    67          ('glance_store', 'swift_store_large_object_chunk_size'),
       
    68     ('DEFAULT', 'swift_enable_snet'): ('glance_store', 'swift_enable_snet'),
       
    69     ('DEFAULT', 's3_store_host'): ('glance_store', 's3_store_host'),
       
    70     ('DEFAULT', 's3_store_access_key'):
       
    71          ('glance_store', 's3_store_access_key'),
       
    72     ('DEFAULT', 's3_store_secret_key'):
       
    73          ('glance_store', 's3_store_secret_key'),
       
    74     ('DEFAULT', 's3_store_bucket'): ('glance_store', 's3_store_bucket'),
       
    75     ('DEFAULT', 's3_store_create_bucket_on_put'):
       
    76          ('glance_store', 's3_store_create_bucket_on_put'),
       
    77     ('DEFAULT', 'sheepdog_store_address'):
       
    78          ('glance_store', 'sheepdog_store_address'),
       
    79     ('DEFAULT', 'sheepdog_store_port'):
       
    80          ('glance_store', 'sheepdog_store_port'),
       
    81     ('DEFAULT', 'sheepdog_store_chunk_size'):
       
    82          ('glance_store', 'sheepdog_store_chunk_size'),
       
    83 }
    62 }
    84 
    63 
    85 GLANCE_API_EXCEPTIONS = [
    64 GLANCE_API_EXCEPTIONS = [
       
    65     ('DEFAULT', 'admin_tenant_name'),
       
    66     ('DEFAULT', 'admin_user'),
       
    67     ('DEFAULT', 'admin_password'),
    86     ('DEFAULT', 'bind_host'),
    68     ('DEFAULT', 'bind_host'),
    87     ('DEFAULT', 'bind_port'),
    69     ('DEFAULT', 'bind_port'),
    88     ('DEFAULT', 'log_file'),
    70     ('DEFAULT', 'log_file'),
    89     ('DEFAULT', 'backlog'),
    71     ('DEFAULT', 'backlog'),
    90     ('DEFAULT', 'workers'),
    72     ('DEFAULT', 'workers'),
    91     ('DEFAULT', 'registry_host'),
    73     ('DEFAULT', 'registry_host'),
    92     ('DEFAULT', 'registry_port'),
    74     ('DEFAULT', 'registry_port'),
    93     ('DEFAULT', 'registry_client_protocol'),
    75     ('DEFAULT', 'registry_client_protocol'),
    94     ('DEFAULT', 'rabbit_host'),
       
    95     ('DEFAULT', 'rabbit_port'),
       
    96     ('DEFAULT', 'rabbit_use_ssl'),
       
    97     ('DEFAULT', 'rabbit_userid'),
       
    98     ('DEFAULT', 'rabbit_password'),
       
    99     ('DEFAULT', 'rabbit_virtual_host'),
       
   100     ('DEFAULT', 'rabbit_notification_exchange'),
       
   101     ('DEFAULT', 'rabbit_notification_topic'),
       
   102     ('DEFAULT', 'rabbit_durable_queues'),
       
   103     ('DEFAULT', 'qpid_notification_exchange'),
       
   104     ('DEFAULT', 'qpid_notification_topic'),
       
   105     ('DEFAULT', 'qpid_hostname'),
       
   106     ('DEFAULT', 'qpid_port'),
       
   107     ('DEFAULT', 'qpid_usernamd'),
       
   108     ('DEFAULT', 'qpid_password'),
       
   109     ('DEFAULT', 'qpid_sasl_mechanisms'),
       
   110     ('DEFAULT', 'qpid_reconnect_timeout'),
       
   111     ('DEFAULT', 'qpid_reconnect_limit'),
       
   112     ('DEFAULT', 'qpid_reconnect_interval_min'),
       
   113     ('DEFAULT', 'qpid_reconnect_interval_max'),
       
   114     ('DEFAULT', 'qpid_reconnect_interval'),
       
   115     ('DEFAULT', 'qpid_heartbeat'),
       
   116     ('DEFAULT', 'qpid_protocol'),
       
   117     ('DEFAULT', 'qpid_tcp_nodelay'),
       
   118     ('DEFAULT', 'delayed_delete'),
    76     ('DEFAULT', 'delayed_delete'),
   119     ('DEFAULT', 'scrub_time'),
    77     ('DEFAULT', 'scrub_time'),
   120     ('DEFAULT', 'scrubber_datadir'),
    78     ('DEFAULT', 'scrubber_datadir'),
   121     ('DEFAULT', 'image_cache_dir'),
    79     ('DEFAULT', 'image_cache_dir'),
   122     ('database', 'connection'),
    80     ('database', 'connection'),
       
    81     ('paste_deploy', 'flavor'),
   123     ('keystone_authtoken', 'auth_uri'),
    82     ('keystone_authtoken', 'auth_uri'),
   124     ('keystone_authtoken', 'identity_uri'),
    83     ('keystone_authtoken', 'identity_uri'),
   125     ('keystone_authtoken', 'admin_tenant_name'),
    84     ('keystone_authtoken', 'admin_tenant_name'),
   126     ('keystone_authtoken', 'admin_user'),
    85     ('keystone_authtoken', 'admin_user'),
   127     ('keystone_authtoken', 'admin_password'),
    86     ('keystone_authtoken', 'admin_password'),
   128     ('keystone_authtoken', 'revocation_cache_time'),
    87     ('keystone_authtoken', 'revocation_cache_time'),
   129     ('keystone_authtoken', 'signing_dir'),
       
   130     ('paste_deploy', 'flavor'),
       
   131     ('glance_store', 'filesystem_store_datadir'),
    88     ('glance_store', 'filesystem_store_datadir'),
   132     ('glance_store', 'swift_store_auth_version'),
    89     ('glance_store', 'swift_store_auth_version'),
   133     ('glance_store', 'swift_store_auth_address'),
    90     ('glance_store', 'swift_store_auth_address'),
   134     ('glance_store', 'swift_store_user'),
    91     ('glance_store', 'swift_store_user'),
   135     ('glance_store', 'swift_store_key'),
    92     ('glance_store', 'swift_store_key'),
   136     ('glance_store', 'swift_store_container'),
    93     ('glance_store', 'swift_store_container'),
   137     ('glance_store', 'swift_store_create_container_on_put'),
    94     ('glance_store', 'swift_store_create_container_on_put'),
   138     ('glance_store', 'swift_store_large_object_size'),
    95     ('glance_store', 'swift_store_large_object_size'),
   139     ('glance_store', 'swift_store_large_object_chunk_size'),
    96     ('glance_store', 'swift_store_large_object_chunk_size'),
   140     ('glance_store', 'swift_enable_snet'),
       
   141     ('glance_store', 's3_store_host'),
    97     ('glance_store', 's3_store_host'),
   142     ('glance_store', 's3_store_access_key'),
       
   143     ('glance_store', 's3_store_secret_key'),
       
   144     ('glance_store', 's3_store_bucket'),
       
   145     ('glance_store', 's3_store_create_bucket_on_put'),
    98     ('glance_store', 's3_store_create_bucket_on_put'),
   146     ('glance_store', 'sheepdog_store_address'),
    99     ('glance_store', 'sheepdog_store_address'),
   147     ('glance_store', 'sheepdog_store_port'),
   100     ('glance_store', 'sheepdog_store_port'),
   148     ('glance_store', 'sheepdog_store_chunk_size'),
   101     ('glance_store', 'sheepdog_store_chunk_size'),
       
   102     ('oslo_messaging_rabbit', 'rabbit_host'),
       
   103     ('oslo_messaging_rabbit', 'rabbit_port'),
       
   104     ('oslo_messaging_rabbit', 'rabbit_use_ssl'),
       
   105     ('oslo_messaging_rabbit', 'rabbit_userid'),
       
   106     ('oslo_messaging_rabbit', 'rabbit_password'),
       
   107     ('oslo_messaging_rabbit', 'rabbit_virtual_host'),
       
   108     ('oslo_messaging_rabbit', 'rabbit_notification_exchange'),
       
   109     ('oslo_messaging_rabbit', 'rabbit_notification_topic'),
       
   110     ('oslo_messaging_rabbit', 'rabbit_durable_queues'),
       
   111     ('oslo_messaging_qpid', 'qpid_notification_exchange'),
       
   112     ('oslo_messaging_qpid', 'qpid_notification_topic'),
       
   113     ('oslo_messaging_qpid', 'qpid_hostname'),
       
   114     ('oslo_messaging_qpid', 'qpid_port'),
       
   115     ('oslo_messaging_qpid', 'qpid_usernamd'),
       
   116     ('oslo_messaging_qpid', 'qpid_password'),
       
   117     ('oslo_messaging_qpid', 'qpid_sasl_mechanisms'),
       
   118     ('oslo_messaging_qpid', 'qpid_reconnect_timeout'),
       
   119     ('oslo_messaging_qpid', 'qpid_reconnect_limit'),
       
   120     ('oslo_messaging_qpid', 'qpid_reconnect_interval_min'),
       
   121     ('oslo_messaging_qpid', 'qpid_reconnect_interval_max'),
       
   122     ('oslo_messaging_qpid', 'qpid_reconnect_interval'),
       
   123     ('oslo_messaging_qpid', 'qpid_heartbeat'),
       
   124     ('oslo_messaging_qpid', 'qpid_protocol'),
       
   125     ('oslo_messaging_qpid', 'qpid_tcp_nodelay'),
   149 ]
   126 ]
   150 
   127 
   151 GLANCE_CACHE_EXCEPTIONS = [
   128 GLANCE_CACHE_EXCEPTIONS = [
   152     ('DEFAULT', 'log_file'),
   129     ('DEFAULT', 'log_file'),
   153     ('DEFAULT', 'image_cache_dir'),
   130     ('DEFAULT', 'image_cache_dir'),
   158     ('DEFAULT', 'auth_url'),
   135     ('DEFAULT', 'auth_url'),
   159     ('DEFAULT', 'admin_tenant_name'),
   136     ('DEFAULT', 'admin_tenant_name'),
   160     ('DEFAULT', 'admin_user'),
   137     ('DEFAULT', 'admin_user'),
   161     ('DEFAULT', 'admin_password'),
   138     ('DEFAULT', 'admin_password'),
   162     ('DEFAULT', 'filesystem_store_datadir'),
   139     ('DEFAULT', 'filesystem_store_datadir'),
   163     ('DEFAULT', 'swift_store_auth_version'),
       
   164     ('DEFAULT', 'swift_store_auth_address'),
       
   165     ('DEFAULT', 'swift_store_user'),
       
   166     ('DEFAULT', 'swift_store_key'),
       
   167     ('DEFAULT', 'swift_store_container'),
       
   168     ('DEFAULT', 'swift_store_create_container_on_put'),
       
   169     ('DEFAULT', 'swift_store_large_object_size'),
       
   170     ('DEFAULT', 'swift_store_large_object_chunk_size'),
       
   171     ('DEFAULT', 'swift_enable_snet'),
       
   172     ('DEFAULT', 's3_store_host'),
       
   173     ('DEFAULT', 's3_store_access_key'),
       
   174     ('DEFAULT', 's3_store_secret_key'),
       
   175     ('DEFAULT', 's3_store_bucket'),
       
   176     ('DEFAULT', 's3_store_create_bucket_on_put'),
       
   177 ]
   140 ]
   178 
   141 
   179 GLANCE_REGISTRY_MAPPINGS = {
   142 GLANCE_REGISTRY_MAPPINGS = {
   180     # Deprecated group/name
   143     # Deprecate group/name
   181     ('DEFAULT', 'db_backend'): ('database', 'backend'),
   144     ('DEFAULT', 'rabbit_durable_queues'): ('oslo_messaging_qpid',
   182     ('DEFAULT', 'sql_connection'): ('database', 'connection'),
   145                                            'rabbit_durable_queues'),
   183     ('DATABASE', 'sql_connection'): ('database', 'connection'),
   146     ('DEFAULT', 'qpid_hostname'): ('oslo_messaging_qpid', 'qpid_hostname'),
   184     ('sql', 'connection'): ('database', 'connection'),
   147     ('DEFAULT', 'qpid_port'): ('oslo_messaging_qpid', 'qpid_port'),
   185     ('DEFAULT', 'sql_idle_timeout'): ('database', 'idle_timeout'),
   148     ('DEFAULT', 'qpid_username'): ('oslo_messaging_qpid', 'qpid_username'),
   186     ('DATABASE', 'sql_idle_timeout'): ('database', 'idle_timeout'),
   149     ('DEFAULT', 'qpid_password'): ('oslo_messaging_qpid', 'qpid_password'),
   187     ('sql', 'idle_timeout'): ('database', 'idle_timeout'),
   150     ('DEFAULT', 'qpid_sasl_mechanisms'): ('oslo_messaging_qpid',
   188     ('DEFAULT', 'sql_min_pool_size'): ('database', 'min_pool_size'),
   151                                           'qpid_sasl_mechanisms'),
   189     ('DATABASE', 'sql_min_pool_size'): ('database', 'min_pool_size'),
   152     ('DEFAULT', 'qpid_heartbeat'): ('oslo_messaging_qpid', 'qpid_heartbeat'),
   190     ('DEFAULT', 'sql_max_pool_size'): ('database', 'max_pool_size'),
   153     ('DEFAULT', 'qpid_protocol'): ('oslo_messaging_qpid', 'qpid_protocol'),
   191     ('DATABASE', 'sql_max_pool_size'): ('database', 'max_pool_size'),
   154     ('DEFAULT', 'qpid_tcp_nodelay'): ('oslo_messaging_qpid',
   192     ('DEFAULT', 'sql_max_retries'): ('database', 'max_retries'),
   155                                       'qpid_tcp_nodelay'),
   193     ('DATABASE', 'sql_max_retries'): ('database', 'max_retries'),
   156     ('DEFAULT', 'rabbit_host'): ('oslo_messaging_rabbit', 'rabbit_host'),
   194     ('DEFAULT', 'sql_retry_interval'): ('database', 'retry_interval'),
   157     ('DEFAULT', 'rabbit_port'): ('oslo_messaging_rabbit', 'rabbit_port'),
   195     ('DATABASE', 'reconnect_interval'): ('database', 'retry_interval'),
   158     ('DEFAULT', 'rabbit_use_ssl'): ('oslo_messaging_rabbit', 'rabbit_use_ssl'),
   196     ('DEFAULT', 'sql_max_overflow'): ('database', 'max_overflow'),
   159     ('DEFAULT', 'rabbit_userid'): ('oslo_messaging_rabbit', 'rabbit_userid'),
   197     ('DATABASE', 'sqlalchemy_max_overflow'): ('database', 'max_overflow'),
   160     ('DEFAULT', 'rabbit_password'): ('oslo_messaging_rabbit',
   198     ('DEFAULT', 'sql_connection_debug'): ('database', 'connection_debug'),
   161                                      'rabbit_password'),
   199     ('DEFAULT', 'sql_connection_trace'): ('database', 'connection_trace'),
   162     ('DEFAULT', 'rabbit_virtual_host'): ('oslo_messaging_rabbit',
   200     ('DATABASE', 'sqlalchemy_pool_timeout'): ('database', 'pool_timeout'),
   163                                          'rabbit_virtual_host'),
   201 }
   164 }
   202 
   165 
   203 GLANCE_REGISTRY_EXCEPTIONS = [
   166 GLANCE_REGISTRY_EXCEPTIONS = [
   204     ('DEFAULT', 'bind_host'),
   167     ('DEFAULT', 'bind_host'),
   205     ('DEFAULT', 'bind_host'),
   168     ('DEFAULT', 'bind_port'),
   206     ('DEFAULT', 'log_file'),
   169     ('DEFAULT', 'log_file'),
   207     ('DEFAULT', 'backlog'),
   170     ('DEFAULT', 'backlog'),
   208     ('DEFAULT', 'workers'),
   171     ('DEFAULT', 'workers'),
   209     ('DEFAULT', 'api_limit_max'),
       
   210     ('DEFAULT', 'limit_param_default'),
   172     ('DEFAULT', 'limit_param_default'),
   211     ('DEFAULT', 'rabbit_host'),
       
   212     ('DEFAULT', 'rabbit_port'),
       
   213     ('DEFAULT', 'rabbit_use_ssl'),
       
   214     ('DEFAULT', 'rabbit_userid'),
       
   215     ('DEFAULT', 'rabbit_password'),
       
   216     ('DEFAULT', 'rabbit_virtual_host'),
       
   217     ('DEFAULT', 'rabbit_notification_exchange'),
       
   218     ('DEFAULT', 'rabbit_notification_topic'),
       
   219     ('DEFAULT', 'rabbit_durable_queues'),
       
   220     ('DEFAULT', 'qpid_notification_exchange'),
       
   221     ('DEFAULT', 'qpid_notification_topic'),
       
   222     ('DEFAULT', 'qpid_hostname'),
       
   223     ('DEFAULT', 'qpid_port'),
       
   224     ('DEFAULT', 'qpid_usernamd'),
       
   225     ('DEFAULT', 'qpid_password'),
       
   226     ('DEFAULT', 'qpid_sasl_mechanisms'),
       
   227     ('DEFAULT', 'qpid_reconnect_timeout'),
       
   228     ('DEFAULT', 'qpid_reconnect_limit'),
       
   229     ('DEFAULT', 'qpid_reconnect_interval_min'),
       
   230     ('DEFAULT', 'qpid_reconnect_interval_max'),
       
   231     ('DEFAULT', 'qpid_reconnect_interval'),
       
   232     ('DEFAULT', 'qpid_heartbeat'),
       
   233     ('DEFAULT', 'qpid_protocol'),
       
   234     ('DEFAULT', 'qpid_tcp_nodelay'),
       
   235     ('database', 'connection'),
   173     ('database', 'connection'),
   236     ('keystone_authtoken', 'auth_uri'),
   174     ('keystone_authtoken', 'auth_uri'),
   237     ('keystone_authtoken', 'identity_uri'),
   175     ('keystone_authtoken', 'identity_uri'),
   238     ('keystone_authtoken', 'admin_tenant_name'),
   176     ('keystone_authtoken', 'admin_tenant_name'),
   239     ('keystone_authtoken', 'admin_user'),
   177     ('keystone_authtoken', 'admin_user'),
   240     ('keystone_authtoken', 'admin_password'),
   178     ('keystone_authtoken', 'admin_password'),
   241     ('keystone_authtoken', 'signing_dir'),
   179     ('keystone_authtoken', 'signing_dir'),
       
   180     ('oslo_messaging_rabbit', 'rabbit_host'),
       
   181     ('oslo_messaging_rabbit', 'rabbit_port'),
       
   182     ('oslo_messaging_rabbit', 'rabbit_use_ssl'),
       
   183     ('oslo_messaging_rabbit', 'rabbit_userid'),
       
   184     ('oslo_messaging_rabbit', 'rabbit_password'),
       
   185     ('oslo_messaging_rabbit', 'rabbit_virtual_host'),
       
   186     ('oslo_messaging_rabbit', 'rabbit_notification_exchange'),
       
   187     ('oslo_messaging_rabbit', 'rabbit_notification_topic'),
       
   188     ('oslo_messaging_rabbit', 'rabbit_durable_queues'),
       
   189     ('oslo_messaging_qpid', 'qpid_notification_exchange'),
       
   190     ('oslo_messaging_qpid', 'qpid_notification_topic'),
       
   191     ('oslo_messaging_qpid', 'qpid_hostname'),
       
   192     ('oslo_messaging_qpid', 'qpid_port'),
       
   193     ('oslo_messaging_qpid', 'qpid_usernamd'),
       
   194     ('oslo_messaging_qpid', 'qpid_password'),
       
   195     ('oslo_messaging_qpid', 'qpid_sasl_mechanisms'),
       
   196     ('oslo_messaging_qpid', 'qpid_reconnect_timeout'),
       
   197     ('oslo_messaging_qpid', 'qpid_reconnect_limit'),
       
   198     ('oslo_messaging_qpid', 'qpid_reconnect_interval_min'),
       
   199     ('oslo_messaging_qpid', 'qpid_reconnect_interval_max'),
       
   200     ('oslo_messaging_qpid', 'qpid_reconnect_interval'),
       
   201     ('oslo_messaging_qpid', 'qpid_heartbeat'),
       
   202     ('oslo_messaging_qpid', 'qpid_protocol'),
       
   203     ('oslo_messaging_qpid', 'qpid_tcp_nodelay'),
   242     ('paste_deploy', 'flavor'),
   204     ('paste_deploy', 'flavor'),
   243 ]
   205 ]
   244 
   206 
   245 GLANCE_SCRUBBER_MAPPINGS = {
   207 # TODO: Add mappings?
   246     # Deprecated group/name
   208 # GLANCE_SCRUBBER_MAPPINGS
   247     ('DEFAULT', 'filesystem_store_datadir'):
       
   248         ('glance_store', 'filesystem_store_datadir'),
       
   249 }
       
   250 
   209 
   251 GLANCE_SCRUBBER_EXCEPTIONS = [
   210 GLANCE_SCRUBBER_EXCEPTIONS = [
   252     ('DEFAULT', 'log_file'),
   211     ('DEFAULT', 'log_file'),
   253     ('DEFAULT', 'wakeup_time'),
   212     ('DEFAULT', 'wakeup_time'),
   254     ('DEFAULT', 'scrubber_datadir'),
   213     ('DEFAULT', 'scrubber_datadir'),
   259     ('DEFAULT', 'auth_url'),
   218     ('DEFAULT', 'auth_url'),
   260     ('DEFAULT', 'admin_tenant_name'),
   219     ('DEFAULT', 'admin_tenant_name'),
   261     ('DEFAULT', 'admin_user'),
   220     ('DEFAULT', 'admin_user'),
   262     ('DEFAULT', 'admin_password'),
   221     ('DEFAULT', 'admin_password'),
   263     ('database', 'connection'),
   222     ('database', 'connection'),
   264     ('glance_store', 'filesystem_store_datadir'),
       
   265 ]
   223 ]
   266 
   224 
   267 
   225 
   268 def start():
   226 def start():
   269     # pull out the current version of config/upgrade-id
   227     # pull out the current version of config/upgrade-id
   296         modify_conf('/etc/glance/glance-api-paste.ini')
   254         modify_conf('/etc/glance/glance-api-paste.ini')
   297         modify_conf('/etc/glance/glance-cache.conf',
   255         modify_conf('/etc/glance/glance-cache.conf',
   298                     exception_list=GLANCE_CACHE_EXCEPTIONS)
   256                     exception_list=GLANCE_CACHE_EXCEPTIONS)
   299         modify_conf('/etc/glance/glance-registry.conf',
   257         modify_conf('/etc/glance/glance-registry.conf',
   300                     GLANCE_REGISTRY_MAPPINGS,
   258                     GLANCE_REGISTRY_MAPPINGS,
   301                     GLANCE_REGISTRY_EXCEPTIONS)
   259                     exception_list=GLANCE_REGISTRY_EXCEPTIONS)
   302         modify_conf('/etc/glance/glance-registry-paste.ini')
   260         modify_conf('/etc/glance/glance-registry-paste.ini')
   303         modify_conf('/etc/glance/glance-scrubber.conf',
   261         modify_conf('/etc/glance/glance-scrubber.conf',
   304                     GLANCE_SCRUBBER_MAPPINGS,
   262                     exception_list=GLANCE_SCRUBBER_EXCEPTIONS)
   305                     GLANCE_SCRUBBER_EXCEPTIONS)
       
   306         modify_conf('/etc/glance/logging.conf')
       
   307 
   263 
   308     config = iniparse.RawConfigParser()
   264     config = iniparse.RawConfigParser()
   309     config.read('/etc/glance/glance-api.conf')
   265     config.read('/etc/glance/glance-api.conf')
   310     # In certain cases the database section does not exist and the
   266     # In certain cases the database section does not exist and the
   311     # default database chosen is sqlite.
   267     # default database chosen is sqlite.