[Kimchi-devel] [PATCH] PPC: Templates have memory always set to 1280. Set minimal memory to 2048

Rodrigo Trujillo rodrigo.trujillo at linux.vnet.ibm.com
Wed May 13 19:10:39 UTC 2015


Hi all,
Please, check my points below.

On 05/12/2015 11:55 AM, Aline Manera wrote:
>
>
> On 12/05/2015 02:46, Rodrigo Trujillo wrote:
>> There is a bug in the osinfo.py when Kimchi generates templates for ppc
>> guests. The amount of memory will always be 1280, in other other, it is
>> overwriting the value set in src/template.conf.
>> This patch fixes this problem and sets the minimal memory for ppc guests
>> as 2048, because there are issues reported by users that 1280 is not
>> sufficient and cause installation hangs.
>>
>> Signed-off-by: Rodrigo Trujillo <rodrigo.trujillo at linux.vnet.ibm.com>
>> ---
>>   src/kimchi/osinfo.py | 16 +++++++++-------
>>   1 file changed, 9 insertions(+), 7 deletions(-)
>>
>> diff --git a/src/kimchi/osinfo.py b/src/kimchi/osinfo.py
>> index 67d85be..5c315ea 100644
>> --- a/src/kimchi/osinfo.py
>> +++ b/src/kimchi/osinfo.py
>> @@ -43,28 +43,26 @@ template_specs = {'x86': {'old': 
>> dict(disk_bus='ide',
>>                                           cdrom_bus='scsi',
>>                                           kbd_type="kbd",
>>                                           kbd_bus='usb', 
>> mouse_bus='usb',
>> -                                        tablet_bus='usb', memory=1280),
>> +                                        tablet_bus='usb'),
>>                               'modern': dict(disk_bus='virtio',
>>                                              nic_model='virtio',
>>                                              cdrom_bus='scsi',
>>                                              kbd_bus='usb',
>>                                              kbd_type="kbd",
>> -                                           mouse_bus='usb', 
>> tablet_bus='usb',
>> -                                           memory=1280)},
>> +                                           mouse_bus='usb', 
>> tablet_bus='usb')},
>
> Why are you removing the setting for x86?

I did not remove x86.  that "x86" line is part of the DIFF output, such 
as a header that usually is the function definition line.
In this case, it is the dictionary definition first line.

>
>>                     'ppc64le': {'old': dict(disk_bus='virtio',
>>                                             nic_model='virtio',
>>                                             cdrom_bus='scsi',
>>                                             kbd_bus='usb',
>>                                             kbd_type="keyboard",
>> -                                          mouse_bus='usb', 
>> tablet_bus='usb',
>> -                                          memory=1280),
>> +                                          mouse_bus='usb', 
>> tablet_bus='usb'),
>>                                 'modern': dict(disk_bus='virtio',
>> nic_model='virtio',
>>                                                cdrom_bus='scsi',
>>                                                kbd_bus='usb',
>> kbd_type="keyboard",
>> -                                             mouse_bus='usb', 
>> tablet_bus='usb',
>> -                                             memory=1280)}}
>> +                                             mouse_bus='usb',
>> + tablet_bus='usb')}}
>>
>
> You just need to update the values above to 2048 instead of removing 
> them.
>

Like I wrote in the bug header, the values must be removed because they 
will always
overwrite the value set in "template.conf". If the admin set "memory = 
4096", templates
in PPC will be created with 1280M or any other value that I update. This 
is an error.

>>   modern_version_bases = {'x86': {'debian': '6.0', 'ubuntu': '7.10',
>> @@ -185,6 +183,10 @@ def lookup(distro, version):
>>       if params["arch"] == "ppc64le":
>>           params["arch"] = "ppc64"
>
>> +    # set up minimal default amount of memory for powerpc guests
>> +    if params["arch"] in ("ppc", "ppc64") and params["memory"] < 2048:
>> +        params["memory"] = 2048
>> +
> It is not needed! The values come from the defaults dicts specified 
> above.

This is needed to enforce PPC guests to have at least 2048M. Users have 
complained about
problems with 1280M.
This part of code respects x86 value default value (1280M) , respects 
PPC higher values, and
avoid user to make mistakes in PPC, setting memory lesser than 2048M.


>>       if distro in modern_version_bases[arch]:
>>           if LooseVersion(version) >= LooseVersion(
>>                   modern_version_bases[arch][distro]):
>
> _______________________________________________
> Kimchi-devel mailing list
> Kimchi-devel at ovirt.org
> http://lists.ovirt.org/mailman/listinfo/kimchi-devel
>




More information about the Kimchi-devel mailing list