TTL property is incorrect in Designate::Record

Bug #1524313 reported by Peter Razumovsky
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Heat
Fix Released
High
Peter Razumovsky

Bug Description

If I try to create record with ttl = 0, i get next error:

2015-12-09 15:09:48.511 TRACE heat.engine.resource Traceback (most recent call last):
2015-12-09 15:09:48.511 TRACE heat.engine.resource File "/opt/stack/heat/heat/engine/resource.py", line 636, in _action_recorder
2015-12-09 15:09:48.511 TRACE heat.engine.resource yield
2015-12-09 15:09:48.511 TRACE heat.engine.resource File "/opt/stack/heat/heat/engine/resource.py", line 706, in _do_action
2015-12-09 15:09:48.511 TRACE heat.engine.resource yield self.action_handler_task(action, args=handler_args)
2015-12-09 15:09:48.511 TRACE heat.engine.resource File "/opt/stack/heat/heat/engine/scheduler.py", line 295, in wrapper
2015-12-09 15:09:48.511 TRACE heat.engine.resource step = next(subtask)
2015-12-09 15:09:48.511 TRACE heat.engine.resource File "/opt/stack/heat/heat/engine/resource.py", line 677, in action_handler_task
2015-12-09 15:09:48.511 TRACE heat.engine.resource handler_data = handler(*args)
2015-12-09 15:09:48.511 TRACE heat.engine.resource File "/opt/stack/heat/heat/engine/resources/openstack/designate/record.py", line 116, in handle_create
2015-12-09 15:09:48.511 TRACE heat.engine.resource domain = self.client_plugin().record_create(**args)
2015-12-09 15:09:48.511 TRACE heat.engine.resource File "/opt/stack/heat/heat/engine/clients/os/designate.py", line 70, in record_create
2015-12-09 15:09:48.511 TRACE heat.engine.resource record = records.Record(**kwargs)
2015-12-09 15:09:48.511 TRACE heat.engine.resource File "/usr/local/lib/python2.7/dist-packages/designateclient/warlock.py", line 61, in __init__
2015-12-09 15:09:48.511 TRACE heat.engine.resource raise ValueError('Validation Error: %s' % str(e))
2015-12-09 15:09:48.511 TRACE heat.engine.resource ValueError: Validation Error: 0 is less than the minimum of 1
2015-12-09 15:09:48.511 TRACE heat.engine.resource
2015-12-09 15:09:48.511 TRACE heat.engine.resource Failed validating u'minimum' in schema[u'properties'][u'ttl']:
2015-12-09 15:09:48.511 TRACE heat.engine.resource {u'description': u'Time to live',
2015-12-09 15:09:48.511 TRACE heat.engine.resource u'maximum': 2147483647,
2015-12-09 15:09:48.511 TRACE heat.engine.resource u'minimum': 1,
2015-12-09 15:09:48.511 TRACE heat.engine.resource u'type': [u'integer', u'null']}
2015-12-09 15:09:48.511 TRACE heat.engine.resource
2015-12-09 15:09:48.511 TRACE heat.engine.resource On instance[u'ttl']:
2015-12-09 15:09:48.511 TRACE heat.engine.resource 0
2015-12-09 15:09:48.511 TRACE heat.engine.resource

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

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

Changed in heat:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to heat (master)

Reviewed: https://review.openstack.org/255229
Committed: https://git.openstack.org/cgit/openstack/heat/commit/?id=c87eddf868900e8a1ba0c4e7f5f3b09d6ef9eb64
Submitter: Jenkins
Branch: master

commit c87eddf868900e8a1ba0c4e7f5f3b09d6ef9eb64
Author: Peter Razumovsky <email address hidden>
Date: Wed Dec 9 15:20:56 2015 +0300

    Fix min value in ttl range of Designate::Record

    Current ttl range constraint is incorrect: designate
    record requires 1 as minimal value for ttl. So, need to
    fix this place.

    Change-Id: Ib0423bc2b0412f4e10a3da2f73057c82a9ae14b7
    Closes-bug: #1524313

Changed in heat:
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.