[Starlingx-discuss] WG: cpu mode

Chris Friesen chris.friesen at windriver.com
Tue Jan 22 15:58:30 UTC 2019


Good to hear.

Just a caveat for you and anyone else that wants to try this, you 
shouldn't run with that change on a cluster that has compute nodes with 
Intel CPUs as it'll let you try to run an EPYC guest on an Intel host, 
which will fail miserably.

Once we switch over to the upstream nova code this issue will go away, 
however so will the whole mechanism to specify a CPU model in the 
flavor.  Instead, there will be a separate way to request CPU features. 
(See 
https://github.com/openstack/nova-specs/blob/master/specs/stein/approved/cpu-model-selection.rst 
for details on what we're planning to push upstream.)

Chris

On 1/22/2019 2:33 AM, von Hoesslin, Volker wrote:
> great! works like a charm! big thx !!!!
> 
> volker...
> ________________________________________
> Von: Chris Friesen [chris.friesen at windriver.com]
> Gesendet: Montag, 21. Januar 2019 20:10
> An: von Hoesslin, Volker; starlingx-discuss at lists.starlingx.io
> Betreff: Re: AW: [Starlingx-discuss] WG: cpu mode
> 
> I think you'd need to edit the code on both controllers to add "EPYC"
> and "EPYC-IBPB" (with a "Y" instead of an "I") to the list in
> objects/fields.py such that it comes immediately after the "Passthrough"
> item.  It should look something like this:
> 
> class CPUModel(BaseNovaEnum):
>       # We use the ordering of the cpu models to determine whether a
>       # given host can emulate a specified virtual model, so it's not
>       # just an enum.
>       ALL = ("Passthrough",
>              "EPYC",
>              "EPYC-IBPB",
>              "Conroe",
>              "Penryn",
> 
> You'd then need to restart the nova-scheduler service on the active
> controller as per the instructions below.
> 
> Chris
> 
> On 1/21/2019 10:45 AM, von Hoesslin, Volker wrote:
>> i have tried to extend this code:
>>
>> File: /usr/lib/python2.7/site-packages/nova/objects/fields.py
>> Class: class CPUModel(BaseNovaEnum):
>>
>> and add this two elements to list:
>>
>>              "EPIC",
>>              "EPIC-IBPB"
>>
>> restart the controller, but the same error:
>>
>>    (VCpuModelFilter) Host VCPU model EPYC-IBPB required Passthrough
>>
>> i'm not sure, is this code used or have to recompile some stuff?
>>
>> volker...
>>
>> ________________________________________
>> Von: von Hoesslin, Volker [Volker.Hoesslin at swsn.de]
>> Gesendet: Montag, 21. Januar 2019 17:07
>> An: Chris Friesen; starlingx-discuss at lists.starlingx.io
>> Betreff: Re: [Starlingx-discuss] WG: cpu mode
>>
>> kk, it seems it is the right way, but now i get this error here:
>>
>> No valid host was found. There are not enough hosts available. compute-0: (VCpuModelFilter) Host VCPU model EPYC-IBPB required Passthrough, compute-1: (VCpuModelFilter) Host VCPU model EPYC-IBPB required Passthrough
>>
>> volker...
>> ________________________________________
>> Von: Chris Friesen [chris.friesen at windriver.com]
>> Gesendet: Montag, 21. Januar 2019 16:28
>> An: von Hoesslin, Volker; starlingx-discuss at lists.starlingx.io
>> Betreff: Re: AW: [Starlingx-discuss] WG: cpu mode
>>
>> This is another assumption about Intel CPUs.  I *think* the following
>> should work:
>>
>> On the controllers, edit
>> /usr/lib/python2.7/site-packages/nova/scheduler/filters/vcpu_model_filter.py
>> (if that's not the path it should be something pretty close).  In the
>> "_is_host_kvm" function add the following before the "return False" line:
>>
>>        if 'svm' in info['features']:
>>            return True
>>
>> Then, on the active controller node run "sudo sm-restart service
>> nova-scheduler".  This should restart the nova scheduler, and at this
>> point you should be able to schedule an instance.
>>
>> Chris
>>
>>
>> On 1/21/2019 9:16 AM, von Hoesslin, Volker wrote:
>>> this would be very nice, but if i try to launch a vm with a flavor that contain the given extra-spec, i get this error:
>>>
>>> No valid host was found. There are not enough hosts available. compute-0: (VCpuModelFilter) Passthrough VCPU Model only available on 'kvm' hosts, compute-1: (VCpuModelFilter) Passthrough VCPU Model only available on 'kvm' hosts
>>>
>>> volker...
>>> ________________________________________
>>> Von: Chris Friesen [chris.friesen at windriver.com]
>>> Gesendet: Montag, 21. Januar 2019 16:09
>>> An: starlingx-discuss at lists.starlingx.io
>>> Betreff: Re: [Starlingx-discuss] WG: cpu mode
>>>
>>> You shouldn't need to modify nova.conf.
>>>
>>> With the current codebase you should be able to specify
>>> "hw:cpu_model=Passthrough" in the flavor extra-specs.
>>>
>>> Chris
>>>
>>> On 1/21/2019 8:30 AM, von Hoesslin, Volker wrote:
>>>> i have set "host-passthrough" in "/etc/nova/nova.conf"
>>>>
>>>> =================================
>>>> [DEFAULT]
>>>> libvirt_cpu_mode = host-passthrough
>>>>
>>>> [libvirt]
>>>> cpu_mode = host-passthrough
>>>> =================================
>>>>
>>>> and restart nove service:
>>>> # service nova-compute restart
>>>>
>>>> for now it works! "lscpu" on guest os shows me the AMD EPIC with all features, very nice. but after reboot the compute-node, the auto-config script change this setting back to "none":
>>>>
>>>> [libvirt]
>>>> cpu_mode = none
>>>>
>>>> and passthrough did not work anymore :( so how can i prevent this auto-config or define my new config as persistent?
>>>
>>>
>>>
>>> _______________________________________________
>>> Starlingx-discuss mailing list
>>> Starlingx-discuss at lists.starlingx.io
>>> http://lists.starlingx.io/cgi-bin/mailman/listinfo/starlingx-discuss
>>>
>>
>>
>> _______________________________________________
>> Starlingx-discuss mailing list
>> Starlingx-discuss at lists.starlingx.io
>> http://lists.starlingx.io/cgi-bin/mailman/listinfo/starlingx-discuss
>>
> 




More information about the Starlingx-discuss mailing list