vcpu_weight in flavor-create API is not validated

Bug #1245560 reported by Matt Riedemann
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Expired
Undecided
Unassigned

Bug Description

Bug 1243195 has some background for context, and there is some discussion in this review:

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

But essentially it comes down to the fact that the vcpu_weight value for the flavor model isn't validated. The reason it's probably not validated is due to the fact that no one seems to know how the user can set it, because it's not set via the flavor-create API.

The only code using it is in the xenapi virt driver, so I'm wondering if they have something working out of tree at Rackspace that uses it?

If the user can't set it via the code that's in community, maybe it should be removed?

Tags: api xenserver
Revision history for this message
John Garbutt (johngarbutt) wrote :
tags: added: xenserver
Revision history for this message
Matt Riedemann (mriedem) wrote :

John, yeah, it's used by the xenapi virt driver code, just some bad wording on my part. I cleaned up the description.

description: updated
Changed in nova:
status: New → Confirmed
importance: Undecided → Low
lizheming (lizheming-li)
Changed in nova:
assignee: nobody → lizheming (lizheming-li)
lizheming (lizheming-li)
Changed in nova:
assignee: lizheming (lizheming-li) → nobody
Revision history for this message
Christopher Yeoh (cyeoh-0) wrote :

I think this bug comes down to if we want to be able to set the vcpu_weight via the API we need to validate it. No public api currently lets you set vcpu_weight.

Changed in nova:
importance: Low → Wishlist
Revision history for this message
Blair Bethwaite (blair-bethwaite) wrote :

The vcpu_weight field is Xen specific and quite narrow (e.g., it's cpu specific, but there are lots of other shared hardware resources that can be limited). It should probably be cleaned up in favor of an approach that uses extra_specs, such as https://wiki.openstack.org/wiki/InstanceResourceQuota.

Revision history for this message
Markus Zoeller (markus_z) (mzoeller) wrote :

This still looks odd. Change [1] introduced "vcpu_weight" due to bug 861776. There is no reasoning at all *why* this got introduced. With current Newton master () I'm not able to see where a user can set this value, neither as an API parameter (when creating a flavor) nor a config option.

References:
[1] https://github.com/openstack/nova/commit/d6b6cc5

Changed in nova:
importance: Wishlist → Low
Revision history for this message
Markus Zoeller (markus_z) (mzoeller) wrote :

I tend to believe that this is dead code which can be removed. Waiting for XEN folks to confirm this.

Revision history for this message
Matt Riedemann (mriedem) wrote :

Markus, apparently rackspace sets the value in the DB directly.

Revision history for this message
Markus Zoeller (markus_z) (mzoeller) wrote :
Revision history for this message
Markus Zoeller (markus_z) (mzoeller) wrote : Cleanup EOL bug report

This is an automated cleanup. This bug report has been closed because it
is older than 18 months and there is no open code change to fix this.
After this time it is unlikely that the circumstances which lead to
the observed issue can be reproduced.

If you can reproduce the bug, please:
* reopen the bug report (set to status "New")
* AND add the detailed steps to reproduce the issue (if applicable)
* AND leave a comment "CONFIRMED FOR: <RELEASE_NAME>"
  Only still supported release names are valid (LIBERTY, MITAKA, OCATA, NEWTON).
  Valid example: CONFIRMED FOR: LIBERTY

Changed in nova:
importance: Low → Undecided
status: Confirmed → Expired
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.