diff --git a/ansible/group_vars/all.yml b/ansible/group_vars/all.yml index 3d9b747080..519c0080bd 100644 --- a/ansible/group_vars/all.yml +++ b/ansible/group_vars/all.yml @@ -839,13 +839,6 @@ glance_api_hosts: "{{ [groups['glance-api']|first] if glance_backend_file | bool barbican_crypto_plugin: "simple_crypto" barbican_library_path: "/usr/lib/libCryptoki2_64.so" -######################## -### Panko options -######################## -# Valid options are [ mongodb, mysql ] -panko_database_type: "mysql" - - ################# # Gnocchi options ################# diff --git a/ansible/roles/panko/defaults/main.yml b/ansible/roles/panko/defaults/main.yml index 668f3b94a5..c9241767b5 100644 --- a/ansible/roles/panko/defaults/main.yml +++ b/ansible/roles/panko/defaults/main.yml @@ -27,8 +27,6 @@ panko_services: #################### panko_database_name: "panko" panko_database_user: "{% if use_preconfigured_databases | bool and use_common_mariadb_user | bool %}{{ database_user }}{% else %}panko{% endif %}" -panko_database_port: "{{ mongodb_port if panko_database_type == 'mongodb' else database_port }}" -panko_database_mongodb_address: "{% for host in groups['mongodb'] %}{{ 'api' | kolla_address(host) | put_address_in_context('url') }}:{{ panko_database_port }}{% if not loop.last %},{% endif %}{% endfor %}" panko_database_mysql_address: "{{ database_address | put_address_in_context('url') }}:{{ database_port }}" #################### diff --git a/ansible/roles/panko/tasks/bootstrap.yml b/ansible/roles/panko/tasks/bootstrap.yml index d49fe38196..16591cd9de 100644 --- a/ansible/roles/panko/tasks/bootstrap.yml +++ b/ansible/roles/panko/tasks/bootstrap.yml @@ -1,18 +1,4 @@ --- -- name: Creating Panko MongoDB database - become: true - command: > - docker exec -t mongodb mongo --host {{ mongodb_replication_set_name }}/{{ panko_database_mongodb_address }} --eval - 'db = db.getSiblingDB("{{ panko_database_name }}"); - db.createUser({user':' "{{ panko_database_user }}", pwd':' "{{ panko_database_password }}", roles':' [ "readWrite", "dbAdmin" ]})' - register: mongodb_panko_database - run_once: true - changed_when: mongodb_panko_database.stdout.find('already') == -1 - failed_when: mongodb_panko_database.stdout.split()[4] != 'connecting' - delegate_to: "{{ groups['mongodb'][0] }}" - when: - - panko_database_type == "mongodb" - - name: Creating Panko mysql database become: true kolla_toolbox: @@ -27,7 +13,6 @@ delegate_to: "{{ groups['panko-api'][0] }}" when: - not use_preconfigured_databases | bool - - panko_database_type == "mysql" - name: Creating Panko mysql database user and setting permissions become: true @@ -47,6 +32,5 @@ delegate_to: "{{ groups['panko-api'][0] }}" when: - not use_preconfigured_databases | bool - - panko_database_type == "mysql" - include_tasks: bootstrap_service.yml diff --git a/ansible/roles/panko/tasks/bootstrap_service.yml b/ansible/roles/panko/tasks/bootstrap_service.yml index e5c690841b..597df77c8a 100644 --- a/ansible/roles/panko/tasks/bootstrap_service.yml +++ b/ansible/roles/panko/tasks/bootstrap_service.yml @@ -10,7 +10,6 @@ environment: KOLLA_BOOTSTRAP: KOLLA_CONFIG_STRATEGY: "{{ config_strategy }}" - PANKO_DATABASE_TYPE: "{{ panko_database_type }}" image: "{{ panko_api.image }}" labels: BOOTSTRAP: diff --git a/ansible/roles/panko/templates/panko.conf.j2 b/ansible/roles/panko/templates/panko.conf.j2 index 7cf2fe8635..9f54d9c91b 100644 --- a/ansible/roles/panko/templates/panko.conf.j2 +++ b/ansible/roles/panko/templates/panko.conf.j2 @@ -8,13 +8,8 @@ log_file = /var/log/kolla/panko/panko-api.log [database] -{% if panko_database_type == "mongodb" %} -connection = mongodb://{{ panko_database_user }}:{{ panko_database_password }}@{{ panko_database_mongodb_address }}/{{ panko_database_name }} -metering_connection = mongodb://{{ panko_database_user }}:{{ panko_database_password }}@{{ panko_database_mongodb_address }}/{{ panko_database_name }} -{% elif panko_database_type == "mysql" %} connection = mysql+pymysql://{{ panko_database_user }}:{{ panko_database_password }}@{{ panko_database_mysql_address }}/{{ panko_database_name }} metering_connection = mysql+pymysql://{{ panko_database_user }}:{{ panko_database_password }}@{{ panko_database_mysql_address }}/{{ panko_database_name }} -{% endif %} [keystone_authtoken] www_authenticate_uri = {{ keystone_internal_url }} diff --git a/etc/kolla/globals.yml b/etc/kolla/globals.yml index fc3a5fb775..48da36ba7b 100644 --- a/etc/kolla/globals.yml +++ b/etc/kolla/globals.yml @@ -453,12 +453,6 @@ #barbican_crypto_plugin: "simple_crypto" #barbican_library_path: "/usr/lib/libCryptoki2_64.so" -################ -## Panko options -################ -# Valid options are [ mongodb, mysql ] -#panko_database_type: "mysql" - ################# # Gnocchi options ################# diff --git a/releasenotes/notes/remove-panko-backend-mongodb-94ea90ffd61baa20.yaml b/releasenotes/notes/remove-panko-backend-mongodb-94ea90ffd61baa20.yaml new file mode 100644 index 0000000000..cbfb52b085 --- /dev/null +++ b/releasenotes/notes/remove-panko-backend-mongodb-94ea90ffd61baa20.yaml @@ -0,0 +1,4 @@ +--- +upgrade: + - | + Support mongodb for panko as backend has been removed.