Report an error when booting an instance with a flavor which has NUMA nodes is set to 0 (hw:numa_nodes=0)

Bug #1402709 reported by Kashyap Chamarthy on 2014-12-15
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Gábor Antal

Bug Description

Booting a Nova instance successfully with hw:numa_nodes=0, with a Nova guest XML like that[*]. This bug came out of this RDO bug --

But, talking with Daniel Berrnage and Nikola Dipanov on IRC, they suggest we should default to 1 node if nothing is specified:

  . . .
  <danpb> hmm, i'm not convinced we should allow nodes=0 at all
  <danpb> we should default 1 node if nothing is specified
  <danpb> We should refuse a vlaue of 0, in case we wish to make use
   of that as a special value at a later date
  <danpb> we don't want people relying on numa_nodes=0 accidentally
   working for them now
  <nikola> danpb, correct
  . . .

Simple test

NUMA setup instructions here:

$ nova flavor-key m1.tiny set hw:numa_nodes=0
$ nova flavor-show m1.tiny
| Property | Value |
| OS-FLV-DISABLED:disabled | False |
| OS-FLV-EXT-DATA:ephemeral | 0 |
| disk | 1 |
| extra_specs | {"hw:numa_nodes": "0"} |
| id | 1 |
| name | m1.tiny |
| os-flavor-access:is_public | True |
| ram | 512 |
| rxtx_factor | 1.0 |
| swap | |
| vcpus | 1 |
$ nova boot --image cirros-0.3.1-x86_64-disk --flavor m1.tiny cirrvm4

[*] Nova guest XML with an instance booted with hw:numa_nodes=0
<domain type='kvm' id='3'>
    <nova:instance xmlns:nova="">
      <nova:package version="2015.1"/>
      <nova:creationTime>2014-12-15 14:41:43</nova:creationTime>
      <nova:flavor name="m1.tiny">
        <nova:user uuid="0d5623bdae83445ba3a6209ea849fffe">admin</nova:user>
        <nova:project uuid="f9ecf22769cf4ab98543f5ade1454664">admin</nova:project>
      <nova:root type="image" uuid="5bc9a92b-6cda-4916-9bb0-dd9751880cde"/>
  <memory unit='KiB'>524288</memory>
  <currentMemory unit='KiB'>524288</currentMemory>
  <vcpu placement='static'>1</vcpu>
    <vcpupin vcpu='0' cpuset='0-3'/>
    <emulatorpin cpuset='0-3'/>
    <memory mode='strict' nodeset='0'/>
    <memnode cellid='0' mode='strict' nodeset='0'/>
  <sysinfo type='smbios'>
      <entry name='manufacturer'>OpenStack Foundation</entry>
      <entry name='product'>OpenStack Nova</entry>
      <entry name='version'>2015.1</entry>
      <entry name='serial'>bf6b5391-2390-df4f-b3dc-aa80d05468bb</entry>
      <entry name='uuid'>593f8388-ac9c-4673-b1c7-aa49b1ce83f0</entry>
    <type arch='x86_64' machine='pc-i440fx-2.2'>hvm</type>
    <boot dev='hd'/>
    <smbios mode='sysinfo'/>
    <topology sockets='1' cores='1' threads='1'/>
      <cell id='0' cpus='0' memory='524288' unit='KiB'/>
  <clock offset='utc'>
    <timer name='pit' tickpolicy='delay'/>
    <timer name='rtc' tickpolicy='catchup'/>
    <timer name='hpet' present='no'/>
    <disk type='file' device='disk'>
      <driver name='qemu' type='qcow2' cache='none'/>
      <source file='/home/kashyapc/src/cloud/data/nova/instances/593f8388-ac9c-4673-b1c7-aa49b1ce83f0/disk'/>
      <backingStore type='file' index='1'>
        <format type='raw'/>
        <source file='/home/kashyapc/src/cloud/data/nova/instances/_base/03a663c2a1c649fe0854f01c82c0ddb3871cf691'/>
      <target dev='vda' bus='virtio'/>
      <alias name='virtio-disk0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
    <disk type='file' device='cdrom'>
      <driver name='qemu' type='raw' cache='none'/>
      <source file='/home/kashyapc/src/cloud/data/nova/instances/593f8388-ac9c-4673-b1c7-aa49b1ce83f0/disk.config'/>
      <target dev='hdd' bus='ide'/>
      <alias name='ide0-1-1'/>
      <address type='drive' controller='0' bus='1' target='0' unit='1'/>
    <controller type='usb' index='0'>
      <alias name='usb0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/>
    <controller type='pci' index='0' model='pci-root'>
      <alias name='pci.0'/>
    <controller type='ide' index='0'>
      <alias name='ide0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x1'/>
    <interface type='bridge'>
      <mac address='fa:16:3e:79:6c:b8'/>
      <source bridge='qbr7584d9fb-e1'/>
      <target dev='tap7584d9fb-e1'/>
      <model type='virtio'/>
      <alias name='net0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
    <serial type='file'>
      <source path='/home/kashyapc/src/cloud/data/nova/instances/593f8388-ac9c-4673-b1c7-aa49b1ce83f0/console.log'/>
      <target port='0'/>
      <alias name='serial0'/>
    <serial type='pty'>
      <source path='/dev/pts/19'/>
      <target port='1'/>
      <alias name='serial1'/>
    <console type='file'>
      <source path='/home/kashyapc/src/cloud/data/nova/instances/593f8388-ac9c-4673-b1c7-aa49b1ce83f0/console.log'/>
      <target type='serial' port='0'/>
      <alias name='serial0'/>
    <memballoon model='virtio'>
      <alias name='balloon0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/>
      <stats period='10'/>
  <seclabel type='dynamic' model='selinux' relabel='yes'>

