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 Normal priority.Jun 17 2018, 7:56 AM
Joe created this task.
Joe updated the task description. (Show Details)Jun 17 2018, 9:41 AM
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

Vvjjkkii renamed this task from Data model for dbconfig to csaaaaaaaa.Jul 1 2018, 1:03 AM
Vvjjkkii raised the priority of this task from Normal to High.
Vvjjkkii updated the task description. (Show Details)
Vvjjkkii removed subscribers: gerritbot, Aklapper.
Marostegui renamed this task from csaaaaaaaa to Data model for dbconfig.Jul 1 2018, 8:05 PM
Marostegui lowered the priority of this task from High to Normal.
Marostegui updated the task description. (Show Details)
Marostegui moved this task from Triage to Done on the DBA board.Jul 18 2018, 10:04 AM
Marostegui moved this task from Done to Blocked external/Not db team on the DBA board.

@Joe @CDanis is this task still valid?

Volans closed this task as Resolved.Jul 5 2019, 6:36 AM
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