Page MenuHomePhabricator

Drop nova and nova_api databases from m5
Closed, ResolvedPublic

Description

Following up our email conversation:

@Marostegui

While working on m5 master I realised that the nova database has not had any writes for a year or so:

root@db1133:/srv/sqldata/nova# ls -lhrt *.ibd | tail -n5
-rw-rw---- 1 mysql mysql  48M Apr 16  2019 instance_metadata.ibd
-rw-rw---- 1 mysql mysql 2.9G Apr 16  2019 instance_system_metadata.ibd
-rw-rw---- 1 mysql mysql 484M Apr 16  2019 block_device_mapping.ibd
-rw-rw---- 1 mysql mysql 304K Apr 17  2019 compute_nodes.ibd
-rw-rw---- 1 mysql mysql 128K Apr 26  2019 services.ibd

Same for nova_api

root@db1133:/srv/sqldata# ls -lhrt nova_api/*.ibd | tail -n5
-rw-rw---- 1 mysql mysql 128K May 23  2018 nova_api/flavor_extra_specs.ibd
-rw-rw---- 1 mysql mysql 128K May 23  2018 nova_api/cell_mappings.ibd
-rw-rw---- 1 mysql mysql  96K May 23  2018 nova_api/migrate_version.ibd
-rw-rw---- 1 mysql mysql 176K Apr 16  2019 nova_api/build_requests.ibd
-rw-rw---- 1 mysql mysql 364M Apr 16  2019 nova_api/request_specs.ibd

Can those be removed?

@aborrero :

I guess we are using the '_eqiad1' ones (suffix). In such cases, yes, they can
be removed.

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript
Marostegui triaged this task as Medium priority.Mar 23 2020, 2:22 PM
Marostegui moved this task from Triage to Pending comment on the DBA board.

I guess we can start by renaming the tables.

