Re: [openstack-dev] [heat] How to expose the error messages if the heat stack creation fails with software config/software deployment

2014-11-06 Thread Tao Tao
Hi, Henry:

Appreciate very much for your kind reply!

Yes, this is what I want, however, I am not seeing the detailed error
message as you are seeing.

I am still using OpenStack Icehouse, are you using OpenStack Juno or
Icehouse?

[root@openstack-03 heat(keystone_admin)]# heat stack-show LCH_test1
+--+--+

| Property | Value
|
+--+
|
| stack_status_reason  | Resource CREATE failed: Error: Deployment to
server
|
|  | failed: deploy_status_code : Deployment exited
with
|
|  | non-zero status code: 1
|
|
+--+--+


Thanks,
Tao Tao, Ph.D.
IBM T. J. Watson Research Center
1101 Kitchawan Road
Yorktown Heights, NY 10598
Phone: (914) 945-4541
Email: t...@us.ibm.com



From:   Hang H Liu 
To: "OpenStack Development Mailing List \(not for usage questions
\)" 
Date:   11/06/2014 09:53 PM
Subject:Re: [openstack-dev] [heat] How to expose the error messages if
the heat stack creation fails with software config/software
deployment



Hi, Tao Tao,

Here is an example,

DEBUG (session) REQ: curl -i -X GET
http://9.186.100.22:8004/v1/f334fc078b944b60a08d121022fae0f0/stacks/s1
... ...

RESP BODY:
{ "stack" : { "capabilities" : [  ],

  ... ...

  "parent" : null,
  "stack_name" : "s1",
  "stack_owner" : "admin",
  "stack_status" : "CREATE_FAILED",
  "stack_status_reason" : "Resource CREATE failed: Error: Resource
CREATE failed: Forbidden: Quota exceeded for instances: Requested 1, but
already used 4 of 4 instances (HTTP 403) (Request-ID:
req-02784ecc-4713-4601-84b5-099586d7b436)",
  "template_description" : "Creates an autoscaling application using
Ceilometer.",
  "timeout_mins" : null,
  "updated_time" : null
} }


Whether "stack_status_reason" can satisfy your requirement?


Best Regards,
Liu, Hang(Henry)

--
hang...@cn.ibm.com | Tel: +8610-58748871   | ITN: 6-9058871
----------
OpenStack-dev mailing list
OpenStack-dev@lists.openstack.org
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev



Tao Tao  写于 2014/11/07 08:08:17:

> From: Tao Tao 
> To: "OpenStack Development Mailing List \(not for usage questions\)"
> 
> Date: 2014/11/07 08:11
> Subject: Re: [openstack-dev] [heat] How to expose the error messages
> if the heat stack creation fails with software config/software deployment
>
> Hi, Ton:
>
> Thanks for your kind reply.
>
> What I really mean is how to expose the error messages so that I can
> use Heat REST API to find the error messages?
>
> In another word, how would a user to be able to find out the
> specific error message as a Heat client?
>
>
> Thanks,
> Tao Tao, Ph.D.
> IBM T. J. Watson Research Center
> 1101 Kitchawan Road
> Yorktown Heights, NY 10598
> Phone: (914) 945-4541
> Email: t...@us.ibm.com
>
> [图像已删除] Ton Ngo---11/06/2014 07:04:30 PM---Hi Tao Tao,If
> you use Ubuntu image, you can check /var/log/syslog
>
> From: Ton Ngo/Watson/IBM@IBMUS
> To: "OpenStack Development Mailing List \(not for usage questions\)"
> 
> Date: 11/06/2014 07:04 PM
> Subject: Re: [openstack-dev] [heat] How to expose the error messages
> if the heat stack creation fails with software config/software deployment
>
>
>
> Hi Tao Tao,
>   If you use Ubuntu image, you can check /var/log/syslog
> Look for section like:
> Running /opt/stack/os-config-refresh/configure.d/20-os-apply-config
> You should see the logs for running the script, error message, script
> output
> The scripts are stored on the VM instance
> in:  /var/lib/heat-config/heat-config-script
> Ton Ngo,
>
>
>
> From: Tao Tao/Watson/IBM@IBMUS
> To: "OpenStack List" 
> Date: 11/06/2014 12:09 PM
> Subject: [openstack-dev] [heat] How to expose the error messages if the
>heat stack creation fails with software config/software
>deployment
>
>
>
> Hi, All:
>
> When the heat stack creation fails due to software config/software
> deployment with scripts/chef/puppet, we are not able to locate the error
> message with Heat REST APIs.
&g

Re: [openstack-dev] [heat] How to expose the error messages if the heat stack creation fails with software config/software deployment

2014-11-06 Thread Tao Tao

Hi, Ton:

Thanks for your kind reply.

What I really mean is how to expose the error messages so that I can use
Heat REST API to find the error messages?

In another word, how would a user to be able to find out the specific error
message as a Heat client?


Thanks,
Tao Tao, Ph.D.
IBM T. J. Watson Research Center
1101 Kitchawan Road
Yorktown Heights, NY 10598
Phone: (914) 945-4541
Email: t...@us.ibm.com



