← Back to team overview

curtin-dev team mailing list archive

[Merge] ~mwhudson/curtin:install-to-resyncing-raid into curtin:master

 

Michael Hudson-Doyle has proposed merging ~mwhudson/curtin:install-to-resyncing-raid into curtin:master.

Commit message:
mdadm: allow installation to a syncing array

LP: #1939563



Requested reviews:
  curtin developers (curtin-dev)
Related bugs:
  Bug #1939563 in curtin: "Installer crashes during install if VROC RAID is undergoing initialization."
  https://bugs.launchpad.net/curtin/+bug/1939563

For more details, see:
https://code.launchpad.net/~mwhudson/curtin/+git/curtin/+merge/406969
-- 
Your team curtin developers is requested to review the proposed merge of ~mwhudson/curtin:install-to-resyncing-raid into curtin:master.
diff --git a/curtin/block/mdadm.py b/curtin/block/mdadm.py
index a5dfc9f..7bb6b96 100644
--- a/curtin/block/mdadm.py
+++ b/curtin/block/mdadm.py
@@ -749,8 +749,9 @@ def md_check_array_state(md_devname):
         raise ValueError('Array not in writable state: ' + md_devname)
     if degraded is not None and degraded != "0":
         raise ValueError('Array in degraded state: ' + md_devname)
-    if degraded is not None and sync_action != "idle":
-        raise ValueError('Array syncing, not idle state: ' + md_devname)
+    if degraded is not None and sync_action not in ("idle", "resync"):
+        raise ValueError(
+            'Array is %s, not idle: %s' % (sync_action, md_devname))
 
 
 def md_check_uuid(md_devname):

Follow ups