Bug 1235472

Summary: SoftwareDeployment resource attributes are null
Product: [Community] RDO Reporter: Graeme Gillies <ggillies>
Component: openstack-heatAssignee: Steve Baker <sbaker>
Status: CLOSED EOL QA Contact: Amit Ugol <augol>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: KiloCC: jpeeler, shardy, srevivo
Target Milestone: ---   
Target Release: Kilo   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-05-19 15:50:58 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Graeme Gillies 2015-06-24 22:56:53 UTC
Description of problem:

Currently when using RDO-Manager, I want to have a look at the output from a puppet run to confirm that everything happened correctly. However, it looks like no output from puppet is getting captured and returned to heat. See

[stack@rdomanager ~]$ heat resource-show ead5d48e-2098-4253-a2f5-1b71d722a6a5 0
+------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Property               | Value                                                                                                                                                                                                                             |
+------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| attributes             | {                                                                                                                                                                                                                                 |
|                        |   "deploy_stdout": null,                                                                                                                                                                                                          |
|                        |   "deploy_stderr": null,                                                                                                                                                                                                          |
|                        |   "deploy_status_code": null                                                                                                                                                                                                      |
|                        | }                                                                                                                                                                                                                                 |
| description            |                                                                                                                                                                                                                                   |
| links                  | http://192.0.2.1:8004/v1/775f5e4820b34b7b85661b7860b53770/stacks/overcloud-ControllerNodesPostDeployment-cz7l7gua3okt-ControllerServicesBaseDeployment_Step2-nbxjmajhgqre/ead5d48e-2098-4253-a2f5-1b71d722a6a5/resources/0 (self) |
|                        | http://192.0.2.1:8004/v1/775f5e4820b34b7b85661b7860b53770/stacks/overcloud-ControllerNodesPostDeployment-cz7l7gua3okt-ControllerServicesBaseDeployment_Step2-nbxjmajhgqre/ead5d48e-2098-4253-a2f5-1b71d722a6a5 (stack)            |
| logical_resource_id    | 0                                                                                                                                                                                                                                 |
| parent_resource        | ControllerServicesBaseDeployment_Step2                                                                                                                                                                                            |
| physical_resource_id   | 7bb6033e-ca90-420c-962c-35ec934ee044                                                                                                                                                                                              |
| required_by            |                                                                                                                                                                                                                                   |
| resource_name          | 0                                                                                                                                                                                                                                 |
| resource_status        | CREATE_COMPLETE                                                                                                                                                                                                                   |
| resource_status_reason | state changed                                                                                                                                                                                                                     |
| resource_type          | OS::Heat::StructuredDeployment                                                                                                                                                                                                    |
| updated_time           | 2015-06-24T06:39:38Z                                                                                                                                                                                                              |
+------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+

This is present on all SoftwareDeployment steps (and StructuredDeployment)


Version-Release number of selected component (if applicable):

os-collect-config-0.1.33-2.el7.noarch

How reproducible:

I can consistently reproduce it in my environment

Steps to Reproduce:
1. Do typical rdo-manager deployment
2. Find a SoftwareDeployment step
3. Do heat resource-show on it

Actual results:

Output is all null

Expected results:

The full output from puppet will be displayed

Additional info:

Comment 1 Steven Hardy 2015-06-25 13:10:36 UTC
Ok, I've reproduced this on upstream TripleO, and I can see that the deploy_* attributes are not accessible via the resource-show output.  

The information *is* however accessible via the deployment-show interface (IMO this is actually a preferable interface, because you only need the deployment ID and not the stack ID combined with the resource name):



    [shardy@localhost tripleo]$ heat resource-list -n5 overcloud | grep ControllerServicesBase
    | ControllerServicesBaseDeployment_Step2      | 5425c155-d688-4259-92f5-e9d6e8c542a8          | OS::Heat::StructuredDeployments                   | CREATE_COMPLETE | 2015-06-22T11:50:07Z | ControllerNodesPostDeployment               |
    | 0                                           | ec9fdb45-6c62-4ff6-9923-2dda51cb75f1          | OS::Heat::StructuredDeployment                    | CREATE_COMPLETE | 2015-06-22T11:50:51Z | ControllerServicesBaseDeployment_Step2      |

    [shardy@localhost tripleo]$ heat resource-show 5425c155-d688-4259-92f5-e9d6e8c542a8 0 | grep deploy_stdout
    |                        |   "deploy_stdout": null,                                                                                                                                                                                                          |
    [shardy@localhost tripleo]$ heat deployment-show ec9fdb45-6c62-4ff6-9923-2dda51cb75f1 | grep deploy_stdout
        "deploy_stdout": "\u001b[mNotice: Compiled catalog for overcloud-controller-0.localdomain in environment production in 3.41 seconds\u001b[0m\n\u001b[mNotice: /Stage[main]/Staging/File[/opt/staging]/ensure: created\u001b[0m\n\u001b[mNotice: /Stage[main]/Rabbitmq/Rabbitmq_plugin[rabbitmq_management]/ensure: created\u001b[0m\n\u001b[mNotice <snip>

I'll look into why the attributes are being output as null by heat, but for now I'd suggest using deployment-show as a workaround using the physical_resource_id of the OS::Heat::StructuredDeployment resource.

Note that for configs with group os-apply-config (e.g many of those applying hieradata rather than the manifests), the deploy_* values will be null via either interface until the fix for bz #1231970 lands.

Comment 2 Steven Hardy 2015-06-25 13:14:48 UTC
Reassigning to heat as I'm pretty sure it's not an os-collect-config issue (pending confirmation from Graeme that deployment-show works for him)

Comment 3 Graeme Gillies 2015-06-26 00:57:48 UTC
I can confirm that heat deployment-output-show is giving me the information, so just heat resource-show is the only one not working

Comment 4 Steve Baker 2015-06-30 21:50:03 UTC
I generally run the following to view the deployment log:

  heat deployment-output-show --format raw <deployment-uuid> deploy_stdout
  heat deployment-output-show --format raw <deployment-uuid> deploy_stderr

Once I've reproduced the lack of attributes in resource-show I'll raise a bug upstream.

Comment 5 Steven Hardy 2015-08-19 14:40:05 UTC
This is also a problem if you want to use the OS::Heat::SoftwareDeployments resource to gather data from a cluster-wide config via the deploy_stdouts attribute, which stays null even when stdout has been returned to the deployment.

Relatedly, the SoftwareDeployments (plural) resource doesn't support path based attributes, so it's impossible to access any output other than stdouts/stderrs/status_codes (even though they are all null), that probably warrants another bug tho.

Comment 6 Steven Hardy 2015-08-19 17:36:20 UTC
Actually disregard the deploy_stdouts part of comment#5 - on further investigation it is just the same issue as reported, and the get_attr part is working OK, it's just not visible via resource-show which makes the template debugging somewhat harder.

Comment 7 Chandan Kumar 2016-05-19 15:50:58 UTC
This bug is against a Version which has reached End of Life.
If it's still present in supported release (http://releases.openstack.org), please update Version and reopen.