ZJ's profile - activity

2016-01-21 21:16:19 -0600 received badge  Notable Question (source)
2016-01-21 21:16:19 -0600 received badge  Popular Question (source)
2015-08-18 11:35:57 -0600 commented answer SoftwareDeployment and Cloud-Init

Yes this iw working but I want use these resources with "user_data_format: SOFTWARE_CONFIG" instead od "user_data_format: RAW".

2015-08-18 11:31:13 -0600 asked a question python-heatclient version for OpenStack X Release

Hi,

I know how we can check version for OpenStack services and python--clients. However I don't know (and I could not find) what is min required version of python-client for specific OpenStack release.

Example:

  • I had Juno release which had installed python-heatclient 0.2.10 and I had some problems with that version, some http errors similar to below occured during stack creation:

    {"explanation": "The server could not comply with the request since it is either malformed or otherwise incorrect.", "code": 400, "error": {"message": "The Parameter (test) was not provided.", "traceback": null, "type": "UserParameterMissing"}, "title": "Bad Request"}

When I updated python-heatclient to 0.2.12 the problem dissapeard. Do we have any reference where I can find min required versions of python-*clients for OpenStack releases?

Regards, ZJ

    -
2015-06-25 23:25:17 -0600 received badge  Famous Question (source)
2015-06-04 04:29:19 -0600 received badge  Notable Question (source)
2015-05-04 07:38:16 -0600 received badge  Popular Question (source)
2015-04-30 03:02:57 -0600 asked a question SoftwareDeployment and Cloud-Init

Hi,

I'm using SoftwareDeployment resources (on Juno release) in my Heat scripts.
As user_data_format in OS::Nova::Server resource I have "SOFTWARE_CONFIG" value.

Is it possible to use resources such like OS::Heat::CloudConfig and OS::Heat::MultipartMime in such case? I tried this but without success. All examples which I found had "RAW" as user_data_format but in such case I can't use SoftwareDeployment functionality (or am I wrong?). I would like cloud-init functionality combined with SoftwareDeployment (e.g. to set "preserve_hostname" or "hostname" value using cloud-config).

2015-04-08 07:18:51 -0600 received badge  Famous Question (source)
2015-04-08 07:18:51 -0600 received badge  Notable Question (source)
2015-04-08 07:17:53 -0600 commented answer heat SoftwareDeployment executed twice when depends_on property used

Thank You!

2015-04-06 04:13:05 -0600 received badge  Popular Question (source)
2015-04-03 08:57:41 -0600 commented answer heat SoftwareDeployment executed twice when depends_on property used

Summarry: I would like execute two software deployments every time when I call heat stack-update. Second deployment waits until first is completed until executes. I would like to execute each deployment only once in single heat stack-update call.

2015-04-03 08:52:20 -0600 commented answer Heat SoftwareDeployment and instance boot

Well, I would like do something else, please see my update of the original question.

2015-04-03 08:50:30 -0600 commented answer heat SoftwareDeployment executed twice when depends_on property used

I tested new version but I noticed that already deployed configs are never executed again. I think they should be executed if "SoftwareDeployment" action is "UPDATE" every time when stack-update is executed, am I wrong? I created stack - configs executed, I called stack-update - configs not executed

2015-04-03 04:50:40 -0600 commented answer Heat SoftwareDeployment and instance boot

Yes I know this resources but I didn't find my scenario.

2015-04-02 06:03:18 -0600 commented answer heat in multi region configuration

I saw this diagram, but can all these scenario be achived on Juno? I thought that mentione "OS::Heat::Stack" can be used starting from Kilo realease.

2015-04-02 02:20:29 -0600 asked a question Heat SoftwareDeployment and instance boot

Hi,

I'm using heat SoftwareDeployments on Juno release. I'm searching the best solution to perform the following scenario:

  • create instance with heat
  • perform some initial configuration using SoftwareDeplotment resources (e.g. trigger some python scripts)
  • using SoftwareDeployment to boot instance
  • continue configuration using SoftwareDeployment resource after boot (e.g trigger other python scripts)

Can be above achived with heat? How should look heat templates to allow configuration after boot?

UPDATE:

I would like to create heat template with 3 software deployments:

  • first: execute some python script
  • second - waits until first is completed, then perform instance boot
  • third - wait until boot is completed and execute some additional scripts'

All above should be performed in single heat stack-create call.

2015-04-02 02:14:51 -0600 commented answer heat in multi region configuration

Thank You, so is some other "preferable" solution for usage heat in multi-region open stack? Should we manage each stack (each region) by separate heat?

