Domain cannot be created without TTL

Bug #1523538 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

Domain cannot be created, when ttl property is omitted. For example, if we have next template:

heat_template_version: 2015-10-15

resources:
  domain:
    type: OS::Designate::Domain
    properties:
      name: test
      email: <email address hidden>

we get next error:
Stack CREATE FAILED (d): Resource CREATE failed: ValueError: resources.domain: Validation Error: None is not of type u'integer'

Failed validating u'type' in schema[u'properties'][u'ttl']:
    {u'description': u'Time to live',
     u'maximum': 2147483647,
     u'minimum': 1,
     u'type': u'integer'}

On instance[u'ttl']:
    None

Traceback:

2015-12-07 17:43:29.660 TRACE heat.engine.resource Traceback (most recent call last):
2015-12-07 17:43:29.660 TRACE heat.engine.resource File "/opt/stack/heat/heat/engine/resource.py", line 636, in _action_recorder
2015-12-07 17:43:29.660 TRACE heat.engine.resource yield
2015-12-07 17:43:29.660 TRACE heat.engine.resource File "/opt/stack/heat/heat/engine/resource.py", line 706, in _do_action
2015-12-07 17:43:29.660 TRACE heat.engine.resource yield self.action_handler_task(action, args=handler_args)
2015-12-07 17:43:29.660 TRACE heat.engine.resource File "/opt/stack/heat/heat/engine/scheduler.py", line 295, in wrapper
2015-12-07 17:43:29.660 TRACE heat.engine.resource step = next(subtask)
2015-12-07 17:43:29.660 TRACE heat.engine.resource File "/opt/stack/heat/heat/engine/resource.py", line 677, in action_handler_task
2015-12-07 17:43:29.660 TRACE heat.engine.resource handler_data = handler(*args)
2015-12-07 17:43:29.660 TRACE heat.engine.resource File "/opt/stack/heat/heat/engine/resources/openstack/designate/domain.py", line 92, in handle_create
2015-12-07 17:43:29.660 TRACE heat.engine.resource domain = self.client_plugin().domain_create(**args)
2015-12-07 17:43:29.660 TRACE heat.engine.resource File "/opt/stack/heat/heat/engine/clients/os/designate.py", line 57, in domain_create
2015-12-07 17:43:29.660 TRACE heat.engine.resource domain = domains.Domain(**kwargs)
2015-12-07 17:43:29.660 TRACE heat.engine.resource File "/usr/local/lib/python2.7/dist-packages/designateclient/warlock.py", line 61, in __init__
2015-12-07 17:43:29.660 TRACE heat.engine.resource raise ValueError('Validation Error: %s' % str(e))
2015-12-07 17:43:29.660 TRACE heat.engine.resource ValueError: Validation Error: None is not of type u'integer'
2015-12-07 17:43:29.660 TRACE heat.engine.resource
2015-12-07 17:43:29.660 TRACE heat.engine.resource Failed validating u'type' in schema[u'properties'][u'ttl']:
2015-12-07 17:43:29.660 TRACE heat.engine.resource {u'description': u'Time to live',
2015-12-07 17:43:29.660 TRACE heat.engine.resource u'maximum': 2147483647,
2015-12-07 17:43:29.660 TRACE heat.engine.resource u'minimum': 1,
2015-12-07 17:43:29.660 TRACE heat.engine.resource u'type': u'integer'}
2015-12-07 17:43:29.660 TRACE heat.engine.resource
2015-12-07 17:43:29.660 TRACE heat.engine.resource On instance[u'ttl']:
2015-12-07 17:43:29.660 TRACE heat.engine.resource None
2015-12-07 17:43:29.660 TRACE heat.engine.resource

Changed in heat:
assignee: nobody → Peter Razumovsky (prazumovsky)
importance: Undecided → High
milestone: none → mitaka-2
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/254256

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/254256
Committed: https://git.openstack.org/cgit/openstack/heat/commit/?id=ef224da97179124103339d56dbfa0655f39b203d
Submitter: Jenkins
Branch: master

commit ef224da97179124103339d56dbfa0655f39b203d
Author: Peter Razumovsky <email address hidden>
Date: Mon Dec 7 18:31:46 2015 +0300

    Fix property TTL in Designate::Domain

    Current property ttl of Domain is incorrect:
    1. Minimum of ttl is 1, not 0;
    2. If ttl is None, it should not be in create method args.

    Change-Id: I632c13f879bd42cf829bc3b490850e78f371ff0f
    Closes-bug: #1523538

Changed in heat:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to heat (stable/liberty)

Fix proposed to branch: stable/liberty
Review: https://review.openstack.org/283529

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to heat (stable/liberty)

Reviewed: https://review.openstack.org/283529
Committed: https://git.openstack.org/cgit/openstack/heat/commit/?id=8d788da2e1b115cfb9c55f007d5392519fb77f5b
Submitter: Jenkins
Branch: stable/liberty

commit 8d788da2e1b115cfb9c55f007d5392519fb77f5b
Author: Peter Razumovsky <email address hidden>
Date: Mon Dec 7 18:31:46 2015 +0300

    Fix property TTL in Designate::Domain

    Current property ttl of Domain is incorrect:
    1. Minimum of ttl is 1, not 0;
    2. If ttl is None, it should not be in create method args.

    Change-Id: I632c13f879bd42cf829bc3b490850e78f371ff0f
    Closes-bug: #1523538
    (cherry picked from commit ef224da97179124103339d56dbfa0655f39b203d)

tags: added: in-stable-liberty
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/heat 5.0.2

This issue was fixed in the openstack/heat 5.0.2 release.

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.