Need to explode Heat software-config style cfn Metadata

Bug #1295787 reported by Clint Byrum
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
os-collect-config
Fix Released
High
Clint Byrum

Bug Description

When using OS::Heat::StructuredDeployment, we see a different structure for Metadata:

{
 "cfn": {
  "os-collect-config": {
   "cfn": {
    "stack_name": "overcloud",
    "metadata_url": "http://192.0.2.3:8000/v1/",
    "path": "NovaCompute0.Metadata",
    "secret_access_key": "f20fbb94e1d0457e9cb8b00f31f581bc",
    "access_key_id": "680da6bd21f54c30b9a60014384f81e6"
   }
  },
  "deployments": [
   {
    "inputs": [
     {
      "type": "String",
      "name": "neutron_enable_tunneling",
      "value": "True"
     },
     {
      "type": "String",
      "name": "neutron_host",
      "value": "192.0.2.34"
     },
     {
      "type": "String",
      "name": "nova_compute_libvirt_type",
      "value": "qemu"
     },
     {
      "type": "String",
      "name": "nova_compute_driver",
      "value": "libvirt.LibvirtDriver"
     },
     {
      "type": "String",
      "name": "rabbit_password",
      "value": "guest"
     },
     {
      "type": "String",
      "name": "neutron_bridge_mappings",
      "value": ""
     },
     {
      "type": "String",
      "name": "nova_api_host",
      "value": "192.0.2.34"
     },
     {
      "type": "String",
      "name": "nova_dsn",
      "value": "mysql://nova:unset@192.0.2.34/nova"
     },
     {
      "type": "String",
      "name": "ceilometer_password",
      "value": "unset"
     },
     {
      "type": "String",
      "name": "neutron_tenant_network_type",
      "value": "gre"
     },
     {
      "type": "String",
      "name": "neutron_network_vlan_ranges",
      "value": ""
     },
     {
      "type": "String",
      "name": "ceilometer_dsn",
      "value": "mysql://ceilometer:unset@192.0.2.34/ceilometer"
     },
     {
      "type": "String",
      "name": "rabbit_host",
      "value": "192.0.2.34"
     },
     {
      "type": "String",
      "name": "neutron_public_interface",
      "value": ""
     },
     {
      "type": "String",
      "name": "ceilometer_metering_secret",
      "value": "unset"
     },
     {
      "type": "String",
      "name": "neutron_flat_networks",
      "value": ""
     },
     {
      "type": "String",
      "name": "keystone_host",
      "value": "192.0.2.34"
     },
     {
      "type": "String",
      "name": "neutron_password",
      "value": "2b34e2ee5053fcdf21ccad68b56dc6fc4c158599"
     },
     {
      "type": "String",
      "name": "ceilometer_compute_agent",
      "value": ""
     },
     {
      "type": "String",
      "name": "glance_host",
      "value": "192.0.2.34"
     },
     {
      "type": "String",
      "name": "neutron_local_ip",
      "value": "192.0.2.32"
     },
     {
      "type": "String",
      "name": "neutron_dsn",
      "value": "mysql://neutron:unset@192.0.2.34/neutron"
     },
     {
      "type": "String",
      "name": "admin_password",
      "value": "6b7697e81051bd9deacc618af68acc82cb244130"
     },
     {
      "type": "String",
      "name": "neutron_physical_bridge",
      "value": ""
     },
     {
      "type": "String",
      "name": "rabbit_username",
      "value": "guest"
     },
     {
      "type": "String",
      "name": "nova_password",
      "value": "947896603d414f8d1dd7e5e366946d241ffeb65b"
     },
     {
      "type": "String",
      "name": "static_hosts",
      "value": "192.0.2.32 overcloud-NovaCompute0-dwjwhe3r7m2e overcloud-NovaCompute0-dwjwhe3r7m2e.novalocal\n192.0.2.33 overcloud-NovaCompute1-o73qsizkbdqw overcloud-NovaCompute1-o73qsizkbdqw.novalocal\n192.0.2.34 unused"
     },
     {
      "type": "String",
      "name": "deploy_server_id",
      "value": "e903acea-7b4c-4490-9948-484194d8a422",
      "description": "ID of the server being deployed to"
     },
     {
      "type": "String",
      "name": "deploy_action",
      "value": "CREATE",
      "description": "Name of the current action being deployed"
     },
     {
      "type": "String",
      "name": "deploy_stack_id",
      "value": "2806895f-fe8d-4aa4-8679-17068422de26",
      "description": "ID of the stack this deployment belongs to"
     },
     {
      "type": "String",
      "name": "deploy_resource_name",
      "value": "NovaCompute0Config",
      "description": "Name of this deployment resource in the stack"
     },
     {
      "type": "String",
      "name": "deploy_signal_id",
      "value": "http://192.0.2.3:8000/v1/signal/arn%3Aopenstack%3Aheat%3A%3A1dff1ca558bc4134b56ade56a3a1a7e0%3Astacks%2Fovercloud%2F2806895f-fe8d-4aa4-8679-17068422de26%2Fresources%2FNovaCompute0Config?Timestamp=2014-03-21T16%3A53%3A41Z&SignatureMethod=HmacSHA256&AWSAccessKeyId=89388a1ca92b42c1868d34418145d433&SignatureVersion=2&Signature=zjwDbEhtcKrXjc8NnO25eyisPsyAv0Cd3TUPL2lKNMg%3D",
      "description": "ID of signal to use for signalling output values"
     }
    ],
    "group": "Heat::Ungrouped",
    "name": "overcloud-NovaComputeConfig-t67xpwiqg3mz",
    "outputs": null,
    "options": null,
    "config": {
     "ceilometer": {
      "compute_agent": "",
      "metering_secret": "unset",
      "db": "mysql://ceilometer:unset@192.0.2.34/ceilometer",
      "service-password": "unset"
     },
     "nova": {
      "compute_libvirt_type": "libvirt.LibvirtDriver",
      "compute_driver": "libvirt.LibvirtDriver",
      "db": "mysql://nova:unset@192.0.2.34/nova",
      "host": "192.0.2.34",
      "service-password": "947896603d414f8d1dd7e5e366946d241ffeb65b"
     },
     "hosts": "192.0.2.32 overcloud-NovaCompute0-dwjwhe3r7m2e overcloud-NovaCompute0-dwjwhe3r7m2e.novalocal\n192.0.2.33 overcloud-NovaCompute1-o73qsizkbdqw overcloud-NovaCompute1-o73qsizkbdqw.novalocal\n192.0.2.34 unused",
     "rabbit": {
      "username": null,
      "host": "192.0.2.34",
      "password": "guest"
     },
     "keystone": {
      "host": "192.0.2.34"
     },
     "glance": {
      "host": "192.0.2.34"
     },
     "neutron": {
      "ovs": {
       "network_vlan_ranges": "",
       "local_ip": null,
       "physical_bridge": "",
       "enable_tunneling": null,
       "tenant_network_type": null,
       "public_interface": "",
       "bridge_mappings": ""
      },
      "host": "192.0.2.34",
      "flat-networks": "",
      "service-password": "2b34e2ee5053fcdf21ccad68b56dc6fc4c158599",
      "ovs_db": "mysql://neutron:unset@192.0.2.34/neutron"
     },
     "admin-password": "6b7697e81051bd9deacc618af68acc82cb244130"
    },
    "id": "dfb5f42b-8930-4752-936d-28057d72d1a6"
   }
  ]
 }
}