2015-04-02 02:09:40 -0600 received badge  Famous Question (source)
2015-03-30 07:30:24 -0600 received badge  Notable Question (source)
2015-03-30 07:30:24 -0600 received badge  Famous Question (source)
2015-03-30 07:30:24 -0600 received badge  Popular Question (source)
2015-03-27 04:20:57 -0600 asked a question heat in multi region configuration

Hi,

I would like to understand heat usage in multi region configuration (on Juno release).

My assumptions:

  • two Regions: Region1 and Region2
  • one heat service in each Region
  • one common keystone
  • one common dashboard
  • other services defined in both regions (e.g. neutron in region1 and second neutron in region2)
  • one tenant (half of the resources in Region1 and half of the resources in Region2)
  • instances from both regions can connect to each other using private network defined in the tenant
  • heat will be triggered from instances defined in the tenant

Questions:

  1. Are my assumptions correct?
  2. Two heat services (one in each region), heat wll be triggered from instances so:
  • is it possible to trigger heat service defined in region1 from the instance defined in region2? If yes how we can do that? How we can specify which heat should be used?
2015-02-16 01:44:53 -0600 commented answer heat SoftwareDeployment executed twice when depends_on property used

Steve, thank You! Could you just confirm that the only change was made in "55-heat-config" file (I'm not using disk image builder so such information can be very useful for me)?

2015-02-15 23:17:13 -0600 received badge  Notable Question (source)
2015-02-15 14:22:27 -0600 commented answer Juno: instance creation fails when specify fixed_ip

Thank You!

2015-02-15 14:19:31 -0600 commented answer heat SoftwareDeployment executed twice when depends_on property used

Is there a way to avoid such behaviour? I would like to execute few deployments in specified order but each of them should be executed only once.

2015-02-15 07:59:16 -0600 received badge  Popular Question (source)
2015-02-05 08:25:05 -0600 asked a question heat SoftwareDeployment executed twice when depends_on property used

Hi,

I noticed the following problem with software deplotment resources dependency (I'm working on Juno 2014.1).

When I create softwareDeployment resources which depends on each other (defined by "depends_on" property"), e.g.:

  config:
    type: OS::Heat::SoftwareConfig
    properties:
      group: script
      config:
          get_file: python_script

  deployment:
    type: OS::Heat::SoftwareDeployment
    properties:
      config: { get_resource: config }
      server: { get_resource: server }
      signal_transport: CFN_SIGNAL

  config_2:
    type: OS::Heat::SoftwareConfig
    properties:
      group: script
      config: |
        #!/bin/bash
        echo "BASH" >> /var/tmp/bash.out


  deployment_2:
    type: OS::Heat::SoftwareDeployment
    properties:
      config: { get_resource: config_2 }
      server: { get_resource: server }
      signal_transport: CFN_SIGNAL
    depends_on: deployment

First deploment is executed twice. I saw in /var/run/heat-config that "inputs" are duplicated (two records for "deployment"), I suppose this is the reason but i don't know if it is caused by incorrect configuration or there is some other reason. Any ideas?

2015-02-05 07:33:33 -0600 received badge  Scholar (source)
2015-02-05 07:33:31 -0600 commented answer difference between "heat" and "cfn" sections in os-collect-config.conf

Thank You! now is all clear for me.

2015-02-04 03:58:03 -0600 commented answer heat stack output-show return null

I updated my original post with additional information. I'm working on Juno 2014.1.

2015-02-04 03:56:16 -0600 edited question heat stack output-show return null

Hi,

I'm using SoftwareConfig and SoftwareDeployment in my heat scripts. I have problem with values returned by command "heat output-show <stack_name> <output_name>."

I want just receive stdout, stderr and return code from command which I execute. All is working fine when I execute bash script but when I put python script in SoftwareConfig resource (as config, group is script) all mentioned outputs are set to "null".

The interesting thing is that in "heat event-list" output returned error is visible:

| deployment | 93c7ba66-6043-43d7-ada7-49106ef6b7cc | Error: Deployment to server failed: deploy_status_code : Deployment exited with non-zero status code: 1 | CREATE_FAILED | 2014-12-11T13:21:04Z |

I'm adding additional information below.

I made tests with many heat templates but always in case of script error outputs are "null". One of the simplest template which I saw this problem:

heat_template_version: 2014-10-16

resources:
  server:
    type: OS::Nova::Server
    properties:
       availability_zone: CMS01
       flavor: m1.medium
       image:  rhel_image
       name: deployment test
       networks:
           - network: e107ff70-3e4f-401f-bcf8-376990e754ae
       user_data_format: SOFTWARE_CONFIG

  config:
    type: OS::Heat::SoftwareConfig
    properties:
      group: script
      config:
          get_file: python_script

  deployment:
    type: OS::Heat::SoftwareDeployment
    properties:
      actions: [ "CREATE" ]
      config: { get_resource: config }
      server: { get_resource: server }
      signal_transport: HEAT_SIGNAL

outputs:
  stdout:
    value:
      get_attr: [deployment, deploy_stdout]
  stderr:
    value:
      get_attr: [deployment, deploy_stderr]
  status_code:
    value:
      get_attr: [deployment, deploy_status_code]

My python_script (again really simple):

  • first version with success (outputs contains expected informations)
#!/usr/bin/env python

import os
import sys

with open("/var/tmp/test_py.out" ,"w") as f:

      f.write("TEST SOFTWARE DEPLOYMENT OUTPUTS")

print "TEST OUTPUTS"

sys.exit(0)
  • now with failure (I just changed last line to:

sys.exit(1)

Results:

Success:

deployment    | a52330aa-d015-45eb-a278-9cc6b7c3f7d1 | OS::Heat::SoftwareDeployment | CREATE_COMPLETE | 2015-02-04T07:47:12Z

MariaDB [heat]> select output_values from software_deployment where id="a52330aa-d015-45eb-a278-9cc6b7c3f7d1"
    -> ;
+-----------------------------------------------------------------------------------+ | output_values                        |
+-----------------------------------------------------------------------------------+ | {"deploy_stdout": "TEST OUTPUTS\n", "deploy_stderr": "", "deploy_status_code": 0} |
+-----------------------------------------------------------------------------------+

    [root@01 test_templates(ip)]# heat output-show test_deployment status_code 
    0 
    [root@01 test_templates(ip)]# heat output-show test_deployment stderr 
    "" 
    [root@01 test_templates(ip)]# heat output-show test_deployment stdout 
    "TEST OUTPUTS\n"

Failure

deployment    | 3f5f39a4-1d00-43b2-be57-1d2e5a102a21 | OS::Heat::SoftwareDeployment | CREATE_FAILED   | 2015-02-04T08:07:44Z

MariaDB [heat]> select output_values from software_deployment where id="3f5f39a4-1d00-43b2-be57-1d2e5a102a21"
    -> ;
+-----------------------------------------------------------------------------------+ | output_values                        |
+-----------------------------------------------------------------------------------+ | {"deploy_stdout": "TEST OUTPUTS\n", "deploy_stderr": "", "deploy_status_code": 1} |
+-----------------------------------------------------------------------------------+

[root@open-gen8vcms01 test_templates(ip)]# heat output-list test_deployment_failure
+-------------+----------------------+ | output_key  | description          |
+-------------+----------------------+ | status_code | No description given | | stderr      | No description given | | stdout      | No description given |
+-------------+----------------------+ 


   [root@open-gen8vcms01 test_templates(ip)]# heat output-show test_deployment_failure status_code 
null 
    [root@open-gen8vcms01 test_templates(ip)]# heat output-show test_deployment_failure stderr 
null 
    [root@open-gen8vcms01 test_templates(ip)]# heat output-show test_deployment_failure stdout 
null
2015-02-04 01:54:12 -0600 commented answer difference between "heat" and "cfn" sections in os-collect-config.conf

I have both configured: "Service: cloudformation" and "Service: orchestration". Why in such case my /etc/os-collect-config.conf doesn't have section for "heat" and I see warnings ?

2015-02-04 01:54:12 -0600 received badge  Commentator
2015-02-03 07:06:18 -0600 commented answer heat stack output-show return null

The problem occurs only when script fails (Juno 2014.1). I see returned output, errors and status_code in mysql DB (in software_deployment table) so it seems that problem is with "heat output-show".

2015-02-03 01:13:11 -0600 commented answer difference between "heat" and "cfn" sections in os-collect-config.conf

Steve, thank You for your answer. You mentioned "native OpenStack APIs". How can I check which API is used? If i'm using templates in HOT format, do I alway use HEAT native API in such case?

2015-02-02 15:57:23 -0600 received badge  Famous Question (source)
2015-01-19 02:58:32 -0600 received badge  Famous Question (source)
2015-01-05 12:28:20 -0600 received badge  Famous Question (source)
2014-12-24 02:09:56 -0600 received badge  Notable Question (source)
2014-12-22 06:52:47 -0600 commented question heat stack output-show return null

Yes I tried execute it manually, it works good (if fails it provides error return code, if successful it receives '0' as expected). The only problem is that "null" is visible in heat output-show.

I did few additional tests and noticed that "null" is visible only when script fails.

2014-12-13 08:56:38 -0600 received badge  Popular Question (source)