Skip to content

v0.3.0 - Integrate auto-detection into mdadm_arrays configuration

Latest
Compare
Choose a tag to compare
@rguichard rguichard released this 01 Aug 16:46
0c86044

Release v0.3.0 - Integrate auto-detection into mdadm_arrays configuration

Summary

This version introduces a major refactoring of the RAID disk auto-detection system. The previous approach using separate variables has been replaced with direct integration into the mdadm_arrays structure.

New Features

Integrated Configuration

  • New auto_detect field: Enables auto-detection per array
  • New min_disks field: Defines minimum number of disks required for auto-detection
  • Unified configuration: Everything is now configured within mdadm_arrays

Enhanced Validation

  • Conflict detection: Error if auto_detect=true AND devices are defined
  • Resource validation: Error if insufficient disks are available
  • Explicit error messages: Improved debugging of configurations

Breaking Changes

Removed Variables

  • mdadm_auto_detect_arrays: Removed
  • mdadm_auto_detect_config: Removed

New Syntax

Previous configuration (v0.2.0):

mdadm_auto_detect_arrays: true
mdadm_auto_detect_config:
  - name: md200
    filesystem: lvm
    level: 5
    state: present
    min_disks: 3

New configuration (v0.3.0):

mdadm_arrays:
  - name: md200
    devices: []  # empty list for auto-detection
    filesystem: lvm
    level: 5
    state: present
    auto_detect: true
    min_disks: 3

Usage Examples

Manual Configuration

mdadm_arrays:
  - name: md0
    devices:
      - /dev/sdb
      - /dev/sdc
    filesystem: ext4
    level: 1
    state: present
    auto_detect: false  # default

Auto-detection Configuration

mdadm_arrays:
  - name: md200
    devices: []
    filesystem: lvm
    level: 5
    state: present
    auto_detect: true
    min_disks: 3

Mixed Configuration

mdadm_arrays:
  - name: md0          # Manual configuration
    devices:
      - /dev/sdb
      - /dev/sdc
    filesystem: ext4
    level: 1
    state: present
  - name: md200        # Auto-detection
    devices: []
    filesystem: lvm
    level: 5
    state: present
    auto_detect: true
    min_disks: 3

Technical Improvements

  • Validation logic: Strict configuration checks
  • Error handling: Explicit messages for troubleshooting
  • Performance: Auto-detection triggered only when needed
  • Flexibility: Mix manual and auto-detection configurations

Documentation

  • README.md updated with new examples
  • defaults/main.yml documented with complete examples
  • Migration examples provided for easier transition

Migration from v0.2.0

  1. Remove mdadm_auto_detect_arrays and mdadm_auto_detect_config variables
  2. Add arrays with auto_detect: true to mdadm_arrays
  3. Set devices: [] for arrays with auto-detection
  4. Specify min_disks if needed (default: 3)

Contributors


Important: This version contains breaking changes. Please review the migration guide above before updating.