Configuration Settings & Advanced HA
Relevant source files
The following files were used as context for generating this wiki page:
The Configuration Settings and Advanced High Availability (HA) systems in ManageIQ provide a robust, hierarchical framework for managing application behavior and infrastructure resilience. The system allows for granular control over settings at multiple levels of the organizational hierarchy, ensuring that global defaults can be overridden by specific regional, zonal, or server-level requirements.
Advanced HA is primarily facilitated through the concept of Zones, which act as logical groupings of resources and servers. This architecture supports maintenance modes, provider pausing, and automated resource failover, ensuring that management operations remain continuous even during hardware failures or scheduled updates.
Configuration Settings Hierarchy
ManageIQ utilizes a tiered approach to configuration management. Settings are resolved using a "bottom-up" lookup strategy where specific resource settings take precedence over broader defaults.
Settings Persistence and Resolution
Settings are stored both in YAML configuration files (e.g., settings.yml) and in the database via the SettingsChange model. The Vmdb::Settings utility handles the logic for walking configuration trees and resolving values across the hierarchy.
This diagram represents the inheritance flow where lower levels (Server) inherit values from higher levels (Zone/Region) unless a local override exists.
Sources: spec/lib/vmdb/settings_spec.rb:271-290, config/settings.yml
Key Resolution Logic
- Walking the Tree: The system can traverse settings recursively to find specific keys and values.
- Inheritance and Reset: Using a special
RESET_COMMAND, a leaf-level value can be deleted at a specific level to force the resource to inherit the value from its parent level (e.g., a Server reverting to its Zone's setting). - Validation: Settings are validated before saving to prevent invalid configurations, such as unsupported authentication modes.
Sources: spec/lib/vmdb/settings_spec.rb:5-15, spec/lib/vmdb/settings_spec.rb:156-170, spec/lib/vmdb/settings_spec.rb:62-67
Advanced HA and Maintenance Mode
High Availability is managed through the operational state of Zones and the ability to dynamically move resources between them.
Maintenance Zone and Pausing
A critical feature for HA is the ability to "pause" an ExtManagementSystem (EMS). When an EMS is paused, it is moved into a dedicated Maintenance Zone. This process stops active workers and event monitors associated with that provider to prevent management conflicts during maintenance.
This sequence shows how the system safely transitions a provider into a maintenance state.
Sources: app/models/ext_management_system.rb:162-185, app/models/ext_management_system.rb:468-485
Resuming Operations
Resuming an EMS involves restoring it to its original zone (stored in zone_before_pause). This action triggers the reactivation of workers and sets the enabled flag back to true.
| Action | Impact on Configuration | Impact on Infrastructure |
|---|---|---|
| Pause | enabled: false, zone: maintenance | Workers killed, Event monitors stopped |
| Resume | enabled: true, zone: original_zone | Workers restarted, Event monitors resumed |
Sources: app/models/ext_management_system.rb:200-220, app/models/ext_management_system.rb:550-560
Advanced Settings Management
Advanced settings are specialized configuration records used for fine-tuning specific components. Unlike general settings, these are often bound to specific resources like VMs or Templates.
Data Model: AdvancedSetting
The AdvancedSetting class defines the schema for these specialized configurations.
| Field | Type | Description |
|---|---|---|
name | String | The unique identifier for the setting. |
value | String | The current configuration value. |
resource_id | Integer | ID of the associated resource (e.g., VM). |
resource_type | String | Type of the associated resource. |
Sources: app/models/advanced_setting.rb:1-5
Security and Password Handling
To maintain HA security standards, the configuration system automatically handles sensitive data.
Encryption and Masking
The Vmdb::Settings utility includes specific logic for password fields defined in PASSWORD_FIELDS.
- Automatic Encryption: Password fields are encrypted using
ManageIQ::Password.encryptbefore being saved to the database. - Masking: When settings are retrieved for logs or UI display, these fields can be masked (e.g.,
********) or filtered entirely. - Secret Filter: The system supports a
secret_filterthat combines default password fields with custom-defined keys to ensure no secrets are leaked in application logs.
Sources: spec/lib/vmdb/settings_spec.rb:133-145, spec/lib/vmdb/settings_spec.rb:390-410, spec/lib/vmdb/settings_spec.rb:440-455
Component Overview
| Component | Responsibility | Relevant Files |
|---|---|---|
| Vmdb::Settings | Resolution, inheritance, and persistence of hierarchical settings. | settings_spec.rb |
| ExtManagementSystem | Management of provider states, pausing, and resuming for HA. | ext_management_system.rb |
| Zone | Logical grouping of resources and HA boundary definition. | zone.rb |
| AdvancedSetting | Granular resource-level configuration overrides. | advanced_setting.rb |
Summary
The "Configuration Settings & Advanced HA" system ensures that ManageIQ remains configurable and resilient. By combining a hierarchical settings resolution strategy with sophisticated Zone-based lifecycle management (Maintenance Mode, Pausing/Resuming), the platform allows administrators to perform maintenance and handle failures without global service interruption. Security is integrated directly into the configuration layer through automated password encryption and secret filtering.