Heat logs too big

Bug #1499330 reported by Derek Higgins
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Heat
Fix Released
High
Steve Baker
tripleo
Fix Released
High
Unassigned

Bug Description

On the tripleo HA jobs at the moment the undercloud tarball artifact is coming in around 26MB

From the looks of it the majority of this is comming from heat-engine.log and the journal log (which contains the same heat-engine log entries in it in a binary non zip friendly format)

We have 100's of 1000's of log entries of the format

Sep 24 07:24:21 instack.localdomain heat-engine[10240]: 2015-09-24 06:24:21.089 10240 INFO heat.engine.environment [-] Registering OS::TripleO::CephClusterConfig::SoftwareConfig -> file:///usr/share/openstack-tr

JOBLOGS ]$ ls -lh heat/heat-engine.log journal/dae72fe0cc064eb0b7797f25bfaf69df/system*
-rw-r--r--. 1 derekh derekh 65M Sep 24 07:53 heat/heat-engine.log
-rw-r-----. 1 derekh derekh 128M Sep 24 07:24 journal/dae72fe0cc064eb0b7797f25bfaf69df/system@c1bc0754cbcc4c89bee2d499e09610e0-0000000000000001-000520775d91ac90.journal
-rw-r-----. 1 derekh derekh 128M Sep 24 07:39 journal/dae72fe0cc064eb0b7797f25bfaf69df/system@c1bc0754cbcc4c89bee2d499e09610e0-0000000000023fbf-0005207847f9f68c.journal
-rw-r-----. 1 derekh derekh 120M Sep 24 07:54 journal/dae72fe0cc064eb0b7797f25bfaf69df/system.journal

JOBLOGS ]$ wc heat/heat-engine.log
  302099 3328855 67386843 heat/heat-engine.log

JOBLOGS ]$ journalctl --file ./journal/dae72fe0cc064eb0b7797f25bfaf69df/system@c1bc0754cbcc4c89bee2d499e09610e0-0000000000000001-000520775d91ac90.journal --file ./journal/dae72fe0cc064eb0b7797f25bfaf69df/system@c1bc0754cbcc4c89bee2d499e09610e0-0000000000023fbf-0005207847f9f68c.journal --file journal/dae72fe0cc064eb0b7797f25bfaf69df/system.journal -u openstack-heat-engine | wc
 178398 2854476 49832178

This a far too verbose and as far as I can see most of the log entries are repeating themselves, the quantity of data need to be reduced.

Revision history for this message
Steven Hardy (shardy) wrote :

I think the issue is we should only ever dump the " Registering foo" data on create or update, only for the parent stack, but I think we're doing it for all nested stacks and/or all other API requests, hence all the duplication.

Changed in heat:
status: New → Triaged
importance: Undecided → High
assignee: nobody → Steven Hardy (shardy)
milestone: none → mitaka-1
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to heat (master)

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

Changed in heat:
status: Triaged → In Progress
Revision history for this message
Steven Hardy (shardy) wrote :

I tagged this liberty-rc-potential for Heat - it's not a release blocker, but IMO it's worth considering if we have other reasons for an rc2 - it's reduced the TripleO CI logs to 0.5% of their previous size, so should have similarly worthwhile reductions in noise for all users logging at INFO or DEBUG levels.

tags: added: liberty-rc-potential tripleo
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to heat (master)

Reviewed: https://review.openstack.org/227441
Committed: https://git.openstack.org/cgit/openstack/heat/commit/?id=5d6234ecf64650b0eb7bd92eb530e899ff061457
Submitter: Jenkins
Branch: master

commit 5d6234ecf64650b0eb7bd92eb530e899ff061457
Author: Steven Hardy <email address hidden>
Date: Thu Sep 24 18:41:34 2015 +0100

    Reduce frequency of logging environment resources

    Currently we log all template resources every time any API call
    happens which indirectly creates an Environment object, which
    results in a lot of duplicate bloat in the heat logs (not even
    at debug level..)

    So, instead log all environment resources (e.g those from resource
    plugins and the global environment) only when we start the
    service, and log user-provided template resources only when we
    do the template validation on create/update, for only the root stack,
    because we pass a derived subset environment down to all children.

    We also switch to using the string representation of the ResourceInfo
    objects, as this contains a bit more useful info than the current
    log format.

    Change-Id: I20007c1ad6bf8b1479c1d60a5c392b8b9e1c06c4
    Closes-Bug: #1499330

Changed in heat:
status: In Progress → Fix Committed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to heat (stable/liberty)

Fix proposed to branch: stable/liberty
Review: https://review.openstack.org/231276

Thierry Carrez (ttx)
no longer affects: heat/mitaka
no longer affects: heat/liberty
Changed in heat:
status: In Progress → Fix Committed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to heat (stable/liberty)

Reviewed: https://review.openstack.org/231276
Committed: https://git.openstack.org/cgit/openstack/heat/commit/?id=182034904f7da306c677e77c880a6266b1b5cd50
Submitter: Jenkins
Branch: stable/liberty

