Re: [PATCH 4/5] Add mdadm_no_degraded

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

 



On Fri, 2009-06-12 at 14:33 +0200, Jacek Danecki wrote:
> Dan Williams wrote:
> > Jacek Danecki wrote:
> >> This patch adds new function used by activating md array for isw format.

Instead of duplicating the entire function to add one option, why not
add an optional/keyword argument "no_degraded" to the mdadd function.
The new prototype would be as follows:

def mdadd(device, no_degraded=None):

Inside the function you add some logical to either pass "--no-degraded"
or not.

Dave

> >>
> > 
> >> +def mdadd_no_degraded(device):
> >> +    ### FIXME: this should be merged with mdadd function
> >> +    rc = iutil.execWithRedirect("mdadm",
> >> +                                ["--incremental", 
> >> +                                 "--auto=md",
> > 
> > The "auto" option is deprecated since all arrays are now partitionable.
> 
> Rewritten patch.
> plain text document attachment (p4.patch)
> commit 427db25f6d57d72544b5e44d7d60fd0de4832857
> Author: Jacek Danecki <Jacek.Danecki@xxxxxxxxx>
> Date:   Fri Jun 12 14:05:29 2009 -0400
> 
>     Add function mdadm_no_degraded
> 
> diff --git a/storage/devicelibs/mdraid.py b/storage/devicelibs/mdraid.py
> index 56fd626..6944a30 100644
> --- a/storage/devicelibs/mdraid.py
> +++ b/storage/devicelibs/mdraid.py
> @@ -153,6 +153,19 @@ def mdadd(device):
>      rc = iutil.execWithRedirect("mdadm",
>                                  ["--incremental", 
>                                   "--quiet",
> +                                device],
> +                                stderr = "/dev/tty5",
> +                                stdout = "/dev/tty5",
> +                                searchPath=1)
> +
> +    if rc:
> +        raise MDRaidError("mdadd failed for %s" % device)
> +
> +def mdadd_no_degraded(device):
> +    ### FIXME: this should be merged with mdadd function
> +    rc = iutil.execWithRedirect("mdadm",
> +                                ["--incremental", 
> +                                 "--no-degraded",
>                                   device],
>                                  stderr = "/dev/tty5",
>                                  stdout = "/dev/tty5",
> _______________________________________________
> Anaconda-devel-list mailing list
> Anaconda-devel-list@xxxxxxxxxx
> https://www.redhat.com/mailman/listinfo/anaconda-devel-list

_______________________________________________
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