← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1362471] [NEW] Can not delete flavor extraspec both for v2/v3 api

 

Public bug reported:

Reproduce as below:

$ nova flavor-show 1
+----------------------------+----------------------+
| Property                   | Value                |
+----------------------------+----------------------+
| OS-FLV-DISABLED:disabled   | False                |
| OS-FLV-EXT-DATA:ephemeral  | 0                    |
| disk                       | 1                    |
| extra_specs                | {"a": "5", "b": "1"} |
| id                         | 1                    |
| name                       | m1.tiny              |
| os-flavor-access:is_public | True                 |
| ram                        | 512                  |
| rxtx_factor                | 1.0                  |
| swap                       |                      |
| vcpus                      | 1                    |
+----------------------------+----------------------+


$ nova flavor-key 1 unset a

$ nova flavor-show 1
+----------------------------+----------------------+
| Property                   | Value                |
+----------------------------+----------------------+
| OS-FLV-DISABLED:disabled   | False                |
| OS-FLV-EXT-DATA:ephemeral  | 0                    |
| disk                       | 1                    |
| extra_specs                | {"a": "5", "b": "1"} |
| id                         | 1                    |
| name                       | m1.tiny              |
| os-flavor-access:is_public | True                 |
| ram                        | 512                  |
| rxtx_factor                | 1.0                  |
| swap                       |                      |
| vcpus                      | 1                    |
+----------------------------+----------------------+


This is due to flavor extraspec deleted as below:

            flavor = objects.Flavor.get_by_flavor_id(context, flavor_id)
            del flavor.extra_specs[id]
            flavor.save()


'del flavor.extra_specs[id]' can't trigger the property setter, then flavor object won't know the extraspecs is changed.

** Affects: nova
     Importance: Undecided
     Assignee: Alex Xu (xuhj)
         Status: In Progress

** Changed in: nova
     Assignee: (unassigned) => Alex Xu (xuhj)

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Compute (nova).
https://bugs.launchpad.net/bugs/1362471

Title:
  Can not delete flavor extraspec both for v2/v3 api

Status in OpenStack Compute (Nova):
  In Progress

Bug description:
  Reproduce as below:

  $ nova flavor-show 1
  +----------------------------+----------------------+
  | Property                   | Value                |
  +----------------------------+----------------------+
  | OS-FLV-DISABLED:disabled   | False                |
  | OS-FLV-EXT-DATA:ephemeral  | 0                    |
  | disk                       | 1                    |
  | extra_specs                | {"a": "5", "b": "1"} |
  | id                         | 1                    |
  | name                       | m1.tiny              |
  | os-flavor-access:is_public | True                 |
  | ram                        | 512                  |
  | rxtx_factor                | 1.0                  |
  | swap                       |                      |
  | vcpus                      | 1                    |
  +----------------------------+----------------------+

  
  $ nova flavor-key 1 unset a

  $ nova flavor-show 1
  +----------------------------+----------------------+
  | Property                   | Value                |
  +----------------------------+----------------------+
  | OS-FLV-DISABLED:disabled   | False                |
  | OS-FLV-EXT-DATA:ephemeral  | 0                    |
  | disk                       | 1                    |
  | extra_specs                | {"a": "5", "b": "1"} |
  | id                         | 1                    |
  | name                       | m1.tiny              |
  | os-flavor-access:is_public | True                 |
  | ram                        | 512                  |
  | rxtx_factor                | 1.0                  |
  | swap                       |                      |
  | vcpus                      | 1                    |
  +----------------------------+----------------------+


  This is due to flavor extraspec deleted as below:

              flavor = objects.Flavor.get_by_flavor_id(context, flavor_id)
              del flavor.extra_specs[id]
              flavor.save()

  
  'del flavor.extra_specs[id]' can't trigger the property setter, then flavor object won't know the extraspecs is changed.

To manage notifications about this bug go to:
https://bugs.launchpad.net/nova/+bug/1362471/+subscriptions


Follow ups

References