Description of problem:
When using the cpu_realtime and cpu_realtim_mask flag to create new instance, the 'cpuset' of 'emulatorpin' option is using the id of vcpu which is incorrect. The id of host cpu should be used here.
e.g.
<cputune>
<vcpupin vcpu='0' cpuset='2'/>
<vcpupin vcpu='1' cpuset='3'/>
<emulatorpin cpuset='0'/> ### the cpuset should be '2' here, when cpu_realtime_mask=^0.
<vcpusched vcpus='1' scheduler='fifo' priority='1'/>
</cputune>
How reproducible:
Boot new instance with cpu_realtime_mask flavor.
Steps to Reproduce:
1. Create RT flavor
nova flavor-create m1.small.performance 6 2048 20 2
nova flavor-key m1.small.performance set hw:cpu_realtime=yes
nova flavor-key m1.small.performance set hw:cpu_realtime_mask=^0
nova flavor-key m1.small.performance set hw:cpu_policy=dedicated
2. Boot a instance with this flavor
3. Check the xml of the new instance
Description of problem:
When using the cpu_realtime and cpu_realtim_mask flag to create new instance, the 'cpuset' of 'emulatorpin' option is using the id of vcpu which is incorrect. The id of host cpu should be used here.
e.g. mask=^0.
<cputune>
<vcpupin vcpu='0' cpuset='2'/>
<vcpupin vcpu='1' cpuset='3'/>
<emulatorpin cpuset='0'/> ### the cpuset should be '2' here, when cpu_realtime_
<vcpusched vcpus='1' scheduler='fifo' priority='1'/>
</cputune>
How reproducible:
Boot new instance with cpu_realtime_mask flavor.
Steps to Reproduce: performance 6 2048 20 2 performance set hw:cpu_realtime=yes performance set hw:cpu_ realtime_ mask=^0 performance set hw:cpu_ policy= dedicated
1. Create RT flavor
nova flavor-create m1.small.
nova flavor-key m1.small.
nova flavor-key m1.small.
nova flavor-key m1.small.
2. Boot a instance with this flavor
3. Check the xml of the new instance
Actual results:
<cputune>
<vcpupin vcpu='0' cpuset='2'/>
<vcpupin vcpu='1' cpuset='3'/>
<emulatorpin cpuset='0'/>
<vcpusched vcpus='1' scheduler='fifo' priority='1'/>
</cputune>
Expected results:
<cputune>
<vcpupin vcpu='0' cpuset='2'/>
<vcpupin vcpu='1' cpuset='3'/>
<emulatorpin cpuset='2'/>
<vcpusched vcpus='1' scheduler='fifo' priority='1'/>
</cputune>