Page MenuHomePhabricator

MySQL_legacy Spicerack - fixes
Closed, ResolvedPublic

Description

With T343674 and Id141c10e2e735247321c95d26539f3afab369b13, mysql_legacy has been merged and needs a hotfix before being used in cookbooks:

Verbosity

  • reduce general verbosity [] list_host_instances() specifically
  • Remove progress bar on single host command + sql commands

Bugfixes

  • show_slave_status()
    • needs handling being run on a replication source
    • needs is_safe=True
  • get_repl_info() has a parsing error
  • .primary needs is_safe=True
  • prep_src_for_cloning() fails because of .primary → not sure, needs to be tested
  • self.run_command(f"mv {source_instance_data_dir}/* {target_instance_data_dir}") : with a /
  • .stop_slave() need its return value handled
  • get_repl_info() returns truncated binlog_file repl_position.
  • .get_replication() needs a fix : TypeError: 'generator' object is not subscriptable.
  • wait_for_replication to test, depends on get_replication. → not sure, needs to be tested.
  • InstanceMulti to test because of self.sock being defined too late.
  • self.run_command("CHANGE MASTER ....")run_query.

Tweaks

  • remove run_command and use sync/async directly
  • trim __init__ of self.instances

Misc

  • Naming : list_host_instancelist_host_instances
  • Error handling: ensure that commands that returns something have their return handled

Event Timeline

ABran-WMF changed the task status from Open to In Progress.Jun 14 2024, 9:55 AM
ABran-WMF added a project: DBA.
ABran-WMF moved this task from Triage to In progress on the DBA board.
ABran-WMF triaged this task as Medium priority.Jun 14 2024, 12:15 PM
ABran-WMF updated the task description. (Show Details)

Change #1043753 had a related patch set uploaded (by Arnaudb; author: Arnaudb):

[operations/software/spicerack@master] mariadb: bugfixes mysql_legacy

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

Change #1043753 merged by jenkins-bot:

[operations/software/spicerack@master] mariadb: bugfixes mysql_legacy

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

Change #1054484 had a related patch set uploaded (by Volans; author: Volans):

[operations/software/spicerack@master] mysql_legacy: update core sections

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

Change #1054484 merged by jenkins-bot:

[operations/software/spicerack@master] mysql_legacy: update core sections

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

ABran-WMF moved this task from In progress to Done on the DBA board.

Since https://github.com/wikimedia/operations-software-spicerack/blob/v8.8.0/CHANGELOG.rst has been tested, this can be considered quite done, only remains the improvement of exception carrying when a SQL command fails on a host, tracked in T370419

Change #1055244 had a related patch set uploaded (by Volans; author: Volans):

[operations/software/spicerack@master] mysql_legacy: fix Instance's upgrade path

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

Change #1055244 merged by jenkins-bot:

[operations/software/spicerack@master] mysql_legacy: fix Instance's upgrade path

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