ceph.rados.rados_scrub module

This module contains the methods required for scrubbing.

1.To set the parameters for scrubbing initially required the

cluster time and day details.get_cluster_date method provides the details

2.set_osd_configuration method used to set the configuration

parameters on the cluster.

3.get_osd_configuration method is used to get the configured parameters

on the cluster.

NOTE: With set_osd_configuration & get_osd_configuration methods can

use to set the get the any OSD configuration parameters.

  1. get_pg_dump method is used to get the pg dump details from the cluster

  2. verify_scrub method used for the verification of scheduled scrub happened or not.

class ceph.rados.rados_scrub.RadosScrubber(node: CephAdmin)

Bases: RadosOrchestrator

add_begin_end_hours(begin_hours=0, end_hours=0)

Used to get the begin and end hours from the current time

Parameters
  • time (2.end_hours - Hours to add the current) – to get start hour.

  • time – to get end hour.

Return: cluster_begin_hour,cluster_begin_weekday,

cluster_end_hour,cluster_end_weekday are starting and ending hours and weekdays.

get_osd_configuration(param)

Used to get the osd parameter value :param params: Parameter to get the value

Returns : parameter value

get_pg_dump(*args)

Used to get the pg dump logs

Parameters
  • output (1. If column value is null then return the pg dump) –

  • pgid (2. If column is any of the) –

    last_deep_scrub_stamp,last_active ..e.t.c value then

    returns the details about that column

  • state

    last_deep_scrub_stamp,last_active ..e.t.c value then

    returns the details about that column

  • last_scrub_stamp

    last_deep_scrub_stamp,last_active ..e.t.c value then

    returns the details about that column

:param :
last_deep_scrub_stamp,last_active ..e.t.c value then

returns the details about that column

Returns

dictionary

set_osd_configuration(param, value)

Used to set the configuration parametrs to the OSD’s. :param params: Parameters to be set for OSD’s

Returns: 0 for success or 1 for failure

set_osd_flags(flag, value)

Command example: ceph osd set noscrub

Used to set/unset the osd flags

Parameters
  • 1.flag – set or unset example: set|unset

  • falg (2.value - value of the) –

    example:pause|noup|nodown|noout|noin|nobackfill|

    norebalance|norecover|noscrub|nodeep-scrub|notieragent

Returns: True/False

verify_scrub(before_scrub_data, after_scrub_data)

Used to validate the scrubbing done or not

Parameters
  • the (2.after_scrub_data - It is a dictionary that conatins) – pgId and last scrub time data before scrubbing.

  • the – PDId and lst surb time data after scrubbing.

Return: 0 for Pass or 1 for Failure