← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1224461] Re: Cell type is overwritten when update a cell without cell-type specified

 

** Changed in: nova
       Status: Fix Committed => Fix Released

-- 
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/1224461

Title:
  Cell type is overwritten when update a cell without cell-type
  specified

Status in OpenStack Compute (Nova):
  Fix Released

Bug description:
  I create a 'parent' cell through API, and update its 'name' only.

  And I found, the type of my cell is changed to 'child'.

  -----------

  I check the code, if you not specified the 'cell-type' in UPDATE request,
    the value will be overwritten by the default value, 'child'.

  That's not correct, you need to reserve the existing cell-type.

  -----------

  Here's the code segment in cells.py. The 'cell' is transformed from
  request:

  def _normalize_cell(self, cell, existing=None):

          # Start with the cell type conversion
          if 'type' in cell:
              self._validate_cell_type(cell['type'])
              cell['is_parent'] = cell['type'] == 'parent'
              del cell['type']
          else:
              cell['is_parent'] = False
          ...

  The issue is also involved in the new V3-api.

  
  Thanks~

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