Re: [PATCH 2/2] Use 'zerombr' kickstart command for DASDs needing dasdfmt (#528386).

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

 



On 10/29/2009 08:12 AM, Hans de Goede wrote:
> On 10/29/2009 04:12 AM, David Cantrell wrote:
>> If performing a kickstart install on s390, dasdfmt is only run if:
>> a) There is a UI available to prompt the user.
>> b) 'zerombr' is specified in the kickstart file.
>>
>> The zerombr command will also skip the UI if there is one.  The UI
>> prompt is a fallback.
>> ---
>>   storage/__init__.py |    2 +-
>>   storage/dasd.py     |   25 ++++++++++++++++++-------
>>   2 files changed, 19 insertions(+), 8 deletions(-)

>> diff --git a/storage/dasd.py b/storage/dasd.py
>> index 7217a36..94e31df 100644
>> --- a/storage/dasd.py
>> +++ b/storage/dasd.py

>> @@ -82,12 +85,20 @@ class DASD:
>>               log.info("    no unformatted DASD devices found")
>>               return
>>
>> +        askUser = True
>> +
>> +        if zeroMbr:
>> +            askUser = False
>> +        elif not intf and not zeroMbr:
>> +            log.info("    non-interactive kickstart install without
>> zerombr "
>> +                     "command skipping dasdfmt")
>> +            sys.exit(0)
>> +
> 
> Shouldn't this be a simple "return", you are now terminating the
> installer, if
> this is really fatal, so exiting is the right thing to do, then the log
> message needs to be changed.

Good catch, we should change the log message from "skipping dasdfmt" to
"exiting installer" or similar.
Other than that, the patch looks good to me.

>> @@ -109,9 +120,9 @@ class DASD:
>>               icon =
>> "/usr/share/icons/gnome/32x32/status/dialog-error.png"
>>               buttons = [_("_Format"), _("_Exit installer")]
>>               rc = intf.detailedMessageWindow(title, msg, devs.strip(),
>> -                                            type="custom",
>> -                                            custom_icon=icon,
>> -                                            custom_buttons=buttons)
>> +                                                 type="custom",
>> +                                                 custom_icon=icon,
>> +                                                 custom_buttons=buttons)
>>               if rc == 1:
>>                   sys.exit(0)
>>
> 
> While at it you also have me wondering about this, is having unformatted
> DASD's fatal?
> If not shouldn't we simply ignore them when the user does not
> want to format them ?

No, theoretically it is not fatal but from a previous discussion [1] we
concluded that we would need to exclude the unformatted DASDs to not run
into the original traceback later on and also for other reasons that we
leave the exit of the installer. In such cases the user has to exclude
unformatted DASDs he doesn't want to touch in the first place before
bringing them online.
[1]https://www.redhat.com/archives/anaconda-devel-list/2009-October/msg00443.html

Steffen

Linux on System z Development

IBM Deutschland Research & Development GmbH
Vorsitzender des Aufsichtsrats: Martin Jetter
Geschäftsführung: Erich Baier
Sitz der Gesellschaft: Böblingen
Registergericht: Amtsgericht Stuttgart, HRB 243294


_______________________________________________
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