From:   Ton Ngo/Watson/IBM@IBMUS
To: "OpenStack Development Mailing List \(not for usage questions
\)" 
Date:   11/06/2014 07:04 PM
Subject:Re: [openstack-dev] [heat] How to expose the error messages if
the heat stack creation fails with software config/software
deployment



Hi Tao Tao,
   If you use Ubuntu image, you can check /var/log/syslog
Look for section like:

Running /opt/stack/os-config-refresh/configure.d/20-os-apply-config
You should see the logs for running the script, error message, script
output
The scripts are stored on the VM instance
in:  /var/lib/heat-config/heat-config-script
Ton Ngo,



From:            Tao Tao/Watson/IBM@IBMUS
To:  "OpenStack List" 
Date:11/06/2014 12:09 PM
Subject: [openstack-dev] [heat] How to expose the error messages
if the
heat stack creation fails with software config/software
deployment



Hi, All:

When the heat stack creation fails due to software config/software
deployment with scripts/chef/puppet, we are not able to locate the error
message with Heat REST APIs.

What is the best practice to solve this problem?


Thanks,
Tao Tao, Ph.D.
IBM T. J. Watson Research Center
1101 Kitchawan Road
Yorktown Heights, NY 10598
Phone: (914) 945-4541
Email: t...@us.ibm.com___
OpenStack-dev mailing list
OpenStack-dev@lists.openstack.org
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev



___
OpenStack-dev mailing list
OpenStack-dev@lists.openstack.org
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev

___
OpenStack-dev mailing list
OpenStack-dev@lists.openstack.org
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


[openstack-dev] [heat] How to expose the error messages if the heat stack creation fails with software config/software deployment

2014-11-06 Thread Tao Tao

Hi, All:

When the heat stack creation fails due to software config/software
deployment with scripts/chef/puppet, we are not able to locate the error
message with Heat REST APIs.

What is the best practice to solve this problem?


Thanks,
Tao Tao, Ph.D.
IBM T. J. Watson Research Center
1101 Kitchawan Road
Yorktown Heights, NY 10598
Phone: (914) 945-4541
Email: t...@us.ibm.com___
OpenStack-dev mailing list
OpenStack-dev@lists.openstack.org
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


[openstack-dev] [HEAT] Qestions on adding a new Software Config element for Opscode Chef

2014-08-01 Thread Tao Tao
Hi, All:We are trying to leverage Heat software config model to support Chef-based software installation. Currently the chef-based software config is not in place with Heat version 0.2.9.Therefore, we do have a number of questions on the implementation by ourselves:1. Should we create new software config child resource types (e.g. OS::Heat::SoftwareConfig::Chef and OS::Heat::SoftwareDeployment::Chef proposed in the https://wiki.openstack.org/wiki/Heat/Blueprints/hot-software-config-spec) or should we reuse the existing software config resource type (e.g. OS::Heat::SoftwareConfig by leveraging group attribute) like the following example with Puppet? What are the pros and cons with either approach?  config:type: OS::Heat::SoftwareConfigproperties:  group: puppet  inputs:  - name: foo  - name: bar  outputs:  - name: result  config:get_file: config-scripts/example-puppet-manifest.pp  deployment:type: OS::Heat::SoftwareDeploymentproperties:  config:get_resource: config  server:get_resource: server  input_values:foo: fobar: ba2. Regarding OpsCode Chef and Heat integration, should our software config support chef-solo only, or should support Chef server? In another word,  should we let Heat to do the orchestration for the chef-based software install or should we continue to use chef-server for the chef-based software install?3. In the current implementation of software config hook for puppet as follows:heat-templates / hot / software-config / elements / heat-config-puppet / install.d / 50-heat-config-hook-puppet3.1 why we need a 50-* as a prefix for the heat-config hook name?3.2 In the script as follows, what is the "install-packages" script? where does it load puppet package? How would we change the script to install chef package?#!/bin/bashset -xSCRIPTDIR=$(dirname $0)install-packages puppetinstall -D -g root -o root -m 0755 ${SCRIPTDIR}/hook-puppet.py /var/lib/heat-config/hooks/puppet4. With diskimage-builder, we can build in images with many software config elements(chef, puppet, script, salt), which means there will be many hooks in the image. However, By reading the source code of the os-refresh-config, it seems it will execute only the hooks which has corresponding "group" defined in the software config, is that right?def invoke_hook(c, log):# sanitise the group to get an alphanumeric hook file namehook = "".join(x for x in c['group'] if x == '-' or x == '_' or x.isalnum())hook_path = os.path.join(HOOKS_DIR, hook)signal_data = Noneif not os.path.exists(hook_path):log.warn('Skipping group %s with no hook script %s' % (c['group'], hook_path))else:Thanks a lot for your kind assistance!Thanks,Tao Tao, Ph.D.IBM T. J. Watson Research Center1101 Kitchawan RoadYorktown Heights, NY 10598Phone: (914) 945-4541Email: t...@us.ibm.com


___
OpenStack-dev mailing list
OpenStack-dev@lists.openstack.org
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev