[PATCH anaconda-dracut] Fix ksdevice=<MAC> - instead of renaming the device to ksdev0 just use it

Radek Vykydal rvykydal at redhat.com
Mon Feb 25 11:07:25 UTC 2013


On 02/23/2013 01:46 AM, Will Woods wrote:
> The patch (and the documented behavior) all looks fine to me, with one
> note below:
>
> On Thu, 2013-02-21 at 13:57 +0100, Radek Vykydal wrote:
>> ksdevice option doesn't work in f17 and f18.
>>
>> It used to specify which network device to activate in early stage of
>> installation, eg. to fetch kickstart or installation image.
>>
>> In F17 and F18 the device should be specified by dracut option ip=
>>
>> Mapping of ksdevice options from loader to dracut options used in
>> F17 and F18:
>>
>> - ksdevice missing (and network is required)
>> loader: user was asked in UI in case of more devices present
>> dracut: activates all devices if not specified
>>
>> - ksdevice=eth0
>> loader: eth0 is activated
>> dracut: specify device in ip=, eg
>>          ip=eth0:dhcp
>>          ip=10.34.39.44::10.34.39.254:255.255.255.0::eth0:none
>>
>> - ksdevice=00:12:34:56:78:9a
>> loader: device with MAC address is activated
>> dracut: We translate it to ifname=ksdev0:00:12:34:56:78:9a which renames
>>          the device.
>>          It is possible to use BOOTIF=00-12-34-56-78-9a, which this patch
>>          does.
>>
>> - ksdevice=link
>> loader: first device with link found is activated
>> dracut: no way to achive this (activate single unspecified device)?
> Like it said in the code before, I believe the default behavior matches
> ksdevice=link. See if you can follow the logic:
>
> 1. If you don't specify a device, dracut tries to bring them *all* up.
> 2. The first device that comes online is used to grab the kickstart.
>
> Therefore:
>
> * If you only have one device with link, that one will be used
> * If you have multiple devices with link, one of them will be used
>    - Exactly which device comes online first is undefined and may vary
>
> (for anaconda-dracut, whichever comes online fastest wins.)

but all of them would be activated

> Now let's look at loader's behavior when using "ksdevice=link":
>
> * If you only have one device with link, that one will be used
> * If you have multiple devices, the "first device" will be chosen
>    - Exactly which device is listed first is undefined and may vary
>
> (for loader, whichever device was enumerated first by the kernel wins.)

and this is the only one that would be activated

> So, unless there actually does exist some definition of loader's
> required behavior when using "ksdevice=link" with multiple devices, I
> think anaconda-dracut's default behavior matches the expected behavior
> there, and the warning should probably mention that so people don't
> think we've lost that functionality.

The difference here is that in case of multiple devices having link,
loader activates single device, while dracut activates all devices
having link. Activating additional devices can be a concern for
some server use cases. On the other hand - the option to activate
single *unspecified* device chosen among all devices having link
doesn't seem like something worth supporting.

Thinking of it, the root of the difference - activating of all devices
by dracut if none is specified is something better to be assessed as
a separate issue.

I'll keep the former warning.

Thanks for the review, Radek



More information about the anaconda-patches mailing list