Changed in nova:
assignee: nobody → Avinash (avinash-jalumuru)
Changed in nova:
assignee: Avinash (avinash-jalumuru) → Satish Inakoti (inakoti-satish)
Changed in nova:
assignee: Satish Inakoti (inakoti-satish) → nobody
assignee: nobody → Santhosh Peddiboyina (peddiboyina-9)
Sean Dague (sdague) wrote :

Please do not assign a bug to yourself unless you have a patch up in gerrit.

Changed in nova:
assignee: Santhosh Peddiboyina (peddiboyina-9) → nobody
Joe Gordon (jogo) wrote :

Looks like we currently don't refuse numa_nodes value of 0

tags: added: libvirt low-hanging-fruit
Changed in nova:
status: New → Confirmed
importance: Undecided → Low

Fix proposed to branch: master

Changed in nova:
assignee: nobody → Karim Boumedhel (karmab)
status: Confirmed → In Progress
sahid (sahid-ferdjaoui) wrote :

We also want to verify for no-numeric value.

Changed in nova:
assignee: Karim Boumedhel (karmab) → Sharath S (sharathyadav95)

Change abandoned by Michael Still (<email address hidden>) on branch: master
Reason: This patch has been idle for a long time, so I am abandoning it to keep the review clean sane. If you're interested in still working on this patch, then please unabandon it and upload a new patchset.


There are no open reviews for this bug report since more than 2 weeks.
To signal that to other contributors which might provide patches for
this bug, I switch the status from "In Progress" to "Confirmed" and
remove the assignee.
Feel free to add yourself as assignee and to push a review for it.

Changed in nova:
status: In Progress → Confirmed
assignee: Sharath S (sharathyadav95) → nobody
Changed in nova:
assignee: nobody → nagachetan (nagachetan-km)
assignee: nagachetan (nagachetan-km) → nobody
Changed in nova:
assignee: nobody → Gábor Antal (gabor.antal)

Fix proposed to branch: master

Changed in nova:
status: Confirmed → In Progress

Submitter: Jenkins
Branch: master

commit 47d8aa5e7fe0c82ed00017aa2185de1ed5e51a86
Author: Gábor Antal <email address hidden>
Date: Tue Jul 5 00:13:25 2016 +0200

    Throw exception if numa_nodes is not set to integer greater than 0

    As [1] is abandoned, I used that patchset to create a new one.
    This patchset is freshened to the current master branch.

    This patch introduces InvalidNUMANodesNumber exception, which is
    thrown when trying to boot an instance with a flavor that has
    hw:numa_nodes=0 extra spec set. That means that NUMA nodes is set to 0,
    which is incorrect.


    Change-Id: I6bd8f69e582c537a5fec40064638a8887a08cac4
    Co-Authored-By: Karim Boumedhel <email address hidden>
    Closes-Bug: #1402709

Changed in nova:
status: In Progress → Fix Released

This issue was fixed in the openstack/nova release candidate.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers