common, osd: Apply randomly selected scheduler type across all OSD shards
Originally, the choice of 'debug_random' for osd_op_queue resulted in the
selection of a random scheduler type for each OSD shard. A more realistic
scenario for testing would be the selection of the random scheduler type
applied globally for all shards of an OSD. In other words, all OSD shards
would employ the same scheduler type. For e.g., this scenario would be
possible during upgrades when the scheduler type has changed between
releases.
The following changes are made as part of the commit:
1. Introduce enum class op_queue_type_t within osd_types.h that holds the
various op queue types supported. This header in included by OpQueue.h.
Add helper functions osd_types.cc to return the op_queue_type_t as
enum or a string representing the enum member.
2. Determine the scheduler type before initializing the OSD shards in
OSD class constructor.
3. Pass the determined op_queue_type_t to the OSDShard's make_scheduler()
method for each shard. This ensures all shards of the OSD are
initialized with the same scheduler type.
4. Rename & modify the unused OSDShard::get_scheduler_type() method to
return op_queue_type_t set for the queue.
5. Introduce OpScheduler::get_type() and OpQueue::get_type() pure
virtual functions and define them within the respective queue
implementation. This returns a value pertaining to the op queue type.
This is called by OSDShard::get_op_queue_type().
6. Add OSD::osd_op_queue_type() method for determining the scheduler
type set on the OSD shards. Since all OSD shards are set to use
the same scheduler type, the shard with the lowest id is used to
get the scheduler type using OSDShard::get_op_queue_type().
7. Improve comment description related to 'osd_op_queue' option in
common/options/osd.yaml.in.