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

Re: [PATCH rhel5.4] Do not load storage drivers before loading DUD over network (#454478)



Looks good.

Martin

----- "Radek Vykydal" <rvykydal redhat com> wrote:

> Modified patch by Jeff Bastian applied.
> 
> It should change behaviour when dd=<URL> with <URL> being http, ftp,
> or nfs
> location is used. Original patch (its first version I guess) was
> tested by
> customer for these cases, but it should get testing for other
> (non-network)
> dd=<URL> cases -- I modified Jeff's 2nd vesrion patch as there was no
> busProbe
> for this code path. Jeff's patch was reviewed:
> https://www.redhat.com/archives/anaconda-devel-list/2008-July/msg00015.html
> 
> There is a concern if we can keep the functionality in rawhide
> (rhel6), where
> we are using udev for module loading. I think we could use (in the
> worst case)
> the same kludge by calling udevadm trigger --subsystem-match=net to
> get only
> network drivers loaded before loading (storage) drivers from DUD over
> network.
> I wasn't able to test this in rawhide (trying to replace loader in
> existing
> image with patched-one gave me errors from NetworkManager - it
> happened also
> when I replaced loader with newly-built loader without patch (tried
> with .52
> ver), so I must be missing something or I have to build images with
> pungi to
> test).
> 
> There is also suggestion to add new blacklist= parameter in rawhide to
> prevent
> loading of storage drivers before loading DUD in BZ.
>  
> 
> ---
>  loader2/loader.c |   21 ++++++++++++++++-----
>  1 files changed, 16 insertions(+), 5 deletions(-)
> 
> diff --git a/loader2/loader.c b/loader2/loader.c
> index 297574d..25c4cec 100644
> --- a/loader2/loader.c
> +++ b/loader2/loader.c
> @@ -1631,13 +1631,24 @@ int main(int argc, char ** argv) {
>       *        but is done as a quick hack for the present.
>       */
>      earlyModuleLoad(modInfo, modLoaded, modDeps, 0);
> -    busProbe(modInfo, modLoaded, modDeps, 0);
> -
> -    /* JKFIXME: we'd really like to do this before the busprobe, but
> then
> -     * we won't have network devices available (and that's the only
> thing
> -     * we support with this right now */
>      if (loaderData.ddsrc != NULL) {
> +	/* If we load DUD from ftp, http, or nfs location,
> +         * do not load storage drivers so that thay can be updated
> +	 * from DUD before loading (#454478).
> +	 */
> +        if (!strncmp(loaderData.ddsrc, "nfs:", 4) || 
> +            !strncmp(loaderData.ddsrc, "ftp://";, 6) ||
> +            !strncmp(loaderData.ddsrc, "http://";, 7)) {
> +            uint64_t save_flags = flags;
> +            flags |= LOADER_FLAGS_NOSTORAGE;
> +            busProbe(modInfo, modLoaded, modDeps, 0);
> +            flags = save_flags;
> +        } else {
> +            busProbe(modInfo, modLoaded, modDeps, 0);
> +        }
>          getDDFromSource(&loaderData, loaderData.ddsrc);
> +    } else {
> +        busProbe(modInfo, modLoaded, modDeps, 0);
>      }
>  
>      /* JKFIXME: loaderData->ksFile is set to the arg from the command
> line,
> -- 
> 1.5.4.3
> 
> _______________________________________________
> Anaconda-devel-list mailing list
> Anaconda-devel-list redhat com
> https://www.redhat.com/mailman/listinfo/anaconda-devel-list


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