correct CPU topology

Change-Id: Ica5306483991a893a4bfd4f1aba8ad00cd51d045
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
This commit is contained in:
Kevin Carter 2017-07-28 17:02:34 -05:00
parent c3800224b0
commit 3788abcf8b
No known key found for this signature in database
GPG Key ID: 69FEFFC5E2D9273F
2 changed files with 9 additions and 8 deletions

View File

@ -2,7 +2,9 @@
<name>{{ item.server_hostname }}</name>
<memory unit='MiB'>{{ item.server_vm_ram }}</memory>
<currentMemory unit='MiB'>{{ item.server_vm_ram }}</currentMemory>
<vcpu placement='static' current='1'>{{ item.server_vm_vcpus }}</vcpu>
{% set vcpus_threads = ((item.server_vm_vcpus | int) // 2) %}
{% set vcpus = (item.server_vm_vcpus | int) * vcpus_threads %}
<vcpu placement='static' current='{{ vcpus }}'>{{ vcpus }}</vcpu>
<resource>
<partition>/machine</partition>
</resource>
@ -15,8 +17,7 @@
<apic/>
</features>
<cpu mode='host-model'>
<model fallback='allow'/>
<topology sockets='1' cores='{{ item.server_vm_vcpus }}' threads='1'/>
<topology sockets='1' cores='{{ item.server_vm_vcpus }}' threads='{{ vcpus_threads }}'/>
</cpu>
<clock offset='utc'>
<timer name='rtc' tickpolicy='catchup'/>

View File

@ -374,7 +374,7 @@ servers:
vm_int_iface: vm-br-eth5
- server_hostname: 'cinder1'
server_vm_ram: 2048
server_vm_vcpus: 1
server_vm_vcpus: 2
server_vm_fixed_addr: '10.0.2.130'
server_vm_primary_network: 'dhcp'
server_image: "{{ default_vm_image }}"
@ -413,7 +413,7 @@ servers:
vm_int_iface: vm-br-eth5
- server_hostname: 'cinder2'
server_vm_ram: 2048
server_vm_vcpus: 1
server_vm_vcpus: 2
server_vm_fixed_addr: '10.0.2.131'
server_vm_primary_network: 'dhcp'
server_image: "{{ default_vm_image }}"
@ -452,7 +452,7 @@ servers:
vm_int_iface: vm-br-eth5
- server_hostname: 'swift1'
server_vm_ram: 2048
server_vm_vcpus: 1
server_vm_vcpus: 2
server_vm_fixed_addr: '10.0.2.140'
server_vm_primary_network: 'dhcp'
server_image: "{{ default_vm_image }}"
@ -491,7 +491,7 @@ servers:
vm_int_iface: vm-br-eth5
- server_hostname: 'swift2'
server_vm_ram: 2048
server_vm_vcpus: 1
server_vm_vcpus: 2
server_vm_fixed_addr: '10.0.2.140'
server_vm_primary_network: 'dhcp'
server_image: "{{ default_vm_image }}"
@ -530,7 +530,7 @@ servers:
vm_int_iface: vm-br-eth5
- server_hostname: 'swift3'
server_vm_ram: 2048
server_vm_vcpus: 1
server_vm_vcpus: 2
server_vm_fixed_addr: '10.0.2.141'
server_vm_primary_network: 'dhcp'
server_image: "{{ default_vm_image }}"