We need to explode the deployments list into individual json files, something like cfn-deployment-{{name}}.json

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix proposed to os-collect-config (master)

Related fix proposed to branch: master
Review: https://review.openstack.org/82225

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

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

Changed in os-collect-config:
status: Triaged → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix merged to os-collect-config (master)

Reviewed: https://review.openstack.org/82225
Committed: https://git.openstack.org/cgit/openstack/os-collect-config/commit/?id=16158684a68f8e5c8d1b896f8bc12bbb0e9fc66d
Submitter: Jenkins
Branch: master

commit 16158684a68f8e5c8d1b896f8bc12bbb0e9fc66d
Author: Clint Byrum <email address hidden>
Date: Fri Mar 21 14:10:01 2014 -0700

    Change collector interface to return a list

    With the new OS::Heat::StructuredDeployment resource, each Metadata
    section may have multiple "deployments" in it. With this, we will return
    a list with tuples of key and content to write to the cache.

    Change-Id: I9f4272b0761e1dfd850bc5a5c6b27a78f126281f
    Related-Bug: #1295787

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

Reviewed: https://review.openstack.org/82244
Committed: https://git.openstack.org/cgit/openstack/os-collect-config/commit/?id=831ab0be03f2b5635534321611cd0fb1b5a44127
Submitter: Jenkins
Branch: master

commit 831ab0be03f2b5635534321611cd0fb1b5a44127
Author: Clint Byrum <email address hidden>
Date: Fri Mar 21 13:46:13 2014 -0700

    Parse deployments if found in cfn metadata

    Will result in multiple cache files to be merged per
    OS::Heat::StructuredDeployment. This is needed as the new features for
    software configuration break things up a bit differently in Metadata.

    Change-Id: Iec0fd947bac674f6b6f36e8c0789d10580c325fd
    Closes-Bug: #1295787

Changed in os-collect-config:
status: In Progress → Fix Committed
Changed in os-collect-config:
status: Fix Committed → 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.