[Openstack] HEAT pattern error on wait condition

Jesus arteche chechu.linux at gmail.com
Fri Jan 16 19:52:59 UTC 2015


Hey guys,

I have this pattern:

heat_template_version: 2013-05-23

description: >
  It deploys a Drupal web site on Internet Information Services
  with PHP configured. It has a local database on SQL Server Express

parameters:
  key_name:
    type: string
    description: Name of an existing key pair used to encrypt Admin
password.
    default: chechu

  flavor:
    type: string
    description: ID or name of an existing flavor to be used for the
instance.
    default: Standard_1_2

  image:
    type: string
    description: ID or name of an existing valid Windows Server image.
    default:     46c57db4-497f-45dd-89a5-21e0b283d279

  public_network_id:
    type: string
    description: >
      ID of an existing public network where a floating IP will be
allocated.#
    default: 2795f8ad-4820-4dd5-89e0-69f95931e287

  private_network_id:
    type: string
    description: ID of an existing private network.
    default: 6c18553b-6cca-4e88-bfa2-74e241f9a74b

  sa_password:
    type: string
    description: SQL Server Express system administrator password.
    hidden: true
    default: OpenStack_2014
    constraints:
      - length: { min: 8 }
        description: SA password must be at least 8 characters long.
      - allowed_pattern:
'(?=^.{6,255}$)((?=.*\\d)(?=.*[A-Z])(?=.*[a-z])|(?=.*\\d)(?=.*[^A-Za-z0-9])(?=.*[a-z])|(?=.*[^A-Za-z0-9])(?=.*[A-Z])(?=.*[a-z])|(?=.*\\d)(?=.*[A-Z])(?=.*[^A-Za-z0-9]))^.*'
        description: >
          SA password must contain uppercase and lowercase letters, numbers,
          non-alphanumeric characters and it must not contain whitespaces.


  drupal_admin_username:
    type: string
    description: Drupal admin user name.
    default: cloudbase
    constraints:
      - length: { min: 4, max: 16 }
        description: >
          Drupal admin user name must be between 4 and 16 characters long.
      - allowed_pattern: '^[a-zA-Z0-9]+$'
        description: >
          Drupal admin user name must contain only alphanumeric characters.

  drupal_admin_password:
    type: string
    description: Drupal admin user password.
    hidden: true
    constraints:
      - length: { min: 8 }
        description: >
          Drupal admin user password must be at least 8 characters long.
      - allowed_pattern: '^[\S]+$'
        description: Drupal admin user password must not contain
whitespaces.
    default: OpenStack_2014

  drupal_admin_email:
    type: string
    description: Drupal administrator email.
    default: chechu at test.com
    constraints:
      - length: { min: 1 }
        description: Drupal admin email must not be empty.
      - allowed_pattern:
'^[a-zA-Z0-9._%+-]+@(?:[a-zA-Z0-9-]+\.)+[a-zA-Z]{2,4}$'
        description: Drupal admin email must be a valid email address.

  drupal_site_name:
    type: string
    description: Drupal site name.
    default: My Drupal IIS website created with Heat
    constraints:
      - length: { min: 1 }
        description: Drupal site name must not be empty.
      - allowed_pattern: '^(?!.*["\r\n\f]).*$'
        description: >
          Drupal site name must not contain double quotes and any
          whitespace character (excepting spaces and tabs).

  max_timeout:
    type: number
    default: 3600
    description: >
      The maximum allowed time (seconds) for the instalation to finish.

resources:

  wait_condition:
    type: AWS::CloudFormation::WaitCondition
    properties:
      Handle: {get_resource: wait_handle}
      # Note, count of 5 vs 6 is due to duplicate signal ID 5 sent below
      Count: 5
      Timeout: {get_param: max_timeout}

  wait_handle:
    type: AWS::CloudFormation::WaitConditionHandle

  iis_drupal:
    type: OS::Nova::Server
    properties:
      image: { get_param: image }
      flavor: { get_param: flavor }
      key_name: { get_param: key_name }
      networks:
        - port: { get_resource: server_port }
      user_data_format: RAW
      user_data: { get_resource: iis_drupal_init }



  server_port:
    type: OS::Neutron::Port
    properties:
      network_id: { get_param: private_network_id }

  server_port_pu:
    type: OS::Neutron::Port
    properties:
      network_id: { get_param: public_network_id }


  utils_module:
    type: OS::Heat::SoftwareConfig
    properties:
      group: ungrouped
      config: { get_file: Common/heat-powershell-utils.psm1 }

  iis_drupal_module:
    type: OS::Heat::SoftwareConfig
    properties:
      group: ungrouped
      config: { get_file: IIS_Drupal.psm1 }

  iis_drupal_main:
    type: OS::Heat::SoftwareConfig
    properties:
      group: ungrouped
      config:
        str_replace:
          template: { get_file: IIS_Drupal.ps1 }
          params:
            sa_password: { get_param: sa_password }
            admin_username: { get_param: drupal_admin_username }
            admin_password: { get_param: drupal_admin_password }
            admin_email: { get_param: drupal_admin_email }
            website_name: { get_param: drupal_site_name }
            wait_handle_endpoint:
              { get_attr: [wait_handle, endpoint] }
            wait_handle_token:
              { get_attr: [wait_handle, token] }

  iis_drupal_init:
    type: OS::Heat::MultipartMime
    properties:
      parts:
        [
          {
            filename: "heat-powershell-utils.psm1",
            subtype: "x-cfninitdata",
            config: { get_resource: utils_module }
          },
          {
            filename: "IIS_Drupal.psm1",
            subtype: "x-cfninitdata",
            config: { get_resource: iis_drupal_module }
          },
          {
            filename: "cfn-userdata",
            subtype: "x-cfninitdata",
            config: { get_resource: iis_drupal_main }
          }
        ]

outputs:
  drupal_url:
    description: URL where you can access the Drupal web site
    value:
      str_replace:
        template: >
          URL: http://host
        params:
          host: { get_attr: [ server_port, server_port_pu ] }


But I got this errror:

Create Failed

Resource Create Failed: Ht-15306c5 Stackvalidationfailed: Ht-Ea96e26
Ht-E5bc283 Property Error : Iis Drupal Main: Config Ht-99828f1 The
Referenced Attribute (Wait Handle Token) Is Incorrect.




Any idea?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack/attachments/20150116/84b7f5f6/attachment.html>


More information about the Openstack mailing list