Skip to content
This repository was archived by the owner on Jan 16, 2025. It is now read-only.
This repository was archived by the owner on Jan 16, 2025. It is now read-only.

Evolve CreateBrickConfig to generate a JSON output with required storage configuration #26

@ShyamsundarR

Description

@ShyamsundarR

Currently CreateBrickConfig.py is pretty much a dummy script, this needs to evolve and dump a JSON file that can be consumed as a ansible variable for tasks to be written in the storage configuration roles.

Inputs to this script would possibly be:

  • per-host
    • disks_to_use: []
  • per-volume
    • storage_type: "jbod"
    • disks_per_stroage_unit: 1(jbod), n(raid6/0/10)
    • brick_count: N (this may even be of the form distribute_count: k, replication_count: m, hence disk count would be derived (N = k*m)
  • Ansible discovered host facts

Initial thoughts on the output JSON, based on the abstract inputs as given above would be:

{
  "<hostname>": # One section per hostname
  {
    # If absent assumes configuration is not required, similar
    # rule for other sections
    "devices": 
    [ # List of devices to create
      {
        "grouping": "<jbod|raid6|raid0|raid10>",
        "disks": ["", "", ...],
      },
      ...
    ],
    "pvs":
    [ # List of LVM PVs to create
      {
        # devices filled in from created devices, or from configuration
        # (if device configuration was ignored) (similar strategy for pvs, vg, lv)
        "devices": ["", "", ...],
        "options": ""
      },
      ...
    ],
    "vgs":
    [ # List of LVM VGs to create
      {
        "vgname": "<userdefined>"|"auto",
        "disk_type": "",
        "stripe_size": "",
        "diskcount": "",
        "pvs": ["", "", ...],
        "options": ""
      },
      ...
    ],
    "lvpools":
    [ # List of LVM thin pools to create
      {
        "lvname": "<userdefined>"|"auto",
        "lvoptions": "",
        "vg": ""
      },
      ...
    ],
    "lvs":
    [ # List of LVM LV's to create
      {
        "lvname": "<userdefined>"|"auto",
        "lvoptions": "",
        "vg": ""
      }
    ],
    "mounts":
    [ # List of filesystems and mount points to create
      {
        "fstype": "<xfs|ignore>",
        "fsoptions": "",
        "mountpoint": "<userdefined>"|"auto"
        lv: ""
      },
      ...
    ],
  },
  ...
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions