Feature pages are design documents that developers have created while collaborating on oVirt.
Most of them are outdated, but provide historical design context.
They are not user documentation and should not be treated as such.
Documentation is available here.
Most of them are outdated, but provide historical design context.
They are not user documentation and should not be treated as such.
Documentation is available here.
SPM Priority
Summary
The SPM Priority feature allows the admin to define priorities between hosts regarding the SPM selection process. A host can be given priority -1
which means this host can not be selected to be the SPM.
Owner
- Feature owner: Muli Salem
- QA Owner: Leonid Natapov (lnapatov@redhat.com)
Current status
- Status: Released in oVirt 3.1
Description
Currently, the SPM selection process is random, meaning a host is chosen randomly out of the hosts that are currently UP. The SPM Priority feature will allow admins to define the hosts that they prefer to be chosen as SPM.
PRD
The requirements are the following:
- Enable setting a priority between
-1
and10
for a host (10
is the highest,-1
means never to choose this host). - When SPM selection process takes place, use the SPM priority to select an SPM.
- Default for upgrading ovirt will be 5.
Design
Current flow:
- All hosts that are “UP”, and that have not been attempted to be chosen as SPMs in the Data Center are fetched.
- One is chosen randomly, and the SPM Selection algorithm begins.
- Every host that fails to become the SPM, is added to the
mTriedVdssList
of forbidden hosts.
New Design:
- Adding a
vds_spm_priority
field tovds_static
(validated to be between-1
and10
). This field is configurable upon host creation and host editing by the admin. - Replacing the list that is fetched in stage one of the current flow, with a list of prioritized hosts (detailed algorithm below).
Algorithm for selecting a host according to priorities
- Fetch all hosts that are “UP” in Data Center, and that have not been attempted to be chosen as SPMs in the Data Center. The selection will return the list ordered both by SPM Priority (desc), and secondly by RANDOM().
- The top host is chosen, and the SPM Selection algorithm begins.
- Every host that fails to become the SPM, is added to a the mTriedVdssList of forbidden hosts.
- Ordering the hosts according to the SPM Priority will make sure that the priorities set by the admin will be taken under consideration.
- Secondly, ordering them with
RANDOM()
, randomly sorts each sub group of hosts that have the same priority. This will prevent the same host from being chosen every time, in case there are several hosts with the same priority.
Affected Commands
AddVdsCommand
- no change since the parameter held is of typeVdsStatic
.UpdateVdsCommand
- no change since the parameter held is of typeVdsStatic
.
REST API changes
The Host
resource schema was changed, and now the storage_manager
element is of type StorageManager
instead of boolean
.
The schema for the StorageManager
type is as follows:
<xs:element name="storage_manager" type="StorageManager"/>
<xs:complexType name="StorageManager">
<xs:simpleContent>
<xs:extension base="xs:boolean">
<xs:attribute name="priority" type="xs:int"></xs:attribute>
</xs:extension>
</xs:simpleContent>
</xs:complexType>