[PATCH] Don't write out md member devices to a config file for assemble.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This was either to work around a bug in mdadm or my bad usage, but
either way it is no longer necessary.
---
 storage/devicelibs/mdraid.py |   22 +---------------------
 1 files changed, 1 insertions(+), 21 deletions(-)

diff --git a/storage/devicelibs/mdraid.py b/storage/devicelibs/mdraid.py
index dec5f2d..4aec86f 100644
--- a/storage/devicelibs/mdraid.py
+++ b/storage/devicelibs/mdraid.py
@@ -157,36 +157,16 @@ def mdactivate(device, members=[], super_minor=None, uuid=None):
     else:
         identifier = ""
 
-    filename = None
-    if members:
-        from tempfile import mkstemp
-        (fd, filename) = mkstemp(prefix="%s_devices." % device,
-                                     dir="/tmp",
-                                     text=True)
-        os.write(fd, "DEVICE %s\n" % " ".join(members))
-        config_arg = "--config=%s" % filename
-        os.close(fd)
-        del mkstemp
-    else:
-        config_arg = ""
-
     rc = iutil.execWithRedirect("mdadm",
                                 ["--assemble",
-                                 config_arg,
                                  device,
                                  identifier,
                                  "--auto=md",
-                                 "--update=super-minor"],
+                                 "--update=super-minor"] + members,
                                 stderr = "/dev/tty5",
                                 stdout = "/dev/tty5",
                                 searchPath=1)
 
-    if filename and os.access(filename, os.R_OK):
-        try:
-            os.unlink(filename)
-        except OSError, e:
-            log.debug("unlink of %s failed: %s" % (filename, e))
-
     if rc:
         raise MDRaidError("mdactivate failed for %s" % device)
 
-- 
1.6.0.6

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/anaconda-devel-list

[Index of Archives]     [Kickstart]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]
  Powered by Linux