commit 182034904f7da306c677e77c880a6266b1b5cd50
Author: Steven Hardy <email address hidden>
Date: Thu Sep 24 18:41:34 2015 +0100

    Reduce frequency of logging environment resources

    Currently we log all template resources every time any API call
    happens which indirectly creates an Environment object, which
    results in a lot of duplicate bloat in the heat logs (not even
    at debug level..)

    So, instead log all environment resources (e.g those from resource
    plugins and the global environment) only when we start the
    service, and log user-provided template resources only when we
    do the template validation on create/update, for only the root stack,
    because we pass a derived subset environment down to all children.

    We also switch to using the string representation of the ResourceInfo
    objects, as this contains a bit more useful info than the current
    log format.

    Change-Id: I20007c1ad6bf8b1479c1d60a5c392b8b9e1c06c4
    Closes-Bug: #1499330
    (cherry picked from commit 5d6234ecf64650b0eb7bd92eb530e899ff061457)

tags: added: in-stable-liberty
Thierry Carrez (ttx)
Changed in heat:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in heat:
milestone: liberty-rc2 → 5.0.0
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to heat (master)

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

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to heat (master)
Download full text (9.5 KiB)

Reviewed: https://review.openstack.org/235237
Committed: https://git.openstack.org/cgit/openstack/heat/commit/?id=4bf298763005b4b8e0c9c8d64ad7ad0863405b50
Submitter: Jenkins
Branch: master

commit 4348b7ababd1048e17ec354ca38c903c908cd74e
Author: Steve Baker <email address hidden>
Date: Tue Oct 6 12:54:24 2015 +1300

    Do no net/subnet checks during validate

    Currently validation fails if the network or the subnet are defined in
    the same template as the server because they don't exist during
    validate.

    _validate_belonging_subnet_to_net is called during _build_nics so this
    check still happens when the required resources actually exist.

    Also, test method validate_internal_port_subnet_not_this_network was not
    running because its name was not prefixed with test_. Fixing and
    updating this test revealed issues with the validation failed message.

    Closes-Bug: #1503060
    Change-Id: I2e062abf5b9fb7446b979ba6acc2e2b531d957d6

commit 7e911cec083e98f344bfcfeb7e2e843ce2330d5d
Author: Pratik Mallya <email address hidden>
Date: Mon Oct 5 00:34:12 2015 -0500

    Correctly filter events on resource name

    Filtering on resource name can be accomplished by using the db
    filters instead of using a filter method. Furthermore, using a
    custom filter breaks certain assumptions made by other parts of
    the codebase, which lead to pagination being broken.
    Specifically, custom filter for resource name is applied only
    after other filtering is finished. As a result, we try to find
    result from only 1 event and this event belongs to whole
    stack and thus its resource_name is equal to the stack name.
    This returns an event not found error instead of returning
    the first event assosciated with the resource name.

    Change-Id: Ie7d28ffb88a79d6e0f516f0db385be2eed59f7f0
    Closes-Bug: #1502751
    (cherry picked from commit 6322ff6fceabdfa226e5359328bde292d189e703)

commit fecc2bacb51c7dabdb83b87313df48dea527feae
Author: Pratik Mallya <email address hidden>
Date: Thu Oct 1 17:41:09 2015 -0500

    Check if os-interface extension is present before saving ports

    If that extension is not present, then the code to extract and
    save ports created during server create by nova will fail.

    Change-Id: I6008a0da0c16a34c40e343af4e7237520db4ae36
    Closes-Bug: #1499877
    (cherry picked from commit 46d8c276b70e7698438988faa9d997577a7e1750)

commit 6c3fa4e25d3e35adf53ad1e80d5455bf9f7a924a
Author: Peter Razumovsky <email address hidden>
Date: Mon Sep 14 17:43:49 2015 +0300

    Fix translating for props with get_param value

    If some map or list type properties specified with
    json-type or commadelimitedlist parameters, error
    raised in case of wrong properties data parsing.
    Fix this case by adding check if data is GetParam
    instance, resolve it. Other function can be safely
    replaced without resolve.

    Change-Id: I0c9a6af29b56b629cbdad2acb868c3033e38b5ef
    Closes-bug: #1494364
    (cherry picked from commit aea59ecdac6ed6635125eb2064554140e3e645fc)

commit 8810a28a9016b3bfa515fc11efd5f5dfa103b380
Author: OpenStack Propos...

Read more...

Revision history for this message
Steven Hardy (shardy) wrote :

This is fixed in heat, I think we can close the TripleO part of this now?

Revision history for this message
Derek Higgins (derekh) wrote :

Yes, the issue this was opened against is now gone. thanks.

Changed in tripleo:
status: Triaged → Fix Released
Revision history for this message
Thierry Carrez (ttx) wrote : Fix included in openstack/heat 6.0.0.0b1

This issue was fixed in the openstack/heat 6.0.0.0b1 development milestone.

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.