← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1648983] Re: cells v1: error when reporting child cell capacity: "TypeError: unsupported operand type(s) for *: 'NoneType' and 'int'"

 

Reviewed:  https://review.openstack.org/409501
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=58bf5d005394d2b31bab9e8971e765c35974ca07
Submitter: Jenkins
Branch:    master

commit 58bf5d005394d2b31bab9e8971e765c35974ca07
Author: int32bit <krystism@xxxxxxxxx>
Date:   Sun Dec 11 15:08:45 2016 +0800

    Fix error if free_disk_gb is None in CellStateManager
    
    The field 'free_disk_gb' in Objects.ComputeNode can be nullable.
    In CellStateManager._get_compute_hosts, we compute free_disk_mb
    by 'free_disk_gb * 1024'. If the free_disk_gb is None, it will raise
    a TypeError exception because None type can't multiply by an integer.
    We should check this value, and if it's None, we just let it return
    zero.
    
    Closes-Bug: #1648983
    
    Change-Id: I558d544ff838807c1d605cb5ed8d0e0fa97ab00e


** Changed in: nova
       Status: In Progress => 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/1648983

Title:
  cells v1: error when reporting child cell capacity: "TypeError:
  unsupported operand type(s) for *: 'NoneType' and 'int'"

Status in OpenStack Compute (nova):
  Fix Released

Bug description:
  http://logs.openstack.org/27/408727/3/check/gate-tempest-dsvm-cells-
  ubuntu-xenial/e788689/logs/screen-n-cell-child.txt.gz?level=TRACE

  2016-12-09 21:25:50.743 23726 ERROR nova Traceback (most recent call last):
  2016-12-09 21:25:50.743 23726 ERROR nova   File "/usr/local/bin/nova-cells", line 10, in <module>
  2016-12-09 21:25:50.743 23726 ERROR nova     sys.exit(main())
  2016-12-09 21:25:50.743 23726 ERROR nova   File "/opt/stack/new/nova/nova/cmd/cells.py", line 43, in main
  2016-12-09 21:25:50.743 23726 ERROR nova     manager='nova.cells.manager.CellsManager')
  2016-12-09 21:25:50.743 23726 ERROR nova   File "/opt/stack/new/nova/nova/service.py", line 228, in create
  2016-12-09 21:25:50.743 23726 ERROR nova     periodic_interval_max=periodic_interval_max)
  2016-12-09 21:25:50.743 23726 ERROR nova   File "/opt/stack/new/nova/nova/service.py", line 101, in __init__
  2016-12-09 21:25:50.743 23726 ERROR nova     self.manager = manager_class(host=self.host, *args, **kwargs)
  2016-12-09 21:25:50.743 23726 ERROR nova   File "/opt/stack/new/nova/nova/cells/manager.py", line 82, in __init__
  2016-12-09 21:25:50.743 23726 ERROR nova     self.state_manager = cell_state_manager()
  2016-12-09 21:25:50.743 23726 ERROR nova   File "/opt/stack/new/nova/nova/cells/state.py", line 146, in __new__
  2016-12-09 21:25:50.743 23726 ERROR nova     return CellStateManagerDB(cell_state_cls)
  2016-12-09 21:25:50.743 23726 ERROR nova   File "/opt/stack/new/nova/nova/cells/state.py", line 162, in __init__
  2016-12-09 21:25:50.743 23726 ERROR nova     self._cell_data_sync(force=True)
  2016-12-09 21:25:50.743 23726 ERROR nova   File "/usr/local/lib/python2.7/dist-packages/oslo_concurrency/lockutils.py", line 271, in inner
  2016-12-09 21:25:50.743 23726 ERROR nova     return f(*args, **kwargs)
  2016-12-09 21:25:50.743 23726 ERROR nova   File "/opt/stack/new/nova/nova/cells/state.py", line 453, in _cell_data_sync
  2016-12-09 21:25:50.743 23726 ERROR nova     self._update_our_capacity(ctxt)
  2016-12-09 21:25:50.743 23726 ERROR nova   File "/opt/stack/new/nova/nova/cells/state.py", line 285, in _update_our_capacity
  2016-12-09 21:25:50.743 23726 ERROR nova     _get_compute_hosts()
  2016-12-09 21:25:50.743 23726 ERROR nova   File "/opt/stack/new/nova/nova/cells/state.py", line 279, in _get_compute_hosts
  2016-12-09 21:25:50.743 23726 ERROR nova     free_disk = compute.free_disk_gb * 1024
  2016-12-09 21:25:50.743 23726 ERROR nova TypeError: unsupported operand type(s) for *: 'NoneType' and 'int'
  2016-12-09 21:25:50.743 23726 ERROR nova

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


References