Page MenuHomePhabricator

Data model for dbconfig
Closed, ResolvedPublic

Description

As far as the data model is concerned, we need two types of objects:

  • An object for database instances
  • An object for database sections

Database sections

For the database sections, we need to store the following information:

  • The master database instance
  • read-only state (true/false)
  • read-only message
  • depool threshold (an integer, minimum number of instances pooled)

so our data model will be:

# Key: db_sections/sN

master: <string>

read-only: <boolean>

ro-reason: <string>

min_slaves: <integer>

Database instances

For the database instances, we need the following:

  • The hostname to connect to
  • The ip corresponding to that hostname
  • for each section defined for this instance:
  • The pooled status, boolean
  • A coefficient between 0 and 1 that will multiply the weights
  • The weight in the main group, as an integer
  • For each group configured, the relative weight as an integer

so our data model will be:

# key: db_eqiad/instance_label

hostname: <string>

host_ip: <ipaddress>

port: <integer>

sections: 

    - section: sX <should be defined as a section model

      pooled: <boolean>

      weight_multiplier: <integer, between 0 and 1>

      weight: <integer>

      groups:

         - group: <string, fixed values>

            weight: <integer>

Event Timeline

Joe triaged this task as Medium priority.Jun 17 2018, 7:56 AM
Joe created this task.
Joe updated the task description. (Show Details)

Change 422373 had a related patch set uploaded (by Giuseppe Lavagetto; owner: Giuseppe Lavagetto):
[operations/puppet@production] conftool: schema for database configuration on etcd

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

Marostegui moved this task from Done to Blocked external/Not db team on the DBA board.
Volans claimed this task.

The data model is now part of the software and will evolve with it, wikitech documentation will be provided for it. I'm resolving this.

Change 422373 abandoned by Giuseppe Lavagetto:
conftool: schema for database configuration on etcd

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