Activity log for bug #1614054

Date Who What changed Old value New value Message
2016-08-17 10:50:42 Sahid Orentino bug added bug
2016-08-17 10:50:50 Sahid Orentino nova: assignee sahid (sahid-ferdjaoui)
2016-08-17 10:56:13 OpenStack Infra nova: status New In Progress
2016-09-14 05:03:59 zenghui.shi bug added subscriber zenghui.shi
2016-11-02 16:34:04 Jay Pipes nova: importance Undecided Medium
2016-11-03 17:18:37 OpenStack Infra nova: status In Progress Fix Released
2016-11-09 02:45:36 Tony Breeds tags liberty-backport-potential libvirt libvirt newton-backport-potential
2017-02-10 22:26:28 Matt Riedemann nominated for series nova/newton
2017-02-10 22:26:28 Matt Riedemann bug task added nova/newton
2017-02-10 22:27:24 Matt Riedemann nova/newton: status New In Progress
2017-02-10 22:27:30 Matt Riedemann nova/newton: assignee Lee Yarwood (lyarwood)
2017-02-10 22:27:34 Matt Riedemann nova/newton: importance Undecided Medium
2017-02-11 01:12:10 OpenStack Infra nova/newton: status In Progress Fix Committed
2017-07-18 08:49:32 Amad Ali tags libvirt newton-backport-potential libvirt mitaka-backport-potential newton-backport-potential
2017-07-20 10:20:29 Edward Hope-Morley bug task added cloud-archive
2017-07-20 10:23:56 Edward Hope-Morley nominated for series cloud-archive/mitaka
2017-07-20 10:23:56 Edward Hope-Morley nominated for series cloud-archive/newton
2017-07-20 10:24:35 Edward Hope-Morley tags libvirt mitaka-backport-potential newton-backport-potential libvirt newton-backport-potential sts sts-sru-needed
2017-07-20 14:57:00 Edward Hope-Morley attachment added lp1614054-xenial-mitaka.debdiff https://bugs.launchpad.net/cloud-archive/+bug/1614054/+attachment/4918208/+files/lp1614054-xenial-mitaka.debdiff
2017-07-20 15:06:56 Edward Hope-Morley description 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 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> [Impact] See bug description [Test Case] * deploy openstack mitaka and configure nova.conf with vcpu-pin-set=0,1,2,3 https://pastebin.ubuntu.com/25133260/ * configure compute host kernel opts with "isolcpus=0,1,2,3" + reboot * create flavor with: openstack flavor create --public --ram 2048 --disk 10 --vcpus 2 --swap 0 test_flavor openstack flavor set --property hw:cpu_realtime_mask='^0' test_flavor openstack flavor set --property hw:cpu_policy=dedicated test_flavor openstack flavor set --property hw:cpu_thread_policy=prefer test_flavor openstack flavor set --property hw:cpu_realtime=yes test_flavor * boot instance with ^^ flavor * check that libvirt xml for vm has correct emulator pin cpuset # [Regression Potential] None expected. ==== 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 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>
2017-07-21 08:40:42 James Page bug task added cloud-archive/mitaka
2017-07-21 08:40:59 James Page cloud-archive: status New Fix Released
2017-07-21 08:41:16 James Page bug task added nova (Ubuntu)
2017-07-21 08:41:24 James Page nominated for series Ubuntu Xenial
2017-07-21 08:41:24 James Page bug task added nova (Ubuntu Xenial)
2017-07-21 08:41:34 James Page nova (Ubuntu): status New Fix Released
2017-07-21 08:41:38 James Page nova (Ubuntu Xenial): status New Triaged
2017-07-21 08:41:42 James Page cloud-archive/mitaka: status New Triaged
2017-07-21 08:41:46 James Page nova (Ubuntu Xenial): importance Undecided Medium
2017-07-21 08:41:48 James Page cloud-archive/mitaka: importance Undecided Medium
2017-07-21 17:31:07 Edward Hope-Morley attachment removed lp1614054-xenial-mitaka.debdiff https://bugs.launchpad.net/nova/+bug/1614054/+attachment/4918208/+files/lp1614054-xenial-mitaka.debdiff
2017-07-21 17:31:36 Edward Hope-Morley attachment added lp1614054-xenial-mitaka.debdiff https://bugs.launchpad.net/nova/+bug/1614054/+attachment/4918877/+files/lp1614054-xenial-mitaka.debdiff
2017-07-23 15:49:34 Dominique Poulain bug added subscriber Dominique Poulain
2017-07-24 14:33:41 Edward Hope-Morley summary Incorrect host cpu is given to emulator threads when cpu_realtime_mask flag is set [SRU] Incorrect host cpu is given to emulator threads when cpu_realtime_mask flag is set
2017-07-24 14:33:52 Edward Hope-Morley cloud-archive/mitaka: assignee Edward Hope-Morley (hopem)
2017-07-25 10:58:12 James Page bug added subscriber Ubuntu Stable Release Updates Team
2017-08-01 16:36:41 Edward Hope-Morley description [Impact] See bug description [Test Case] * deploy openstack mitaka and configure nova.conf with vcpu-pin-set=0,1,2,3 https://pastebin.ubuntu.com/25133260/ * configure compute host kernel opts with "isolcpus=0,1,2,3" + reboot * create flavor with: openstack flavor create --public --ram 2048 --disk 10 --vcpus 2 --swap 0 test_flavor openstack flavor set --property hw:cpu_realtime_mask='^0' test_flavor openstack flavor set --property hw:cpu_policy=dedicated test_flavor openstack flavor set --property hw:cpu_thread_policy=prefer test_flavor openstack flavor set --property hw:cpu_realtime=yes test_flavor * boot instance with ^^ flavor * check that libvirt xml for vm has correct emulator pin cpuset # [Regression Potential] None expected. ==== 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 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> [Impact] This bug affects users of Openstack Nova who want to create instances that will leverage the realtime functionality that libvirt/qemu offers by, amongst other things, pinning guest vcpus and qemu emulator threads to specific pcpus. Nova provides the means for the user to control, via the flavor hw:cpu_realtime_mask or image property hw_cpu_realtime_mask, which physical cpus these resources will pinned to. This mask allows you to mask the set of N pins that Nova selects such that 1 or more of your vcpus can be declared "real-time" by ensuring that they do not have emulator threads also pinned to them. The remaining "non-realtime" vcpus will have vcpu and emulator threads colocated. The bug fixes the case where e.g. you have a guest that has 2 vcpus (logically 0 and 1) and Nova selects pcpus 14 and 22 and you have mask ^0 to indicate that you want all but the first vcpu to be realtime. This should result in the following being present in your libvirt xml for the guest: <cputune> <vcpupin vcpu='0' cpuset='14'/> <vcpupin vcpu='1' cpuset='22'/> <emulatorpin cpuset='14'/> <vcpusched vcpus='1' scheduler='fifo' priority='1'/> </cputune> But (current only Mitaka since it does not have this patch) you will get this: <cputune> <vcpupin vcpu='0' cpuset='14'/> <vcpupin vcpu='1' cpuset='22'/> <emulatorpin cpuset='0'/> <vcpusched vcpus='1' scheduler='fifo' priority='1'/> </cputune> i.e. Nova will always set the emulator pin to be id of the vcpu instead of the corresponding pcpu that it is pinned to. [Test Case]  * deploy openstack mitaka and configure nova.conf with vcpu-pin-set=0,1,2,3    https://pastebin.ubuntu.com/25133260/  * configure compute host kernel opts with "isolcpus=0,1,2,3" + reboot  * create flavor with:    openstack flavor create --public --ram 2048 --disk 10 --vcpus 2 --swap 0 test_flavor    openstack flavor set --property hw:cpu_realtime_mask='^0' test_flavor    openstack flavor set --property hw:cpu_policy=dedicated test_flavor    openstack flavor set --property hw:cpu_thread_policy=prefer test_flavor    openstack flavor set --property hw:cpu_realtime=yes test_flavor  * boot instance with ^^ flavor  * check that libvirt xml for vm has correct emulator pin cpuset # [Regression Potential] None expected. ==== 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 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>
2017-08-01 16:39:46 Edward Hope-Morley description [Impact] This bug affects users of Openstack Nova who want to create instances that will leverage the realtime functionality that libvirt/qemu offers by, amongst other things, pinning guest vcpus and qemu emulator threads to specific pcpus. Nova provides the means for the user to control, via the flavor hw:cpu_realtime_mask or image property hw_cpu_realtime_mask, which physical cpus these resources will pinned to. This mask allows you to mask the set of N pins that Nova selects such that 1 or more of your vcpus can be declared "real-time" by ensuring that they do not have emulator threads also pinned to them. The remaining "non-realtime" vcpus will have vcpu and emulator threads colocated. The bug fixes the case where e.g. you have a guest that has 2 vcpus (logically 0 and 1) and Nova selects pcpus 14 and 22 and you have mask ^0 to indicate that you want all but the first vcpu to be realtime. This should result in the following being present in your libvirt xml for the guest: <cputune> <vcpupin vcpu='0' cpuset='14'/> <vcpupin vcpu='1' cpuset='22'/> <emulatorpin cpuset='14'/> <vcpusched vcpus='1' scheduler='fifo' priority='1'/> </cputune> But (current only Mitaka since it does not have this patch) you will get this: <cputune> <vcpupin vcpu='0' cpuset='14'/> <vcpupin vcpu='1' cpuset='22'/> <emulatorpin cpuset='0'/> <vcpusched vcpus='1' scheduler='fifo' priority='1'/> </cputune> i.e. Nova will always set the emulator pin to be id of the vcpu instead of the corresponding pcpu that it is pinned to. [Test Case]  * deploy openstack mitaka and configure nova.conf with vcpu-pin-set=0,1,2,3    https://pastebin.ubuntu.com/25133260/  * configure compute host kernel opts with "isolcpus=0,1,2,3" + reboot  * create flavor with:    openstack flavor create --public --ram 2048 --disk 10 --vcpus 2 --swap 0 test_flavor    openstack flavor set --property hw:cpu_realtime_mask='^0' test_flavor    openstack flavor set --property hw:cpu_policy=dedicated test_flavor    openstack flavor set --property hw:cpu_thread_policy=prefer test_flavor    openstack flavor set --property hw:cpu_realtime=yes test_flavor  * boot instance with ^^ flavor  * check that libvirt xml for vm has correct emulator pin cpuset # [Regression Potential] None expected. ==== 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 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> [Impact] This bug affects users of Openstack Nova who want to create instances that will leverage the realtime functionality that libvirt/qemu offers by, amongst other things, pinning guest vcpus and qemu emulator threads to specific pcpus. Nova provides the means for the user to control, via the flavor hw:cpu_realtime_mask or image property hw_cpu_realtime_mask, which physical cpus these resources will pinned to. This mask allows you to mask the set of N pins that Nova selects such that 1 or more of your vcpus can be declared "real-time" by ensuring that they do not have emulator threads also pinned to them. The remaining "non-realtime" vcpus will have vcpu and emulator threads colocated. The bug fixes the case where e.g. you have a guest that has 2 vcpus (logically 0 and 1) and Nova selects pcpus 14 and 22 and you have mask ^0 to indicate that you want all but the first vcpu to be realtime. This should result in the following being present in your libvirt xml for the guest:   <cputune>     <vcpupin vcpu='0' cpuset='14'/>     <vcpupin vcpu='1' cpuset='22'/>     <emulatorpin cpuset='14'/>     <vcpusched vcpus='1' scheduler='fifo' priority='1'/>   </cputune> But (current only Mitaka since it does not have this patch) you will get this:   <cputune>     <vcpupin vcpu='0' cpuset='14'/>     <vcpupin vcpu='1' cpuset='22'/>     <emulatorpin cpuset='0'/>     <vcpusched vcpus='1' scheduler='fifo' priority='1'/>   </cputune> i.e. Nova will always set the emulator pin to be id of the vcpu instead of the corresponding pcpu that it is pinned to. In terms of actual impact this could result in vcpus that are supposed to be isolated not being so and therefore not behaving as expected. [Test Case]  * deploy openstack mitaka and configure nova.conf with vcpu-pin-set=0,1,2,3    https://pastebin.ubuntu.com/25133260/  * configure compute host kernel opts with "isolcpus=0,1,2,3" + reboot  * create flavor with:    openstack flavor create --public --ram 2048 --disk 10 --vcpus 2 --swap 0 test_flavor    openstack flavor set --property hw:cpu_realtime_mask='^0' test_flavor    openstack flavor set --property hw:cpu_policy=dedicated test_flavor    openstack flavor set --property hw:cpu_thread_policy=prefer test_flavor    openstack flavor set --property hw:cpu_realtime=yes test_flavor  * boot instance with ^^ flavor  * check that libvirt xml for vm has correct emulator pin cpuset # [Regression Potential] None expected. ==== 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 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>
2017-08-02 10:08:44 Łukasz Zemczak nova (Ubuntu Xenial): status Triaged Fix Committed
2017-08-02 10:08:48 Łukasz Zemczak bug added subscriber SRU Verification
2017-08-02 10:08:52 Łukasz Zemczak tags libvirt newton-backport-potential sts sts-sru-needed libvirt newton-backport-potential sts sts-sru-needed verification-needed verification-needed-xenial
2017-08-03 09:28:25 Edward Hope-Morley tags libvirt newton-backport-potential sts sts-sru-needed verification-needed verification-needed-xenial libvirt newton-backport-potential sts sts-sru-needed verification-done verification-done-xenial
2017-08-03 10:08:15 James Page cloud-archive/mitaka: status Triaged Fix Committed
2017-08-03 10:08:17 James Page tags libvirt newton-backport-potential sts sts-sru-needed verification-done verification-done-xenial libvirt newton-backport-potential sts sts-sru-needed verification-done verification-done-xenial verification-mitaka-needed
2017-08-04 10:27:11 Edward Hope-Morley tags libvirt newton-backport-potential sts sts-sru-needed verification-done verification-done-xenial verification-mitaka-needed libvirt newton-backport-potential sts sts-sru-needed verification-done verification-done-xenial verification-mitaka-done
2017-08-11 11:22:41 Edward Hope-Morley description [Impact] This bug affects users of Openstack Nova who want to create instances that will leverage the realtime functionality that libvirt/qemu offers by, amongst other things, pinning guest vcpus and qemu emulator threads to specific pcpus. Nova provides the means for the user to control, via the flavor hw:cpu_realtime_mask or image property hw_cpu_realtime_mask, which physical cpus these resources will pinned to. This mask allows you to mask the set of N pins that Nova selects such that 1 or more of your vcpus can be declared "real-time" by ensuring that they do not have emulator threads also pinned to them. The remaining "non-realtime" vcpus will have vcpu and emulator threads colocated. The bug fixes the case where e.g. you have a guest that has 2 vcpus (logically 0 and 1) and Nova selects pcpus 14 and 22 and you have mask ^0 to indicate that you want all but the first vcpu to be realtime. This should result in the following being present in your libvirt xml for the guest:   <cputune>     <vcpupin vcpu='0' cpuset='14'/>     <vcpupin vcpu='1' cpuset='22'/>     <emulatorpin cpuset='14'/>     <vcpusched vcpus='1' scheduler='fifo' priority='1'/>   </cputune> But (current only Mitaka since it does not have this patch) you will get this:   <cputune>     <vcpupin vcpu='0' cpuset='14'/>     <vcpupin vcpu='1' cpuset='22'/>     <emulatorpin cpuset='0'/>     <vcpusched vcpus='1' scheduler='fifo' priority='1'/>   </cputune> i.e. Nova will always set the emulator pin to be id of the vcpu instead of the corresponding pcpu that it is pinned to. In terms of actual impact this could result in vcpus that are supposed to be isolated not being so and therefore not behaving as expected. [Test Case]  * deploy openstack mitaka and configure nova.conf with vcpu-pin-set=0,1,2,3    https://pastebin.ubuntu.com/25133260/  * configure compute host kernel opts with "isolcpus=0,1,2,3" + reboot  * create flavor with:    openstack flavor create --public --ram 2048 --disk 10 --vcpus 2 --swap 0 test_flavor    openstack flavor set --property hw:cpu_realtime_mask='^0' test_flavor    openstack flavor set --property hw:cpu_policy=dedicated test_flavor    openstack flavor set --property hw:cpu_thread_policy=prefer test_flavor    openstack flavor set --property hw:cpu_realtime=yes test_flavor  * boot instance with ^^ flavor  * check that libvirt xml for vm has correct emulator pin cpuset # [Regression Potential] None expected. ==== 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 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> [Impact] This bug affects users of Openstack Nova who want to create instances that will leverage the realtime functionality that libvirt/qemu offers by, amongst other things, pinning guest vcpus and qemu emulator threads to specific pcpus. Nova provides the means for the user to control, via the flavor hw:cpu_realtime_mask or image property hw_cpu_realtime_mask, which physical cpus these resources will pinned to. This mask allows you to mask the set of N pins that Nova selects such that 1 or more of your vcpus can be declared "real-time" by ensuring that they do not have emulator threads also pinned to them. The remaining "non-realtime" vcpus will have vcpu and emulator threads colocated. The bug fixes the case where e.g. you have a guest that has 2 vcpus (logically 0 and 1) and Nova selects pcpus 14 and 22 and you have mask ^0 to indicate that you want all but the first vcpu to be realtime. This should result in the following being present in your libvirt xml for the guest:   <cputune>     <vcpupin vcpu='0' cpuset='14'/>     <vcpupin vcpu='1' cpuset='22'/>     <emulatorpin cpuset='14'/>     <vcpusched vcpus='1' scheduler='fifo' priority='1'/>   </cputune> But (current only Mitaka since it does not have this patch) you will get this:   <cputune>     <vcpupin vcpu='0' cpuset='14'/>     <vcpupin vcpu='1' cpuset='22'/>     <emulatorpin cpuset='0'/>     <vcpusched vcpus='1' scheduler='fifo' priority='1'/>   </cputune> i.e. Nova will always set the emulator pin to be id of the vcpu instead of the corresponding pcpu that it is pinned to. In terms of actual impact this could result in vcpus that are supposed to be isolated not being so and therefore not behaving as expected. [Test Case]  * deploy openstack mitaka and configure nova.conf with vcpu-pin-set=0,1,2,3    https://pastebin.ubuntu.com/25133260/  * configure compute host kernel opts with "isolcpus=0,1,2,3" + reboot  * create flavor with:    openstack flavor create --public --ram 2048 --disk 10 --vcpus 2 --swap 0 test_flavor    openstack flavor set --property hw:cpu_realtime_mask='^0' test_flavor    openstack flavor set --property hw:cpu_policy=dedicated test_flavor    openstack flavor set --property hw:cpu_thread_policy=prefer test_flavor    openstack flavor set --property hw:cpu_realtime=yes test_flavor  * boot instance with ^^ flavor  * check that libvirt xml for vm has correct emulator pin cpuset # [Regression Potential] Since the patch being backported only touches the specific aread of code that was causing the original problem and that code only serves to select cpusets based on flavor filters, i can't think of any regressions that it would introduce. However, one potential side effect/change to be aware of is that once nova-compute is upgraded to this newer version, any new instances created will have the correct/expected cpuset assignments whereas instances created prior to upgrade will remain unchanged i.e. they will all likely still have their emulation threads pinned to the wrong pcpu. In terms of side effects this will mean less load on the pcpu that was previously incorrectly chosen for existing guests but it will mean that older instances will need to be recreated in order to benefit from the fix. ==== 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 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>
2017-08-16 15:52:29 Launchpad Janitor nova (Ubuntu Xenial): status Fix Committed Fix Released
2017-08-16 15:52:36 Brian Murray removed subscriber Ubuntu Stable Release Updates Team
2017-08-22 19:03:33 Ryan Beisner cloud-archive/mitaka: status Fix Committed Fix Released
2017-08-31 08:21:33 Edward Hope-Morley tags libvirt newton-backport-potential sts sts-sru-needed verification-done verification-done-xenial verification-mitaka-done libvirt newton-backport-potential sts sts-sru-done verification-done verification-done-xenial verification-mitaka-done