Skip to content

Commit

Permalink
Merge branch '3.9-devel' into 3.10-devel
Browse files Browse the repository at this point in the history
  • Loading branch information
vojtechtrefny committed Feb 28, 2024
2 parents f7db1ea + 94adfec commit 7cff271
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions blivet/populator/helpers/mdraid.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
from ...devicelibs import raid
from ...devices import MDRaidArrayDevice, MDContainerDevice
from ...devices import device_path_to_name
from ...errors import DeviceError, NoParentsError
from ...errors import DeviceError, NoParentsError, MDRaidError
from ...flags import flags
from ...storage_log import log_method_call
from .devicepopulator import DevicePopulator
Expand All @@ -58,7 +58,10 @@ def run(self):
return None

# try to get the device again now that we've got all the parents
device = self._devicetree.get_device_by_device_id("MDRAID-" + name, incomplete=flags.allow_imperfect_devices)
if name:
device = self._devicetree.get_device_by_device_id("MDRAID-" + name, incomplete=flags.allow_imperfect_devices)
else:
device = None

if device is None:
try:
Expand Down Expand Up @@ -219,6 +222,12 @@ def run(self):

self._devicetree.handle_device(array_info, update_orig_fmt=True)

if flags.auto_dev_updates and md_array and not md_array.status and md_array.complete:
try:
md_array.setup()
except MDRaidError:
log.warning("failed to activate MD array %s", md_array.name)

def update(self):
# update array based on current md data
pass

0 comments on commit 7cff271

Please sign in to comment.