Internal Server Error while creating lease with physical reservation

Bug #1400642 reported by chintha govardhan
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Blazar
Fix Released
Undecided
chintha govardhan

Bug Description

Create a lease using physical reservations without specifying min value

climate lease-create --physical-reservation max=1 LEASE1

After this unable to execte lease-list command .

Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/eventlet/hubs/hub.py", line 455, in fire_timers
    timer()
  File "/usr/local/lib/python2.7/dist-packages/eventlet/hubs/timer.py", line 58, in __call__
    cb(*args, **kw)
  File "/usr/local/lib/python2.7/dist-packages/climate/utils/service.py", line 90, in decorator
    return func(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/climate/manager/service.py", line 409, in start_lease
    lease = self.get_lease(lease_id)
  File "/usr/local/lib/python2.7/dist-packages/climate/manager/service.py", line 165, in get_lease
    return db_api.lease_get(lease_id)
  File "/usr/local/lib/python2.7/dist-packages/climate/db/api.py", line 103, in decorator
    return res.to_dict()
  File "/usr/local/lib/python2.7/dist-packages/climate/db/sqlalchemy/models.py", line 74, in to_dict
    d['reservations'] = [r.to_dict() for r in self.reservations]
  File "/usr/local/lib/python2.7/dist-packages/climate/db/sqlalchemy/models.py", line 120, in to_dict
    raise RuntimeError(e)
RuntimeError: Invalid count range: -1
2014-12-09 01:42:37.820 5155 INFO climate.openstack.common.db.sqlalchemy.session [-] MySQL server mode set to STRICT_TRANS_TABLES,STRICT_ALL_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,TRADITIONAL,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION
2014-12-09 01:42:37.823 5155 ERROR climate.manager.service [-] Error occurred while event handling.
2014-12-09 01:42:37.823 5155 TRACE climate.manager.service Traceback (most recent call last):
2014-12-09 01:42:37.823 5155 TRACE climate.manager.service File "/usr/local/lib/python2.7/dist-packages/climate/manager/service.py", line 146, in _event
2014-12-09 01:42:37.823 5155 TRACE climate.manager.service lease = db_api.lease_get(event['lease_id'])
2014-12-09 01:42:37.823 5155 TRACE climate.manager.service File "/usr/local/lib/python2.7/dist-packages/climate/db/api.py", line 103, in decorator
2014-12-09 01:42:37.823 5155 TRACE climate.manager.service return res.to_dict()
2014-12-09 01:42:37.823 5155 TRACE climate.manager.service File "/usr/local/lib/python2.7/dist-packages/climate/db/sqlalchemy/models.py", line 74, in to_dict
2014-12-09 01:42:37.823 5155 TRACE climate.manager.service d['reservations'] = [r.to_dict() for r in self.reservations]
2014-12-09 01:42:37.823 5155 TRACE climate.manager.service File "/usr/local/lib/python2.7/dist-packages/climate/db/sqlalchemy/models.py", line 120, in to_dict
2014-12-09 01:42:37.823 5155 TRACE climate.manager.service raise RuntimeError(e)
2014-12-09 01:42:37.823 5155 TRACE climate.manager.service RuntimeError: Invalid count range: -1
2014-12-09 01:42:37.823 5155 TRACE climate.manager.service

Changed in blazar:
assignee: nobody → chintha govardhan (chintha-govardhan)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to blazar (master)

Fix proposed to branch: master
Review: https://review.openstack.org/140298

Changed in blazar:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on blazar (master)

Change abandoned by chintha govardhan (<email address hidden>) on branch: master
Review: https://review.openstack.org/140298
Reason: violated pep8 standards

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to blazar (master)

Fix proposed to branch: master
Review: https://review.openstack.org/140306

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to blazar (master)

Reviewed: https://review.openstack.org/140306
Committed: https://git.openstack.org/cgit/openstack/blazar/commit/?id=f6a7edb51451a3d279152210182ecb75ab56e07a
Submitter: Jenkins
Branch: master

commit f6a7edb51451a3d279152210182ecb75ab56e07a
Author: Govardhan Chintha <email address hidden>
Date: Tue Dec 9 03:44:54 2014 -0800

    Validation for the number of hosts

    This patch adds a validation for the number of hosts specified in the
    physical host reservation.

    Change-Id: Ib45f8343f5cb386013c482f38f12215c79f677f8
    Closes-Bug: #1400642

Changed in blazar:
status: In Progress → Fix Released
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.