Contrail R3.0/47 error with v1 templates: availability_zone_enable: true/false expected instead of True

Bug #1589915 reported by C K Ravi
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Juniper Openstack
Status tracked in Trunk
R3.0
In Progress
Undecided
Ganesha HV
Trunk
In Progress
Undecided
Ganesha HV
OpenContrail
New
Undecided
Ganesha HV

Bug Description

We want to generate v1 style service instance objects using the same yaml templates used with Contrail R2.0. When we tried R3.0/47 build, we got the following error:
availability_zone_enable: true/false expected instead of True

template has the below field;

  vSRX_Firewall-0-vnf-template:
    properties:
      availability_zone_enable: 'True'
      flavor:
        get_attr: [vSRX_Firewall-0-vnf-flavor, flavor]
      image_name: vSRX-img
      name:
        Fn::Join:
        - '-'
        - - {get_param: nsid}
          - vSRX_Firewall-0-vnf-template
      ordered_interfaces: 'True'
      service_interface_type_list: [management, left, right]
      service_mode: in-network
      service_type: firewall
      shared_ip_list: ['False', 'False', 'False']
      static_routes_list: ['False', 'False', 'False']
    type: OS::Contrail::ServiceTemplate <<<<

Logs:
| 7f056bcf-127d-4eb3-acaf-1572a8821fee | test1 | CREATE_FAILED | 2016-06-04T06:18:05Z |

| stack_status_reason | Resource CREATE failed: BadRequest: |
| | resources.vSRX_Firewall-0-vnf-template: HTTP Status: |
| | 400 Content: Bad property in create: Error validating |
| | property service_template_properties value |
| | {'instance_data': None, 'availability_zone_enable': |
| | 'True', 'service_virtualization_type': 'virtual- |
| | machine', 'interface_type': [{'static_route_enable': |
| | False, 'shared_ip': False, 'service_interface_type': |
| | 'management'}, {'static_route_enable': False, |
| | 'shared_ip': False, 'service_interface_type': 'left'}, |
| | {'static_route_enable': False, 'shared_ip': False, |
| | 'service_interface_type': 'right'}], 'image_name': |
| | 'vSRX-img', 'service_mode': 'in-network', 'version': 1, |
| | 'service_type': 'firewall', 'flavor': 'm1.medium', |
| | 'service_scaling': False, 'vrouter_instance_type': |
| | None, 'ordered_interfaces': True} |
| | availability_zone_enable: true/false expected instead |
| | of True

Fix suggested by Praneet:

if you delete the line
        svc_properties.set_availability_zone_enable(self.properties[self.AVAILABILITY_ZONE_ENABLE])
in /usr/lib/python2.7/dist-packages/contrail_heat/resources/service-template.py
and restart heat-engine, you won’t see the error then.

Ganesha HV (ganeshahv)
Changed in opencontrail:
assignee: nobody → Ganesha HV (ganeshahv)
Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : [Review update] master

Review in progress for https://review.opencontrail.org/20988
Submitter: Ganesha HV (<email address hidden>)

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : [Review update] R3.0

Review in progress for https://review.opencontrail.org/20989
Submitter: Ganesha HV (<email address hidden>)

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : A change has been merged

Reviewed: https://review.opencontrail.org/20989
Committed: http://github.org/Juniper/contrail-heat/commit/a5a36a22e6862f9e3c76a9864175815ead0501bd
Submitter: Zuul
Branch: R3.0

commit a5a36a22e6862f9e3c76a9864175815ead0501bd
Author: Ganesha H V <email address hidden>
Date: Tue Jun 7 15:55:23 2016 +0530

setting the availability zone enable flag

Change-Id: If02f2fd3eaab9153368338c1b3988de317fce0da
Partial-Bug: 1589915

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote :

Reviewed: https://review.opencontrail.org/20988
Committed: http://github.org/Juniper/contrail-heat/commit/81b37435622240337572a90cd5f830516e69e180
Submitter: Zuul
Branch: master

commit 81b37435622240337572a90cd5f830516e69e180
Author: Ganesha H V <email address hidden>
Date: Tue Jun 7 15:55:23 2016 +0530

setting the availability zone enable flag

Change-Id: If02f2fd3eaab9153368338c1b3988de317fce0da
Partial-Bug: 1589915

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.