resource validation fail due to dependency

Bug #1317636 reported by Vijendar Komalla
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Heat
Fix Released
High
Vijendar Komalla

Bug Description

resource/property validation fails if a resource depends on other resource. For example, template given below results in stack creation failure with following error message
"ERROR: Property error : service_db: users Property error : users: 0 Property error : 0: password "" does not match pattern "[a-zA-Z0-9_]+[a-zA-Z0-9_@?#\s]*[a-zA-Z0-9_]+""

Below given is an example template to reproduce the problem:

resources:
  database_password:
    type: "OS::Heat::RandomString"
    properties:
      length: 16
      sequence: lettersdigits

  service_db:
    type: OS::Trove::Instance
    properties:
      name: app_db
      flavor: { get_param: db_flavor }
      size: { get_param: db_size }
      databases:
      - name: app_data
      users:
      - name: { get_param: db_user }
        password: { get_attr: [database_password, value] }
        databases: [ app_data ]

Changed in heat:
assignee: nobody → Vijendar Komalla (vijendar-komalla)
description: updated
Changed in heat:
status: New → In Progress
Revision history for this message
Jason Dunsmore (jasondunsmore) wrote :

As we discussed, maybe this can be solved by a new concept of property dependencies (on other resources). Then, validation can only be done if the property has no dependencies. Sounds tricky to implement though.

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

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

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

Changed in heat:
importance: Undecided → High
Changed in heat:
assignee: Vijendar Komalla (vijendar-komalla) → Clint Byrum (clint-fewbar)
Changed in heat:
assignee: Clint Byrum (clint-fewbar) → Vijendar Komalla (vijendar-komalla)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on heat (master)

Change abandoned by Vijendar Komalla (<email address hidden>) on branch: master
Review: https://review.openstack.org/93081

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

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

commit 5022808e9d2904ae061e6ad584d3215792ff7c39
Author: Vijendar Komalla <email address hidden>
Date: Thu May 22 14:53:43 2014 -0500

    Fix early resource property value validation

    Currently resource property validation fails if resource it
    depends on is not created.

    This change skips a property constraint validation if its intrinsic
    function resolution does not find the dependant resource.

    Change-Id: I2056c89437e8df2a59726b60c3c12f19f713d84d
    Partial-Bug: #1317636

Revision history for this message
Steven Hardy (shardy) wrote :

Hi Vijendar, can you provide a status update on this please? https://review.openstack.org/#/c/93081/ was abandoned, so can you outline what the plan is to make this bug completed? Thanks!

Revision history for this message
Vijendar Komalla (vijendar-komalla) wrote :

Hi Steve, Initially I split it into two patches, but later realized that second patch is not required, so abandoned (I have verified that template given in the bug description works without the abandoned patch).
sorry, I forgot update the commit message from 'partial-bug' to 'closes-bug' :( I am going to change the bug status to fix committed. Please let me know if you have any concerns.

Changed in heat:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in heat:
milestone: none → juno-3
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in heat:
milestone: juno-3 → 2014.2
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.