multiple key:value pairs in instance_type_extra_specs does not work

Bug #1245541 reported by David Kang
14
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Invalid
High
Unassigned

Bug Description

 OS: CentOS 6.4
 Installation: using RDO Packstack.

 When one key:value pair is described in instance_type_extra_specs, the scheduler works fine.
However, when multiple key:value pairs are described in instance_type_extra_specs in /etc/nova/nova.conf, only one of them are properly filtered, but the other keys are recognized by None by the scheduler filter.
So, it always fails to find proper nova-compute.
I could use the same instance_type_extra_specs with Grizzly,
but it fails with Havana.

 Here is the flags that I used:

/etc/nova/nova.conf
instance_type_extra_specs=cpu_arch:x86_64, gpu_arch:fermi, gpus:2, hypervisor_type:LXC

flavor:
 nova flavor-list --extra-specs
+----+-----------+-----------+------+-----------+------+-------+-------------+-----------+----------------------------------------------------------------------------------------------------------+
| ID | Name | Memory_MB | Disk | Ephemeral | Swap | VCPUs | RXTX_Factor | Is_Public | extra_specs |
+----+-----------+-----------+------+-----------+------+-------+-------------+-----------+----------------------------------------------------------------------------------------------------------+

| 10 | cg1.small | 2048 | 10 | 0 | | 2 | 1.0 | True | {u'gpus': u'= 1', u'hypervisor_type': u's== LXC', u'gpu_arch': u's== fermi', u'cpu_arch': u's== x86_64'} |

Changed in nova:
importance: Undecided → High
status: New → Triaged
Revision history for this message
David Kang (dkang) wrote :

It looks like that any key in instance_type_extra_specs field is not recognized by the compute_capabilities_filter at all.

For testing, I've added the following code into libvirt.HostState.update_status() function:

        data['pci_passthrough_devices'] = \
            self.driver.get_pci_passthrough_devices()

+ data["test_key"] = 'test_value'

Scheduler cannot find the value of the key from the state of compute node.

 Should the new key:value pair be inserted somewhere else?

tags: added: havana-backport-potential
Revision history for this message
Jay Pipes (jaypipes) wrote :

This is the commit that broke this, unless I am mistaken:

https://github.com/openstack/nova/commit/4b4f0d61836e527340511f6198c2f2c0bdf70888

Revision history for this message
Jay Pipes (jaypipes) wrote :

The reason I think the above commit (at least) is the issue is that after that commit, the HostManager.service_states dict existed but no longer was used by the scheduler, and therefore no capabilities were extended on the HostState objects passed to the filter's host_passes() method.

Revision history for this message
Guangya Liu (Jay Lau) (jay-lau-513) wrote :

Can you please append more for your case? Which filter are you using?

Also curious do we support adding instance_type_extra_specs to nova.conf? Who will use it?

/etc/nova/nova.conf
instance_type_extra_specs=cpu_arch:x86_64, gpu_arch:fermi, gpus:2, hypervisor_type:LXC

Revision history for this message
Guangya Liu (Jay Lau) (jay-lau-513) wrote :

Just notice that seems this parameter was only for bare-metal driver: https://github.com/openstack/nova/blob/master/nova/virt/baremetal/driver.py#L57 and also the parameter has been renamed to flavor_extra_specs

@Jay Pipes, this commit https://github.com/openstack/nova/commit/4b4f0d61836e527340511f6198c2f2c0bdf70888 was merged in 2014-01-28 and this bug was reported in 2013-10-28, so I think this is not related to the patch, right? ;-)

@David, hope I can get more input here for your case. Thanks.

Revision history for this message
David Kang (dkang) wrote :

About the scheduler filter (sorry for my late relpy), I believe I've used ComputeCapabilitiesFilter.

About the usage:

Actually we've used the flag to specify heterogeneous architecture support. In addition to x86 architecture, we wanted to support other architecture using the instance_type_extra_specs flag.
And we put dynamically changing values in the flag.
For example,

instance_type_extra_specs=cpu_arch:x86_64, gpu_arch:fermi, gpus:2, hypervisor_type:LXC

shows that the nova-compute node has two GPUs of NVdia fermi and runs LXC hypervisor.
The 'gpus' key is dynamically changing at run-time as gpus are allocated and deallocated.
Most static keys can be handled by host-aggregate method.
But keys with dynamic values cannot be handled by host-aggregate method.

Even before the merge of "https://github.com/openstack/nova/commit/4b4f0d61836e527340511f6198c2f2c0bdf70888 merged in 2014-01-28", the dynamic update mechanism was broken.

Revision history for this message
Mikyung Kang (mkkang) wrote :

So, ISI tried to fix this bug for Havana and Icehouse releases as follows, reviewers decided to deprecate this capability:

https://review.openstack.org/#/c/62088/

Revision history for this message
Justin Shepherd (jshepher) wrote :

This capability was marked as deprecated in https://review.openstack.org/#/c/62088/

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.