Using resources:PCPU property does not result in CPU pinning

Bug #1966452 reported by Dmitriy Rabotyagov
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Invalid
High
Unassigned

Bug Description

When instance is being created from flavor with `--property resources:PCPU=4`, generated XML doesn't include vcpupin directives that basically does pinning.

Instead only <vcpu placement='static'>4</vcpu> is present in libvirt for flavor with PCPU resource.

Nova version: Xena

Sample flavor that's being used:
+----------------------------+----------------------------------------------------+
| Field | Value |
+----------------------------+----------------------------------------------------+
| OS-FLV-DISABLED:disabled | False |
| OS-FLV-EXT-DATA:ephemeral | 0 |
| description | None |
| disk | 50 |
| id | 7d4455db-8d5e-4067-8c7d-2e0eb0d642f1 |
| name | cpu-high-flavor_test |
| os-flavor-access:is_public | True |
| properties | resouces:PCPU='4', trait:CUSTOM_HIGHCPU='required' |
| ram | 2048 |
| rxtx_factor | 1.0 |
| swap | |
| vcpus | 4 |
+----------------------------+----------------------------------------------------+

Generated XML will be attached.

Revision history for this message
Dmitriy Rabotyagov (noonedeadpunk) wrote :
Revision history for this message
sean mooney (sean-k-mooney) wrote :

setting this to high as this bug results in multiple cpus being pinned to a single CPU

<nova:vcpus>4</nova:vcpus>
<vcpu placement="static">4</vcpu>

the workaround is to just used the preferred way of requesting CPU pinning via hw:cpu_policy=dedicated.

Changed in nova:
importance: Undecided → High
Changed in nova:
status: New → Triaged
Revision history for this message
sean mooney (sean-k-mooney) wrote :

actully no that is wrong

<vcpu placement="static">4</vcpu> is not pinned its asking for 4 CPU

the alternative syntax for pining via vcpu uses cpuset to specify the cpus to pin too and the text value of the element is the amount of CPU cores to emulate.
e.g. <vcpu placement='static' cpuset="1-4" >4</vcpu> would pin to 1-4 inclusive

Revision history for this message
Dmitriy Rabotyagov (noonedeadpunk) wrote :

There's a typo in flavor specification I was copy-pasting several times ;(

| properties | resouces:PCPU='4', trait:CUSTOM_HIGHCPU='required' |

s/resouces/resources/

Changed in nova:
status: Triaged → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.