Remove the column 'can_host' from the ResourceProvider table

Bug #1648197 reported by Ed Leafe on 2016-12-07
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Ed Leafe

Bug Description

There is a column in the ResourceProvider table named 'can_host'. It is used to distinguish compute nodes (can_host=1) from shared storage providers (can_host=0) for queries that need to distinguish those different types of providers. However, the name is very Nova-specific, and when the Placement engine is extended to support a variety of resource allocation requirements, it will probably cause confusion. After a discussion on IRC, we decided to change the name to "shared", and reverse any logic using can_host, since can_host=1 will now be shared=0, and vice-versa.

Matt Riedemann (mriedem) on 2016-12-07
tags: added: db
Changed in nova:
status: New → Triaged
Chris Dent (cdent) wrote :

I remain somewhat unconvinced that can_host or shared are necessary when we have resource classes. Doesn't VCPU mean 'can_host'?

Or I suppose the problem there is that in the world of NUMA VCPU is not always going to be a requested resource class for something destined for a compute-node? If that's the case that seems like a potential semantic problem that ought to resolved, rather than making a special case flag for compute-node/not-compute-node.

Ed Leafe (ed-leafe) wrote :

Jay explained it more as an aid in constructing the SQL for distinguishing shared disk providers vs. compute node disk providers. So in that sense, joining to the VCPU class would work, but would make the hairy SQL even hairier.

Matt Riedemann (mriedem) wrote :

From what I can tell, we don't even set can_host to anything to signal a compute node today.

Jay Pipes (jaypipes) wrote :

We're not going to use the can_host field. Instead, the new MISC_SHARES_VIA_AGGREGATE trait is being used to identify providers that share resources. So, I think this bug should be changed to "Remove the can_host column from the resource_providers table"

Ed Leafe (ed-leafe) wrote :

Changed. I'll start working on this

summary: - ResourceProvider column 'can_host' is too Nova-specific
+ Remove the column 'can_host' from the ResourceProvider table

Fix proposed to branch: master

Changed in nova:
status: Triaged → In Progress

Submitter: Jenkins
Branch: master

commit fcfe28192eaa63d2ca000d38bc435a5e662ad8f5
Author: EdLeafe <email address hidden>
Date: Mon May 1 15:32:06 2017 +0000

    Remove the can_host column

    Originally it was felt that we would need this column to distinguish
    between compute nodes and non-compute providers. With the advent of
    traits, though, this column is no longer used or needed.

    Closes-Bug: #1648197

    Change-Id: I614db98727f4737deb6728ee874ab0f68024ebe5

Changed in nova:
status: In Progress → Fix Released

This issue was fixed in the openstack/nova development milestone.

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

Other bug subscribers