Mentioned in SAL (#wikimedia-operations) [2020-03-24T08:39:23Z] <marostegui> Rename nova database tables on db1133 (m5 master) - T248313

nova database renamed:

root@cumin1001:/home/marostegui# mysql.py -hdb1133 nova -e "show tables"
+----------------------------------------------------+
| Tables_in_nova                                     |
+----------------------------------------------------+
| T248313_agent_builds                               |
| T248313_aggregate_hosts                            |
| T248313_aggregate_metadata                         |
| T248313_aggregates                                 |
| T248313_allocations                                |
| T248313_block_device_mapping                       |
| T248313_bw_usage_cache                             |
| T248313_cells                                      |
| T248313_certificates                               |
| T248313_compute_nodes                              |
| T248313_console_pools                              |
| T248313_consoles                                   |
| T248313_dns_domains                                |
| T248313_fixed_ips                                  |
| T248313_floating_ips                               |
| T248313_instance_actions                           |
| T248313_instance_actions_events                    |
| T248313_instance_extra                             |
| T248313_instance_faults                            |
| T248313_instance_group_member                      |
| T248313_instance_group_policy                      |
| T248313_instance_groups                            |
| T248313_instance_id_mappings                       |
| T248313_instance_info_caches                       |
| T248313_instance_metadata                          |
| T248313_instance_system_metadata                   |
| T248313_instance_type_extra_specs                  |
| T248313_instance_type_projects                     |
| T248313_instance_types                             |
| T248313_instances                                  |
| T248313_inventories                                |
| T248313_key_pairs                                  |
| T248313_migrate_version                            |
| T248313_migrations                                 |
| T248313_networks                                   |
| T248313_pci_devices                                |
| T248313_project_user_quotas                        |
| T248313_provider_fw_rules                          |
| T248313_quota_classes                              |
| T248313_quota_usages                               |
| T248313_quotas                                     |
| T248313_reservations                               |
| T248313_resource_provider_aggregates               |
| T248313_resource_providers                         |
| T248313_s3_images                                  |
| T248313_security_group_default_rules               |
| T248313_security_group_instance_association        |
| T248313_security_group_rules                       |
| T248313_security_groups                            |
| T248313_services                                   |
| T248313_shadow_agent_builds                        |
| T248313_shadow_aggregate_hosts                     |
| T248313_shadow_aggregate_metadata                  |
| T248313_shadow_aggregates                          |
| T248313_shadow_block_device_mapping                |
| T248313_shadow_bw_usage_cache                      |
| T248313_shadow_cells                               |
| T248313_shadow_certificates                        |
| T248313_shadow_compute_nodes                       |
| T248313_shadow_console_pools                       |
| T248313_shadow_consoles                            |
| T248313_shadow_dns_domains                         |
| T248313_shadow_fixed_ips                           |
| T248313_shadow_floating_ips                        |
| T248313_shadow_instance_actions                    |
| T248313_shadow_instance_actions_events             |
| T248313_shadow_instance_extra                      |
| T248313_shadow_instance_faults                     |
| T248313_shadow_instance_group_member               |
| T248313_shadow_instance_group_policy               |
| T248313_shadow_instance_groups                     |
| T248313_shadow_instance_id_mappings                |
| T248313_shadow_instance_info_caches                |
| T248313_shadow_instance_metadata                   |
| T248313_shadow_instance_system_metadata            |
| T248313_shadow_instance_type_extra_specs           |
| T248313_shadow_instance_type_projects              |
| T248313_shadow_instance_types                      |
| T248313_shadow_instances                           |
| T248313_shadow_key_pairs                           |
| T248313_shadow_migrate_version                     |
| T248313_shadow_migrations                          |
| T248313_shadow_networks                            |
| T248313_shadow_pci_devices                         |
| T248313_shadow_project_user_quotas                 |
| T248313_shadow_provider_fw_rules                   |
| T248313_shadow_quota_classes                       |
| T248313_shadow_quota_usages                        |
| T248313_shadow_quotas                              |
| T248313_shadow_reservations                        |
| T248313_shadow_s3_images                           |
| T248313_shadow_security_group_default_rules        |
| T248313_shadow_security_group_instance_association |
| T248313_shadow_security_group_rules                |
| T248313_shadow_security_groups                     |
| T248313_shadow_services                            |
| T248313_shadow_snapshot_id_mappings                |
| T248313_shadow_snapshots                           |
| T248313_shadow_task_log                            |
| T248313_shadow_virtual_interfaces                  |
| T248313_shadow_volume_id_mappings                  |
| T248313_shadow_volume_usage_cache                  |
| T248313_snapshot_id_mappings                       |
| T248313_snapshots                                  |
| T248313_tags                                       |
| T248313_task_log                                   |
| T248313_virtual_interfaces                         |
| T248313_volume_id_mappings                         |
| T248313_volume_usage_cache                         |
+----------------------------------------------------+

Going to wait a few hours before going ahead for nova_api
@aborrero or @Andrew can you confirm everything from your end is working fine?

Change 583052 had a related patch set uploaded (by Marostegui; owner: Marostegui):
[operations/puppet@production] production-m5.sql: Remove nova DB grants

https://gerrit.wikimedia.org/r/583052

Change 583052 merged by Marostegui:
[operations/puppet@production] production-m5.sql: Remove nova DB grants

https://gerrit.wikimedia.org/r/583052

Mentioned in SAL (#wikimedia-operations) [2020-03-25T06:13:07Z] <marostegui> Remove grants 'nova'@'208.80.154.23' on nova.* - T248313

Mentioned in SAL (#wikimedia-operations) [2020-03-25T06:15:34Z] <marostegui> Rename tables on db1133 (m5 master) nova_api database - T248313

Renamed nova_api tables:

root@cumin1001:/home/marostegui# mysql.py -hdb1133 nova_api -e "show tables"
+----------------------------+
| Tables_in_nova_api         |
+----------------------------+
| T248313_build_requests     |
| T248313_cell_mappings      |
| T248313_flavor_extra_specs |
| T248313_flavor_projects    |
| T248313_flavors            |
| T248313_host_mappings      |
| T248313_instance_mappings  |
| T248313_migrate_version    |
| T248313_request_specs      |
+----------------------------+

We talked about this in our team meeting. Please go ahead and clean this up :-)

thanks!

Mentioned in SAL (#wikimedia-operations) [2020-03-26T06:22:28Z] <marostegui> Rename nova and nova_api tables on db1117:3325 - T248313

Thank you - I have renamed this on the rest of the slaves: db1117:3325, db2135, db2078:3325
On Monday I will drop them

Mentioned in SAL (#wikimedia-operations) [2020-03-31T05:55:47Z] <marostegui> Drop nova and nova_api from m5 master (db1133) - T248313

Marostegui claimed this task.

nova and nova_api dropped (they had their tables renamed)