Create Flavor dialog should not have a Flavor ID field

Bug #952657 reported by Devin Carlen
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Invalid
Undecided
Unassigned
OpenStack Dashboard (Horizon)
Fix Released
Medium
Gabriel Hurley

Bug Description

Currently the Create Flavor dialog in the SysPanel has an editable Flavor ID field. It should not be displayed.

=====UPDATE (gabriel)=====

As per conversation with Vish on IRC: The reason the flavor ID field is exposed is because it's really a misnomer. The "id" field there is not the internal auto-incremented ID for the flavor, but in fact a user-facing reference ID. It is editable so that an admin can "delete" (set delete=1 in the DB) a flavor and replace it with a new flavor of the same id, thereby allowing the admin to effectively "replace" a flavor without disassociating the flavor from existing instances.

As such, the best UX Horizon can offer is to cheat, and make the behavior described above an "edit" interface which does a delete-and-create-with-same-id behind the scenes. The create form can then simply auto-generate an ID and hide the field.

Revision history for this message
Tres Henry (tres) wrote :

Flavor ID is a required field which used to initialize to a blank value, however, to improve the UX we are now providing an ID on the client-side by taking the highest flavor ID and adding 1. Not sure why flavor ID isn't handled by nova, however, that's another conversation. Are you sure we want to remove the field given given that this is something we are calculating? The use case would be: a user creates a flavor with ID 100 via the CLI even though there are only 5 other flavors with IDs 1-5. If a user tries to create a new flavor via the UI the flavor will have an ID of 101 (instead of 6) and the user will have no way of changing that (if the field is hidden).

Thoughts?

Revision history for this message
Devin Carlen (devcamcar) wrote :

In that case, I'd consider this a bug in nova first and horizon second. I have marked this bug as affecting nova as well. I don't have any idea why Flavor IDs would be handled differently than everything else in nova?

devendra (devedevendra)
Changed in nova:
status: New → Confirmed
assignee: nobody → devendra (devedevendra)
devendra (devedevendra)
Changed in nova:
assignee: devendra (devedevendra) → nobody
Revision history for this message
Tres Henry (tres) wrote :

This doesn't seem like an RC blocker.

Revision history for this message
Gabriel Hurley (gabriel-hurley) wrote :

Definitely not a blocker. If we want to do anything with it for the RC, we can make the field either non-editable or hidden.

Revision history for this message
Tres Henry (tres) wrote :

For previous stated reasons I would prefer not to hide this field until the underlying assignment is fixed. Let's punt.

Changed in horizon:
milestone: essex-rc1 → none
description: updated
Revision history for this message
Devin Carlen (devcamcar) wrote :

ID should not be editable. Allowing them to edit this behavior and modify the primary key directly is ugly at best and a security vulnerability at worst.

What happens if you change it to the PK of an existing flavor?

It seems quite impractical to have to even consider these questions. I suggest we hide the field entirely from the new flavor screen.

Normally I wouldn't consider something like this a release blocker, but this behavior is quite inelegant and is too clumsy to call a final version.

Revision history for this message
Devin Carlen (devcamcar) wrote :

^^^
TL;DR: Hide the flavor ID field from new flavor creation in essex. When nova solves this issue, we'll fix it properly for folsom.

Changed in horizon:
milestone: none → essex-rc1
milestone: essex-rc1 → none
Revision history for this message
Devin Carlen (devcamcar) wrote :

Just found Gabriel's edited notes in the case. Given it's the case that Flavor ID does not represent the actual row id from nova, I'm happy to leave this implementation as is for essex.

Revision history for this message
Gabriel Hurley (gabriel-hurley) wrote :

This is related to blueprint https://blueprints.launchpad.net/horizon/+spec/edit-flavor-ui for Horizon and probably can be untargeted from Nova.

Changed in horizon:
assignee: Nebula (nebula) → Gabriel Hurley (gabriel-hurley)
milestone: none → folsom-1
Revision history for this message
Gabriel Hurley (gabriel-hurley) wrote :

Moving to folsom-2 to match blueprint

Changed in horizon:
milestone: folsom-1 → folsom-2
Revision history for this message
Thierry Carrez (ttx) wrote :

My understanding is that nothing needs to be done on Nova's side anymore... Please set back to New or confirmed if you disagree.

Changed in nova:
status: Confirmed → Invalid
Revision history for this message
Gabriel Hurley (gabriel-hurley) wrote :

Bumping to F3 to match the associated blueprint.

Changed in horizon:
milestone: folsom-2 → folsom-3
Revision history for this message
Gabriel Hurley (gabriel-hurley) wrote :
Changed in horizon:
status: Confirmed → In Progress
Changed in horizon:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in horizon:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in horizon:
milestone: folsom-3 → 2012.2
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.