Ceilometer dbsync command timeout in 3600 seconds with mysql

Bug #1389111 reported by Lan Qi song
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack + Chef
Fix Released
Medium
Lan Qi song

Bug Description

When executing the ceilometer cookbook at this line:
https://github.com/stackforge/cookbook-openstack-telemetry/blob/master/recipes/collector.rb#L28

The error "ERROR: execute[database migration] (openstack-telemetry::collector line 28) had an error: Mixlib::ShellOut::CommandTimeout: Command timed out after 3600s" may be occurred.

It is only happened when there are large data in ceilometer database, and the chef "execute" provider 's default timeout is "3600" second.

In my case:
mysql> select count(*) from sample;
+----------+
| count(*) |
+----------+
| 45155 |
+----------+
1 row in set (0.21 sec)

mysql> select count(*) from resource;
+----------+
| count(*) |
+----------+
| 26723 |
+----------+
1 row in set (1.00 sec)

And I found that the following step spend too long when doing ceilometer dbsync :
https://github.com/openstack/ceilometer/blob/master/ceilometer/storage/sqlalchemy/migrate_repo/versions/038_normalise_tables.py#L94-102

I think when executing the "ceilometer dbsync" command the timeout parameter should be expand or it could be an optional parameter in cookbook.

Lan Qi song (lqslan)
tags: added: cookbook-openstack-telemetry
summary: - Ceilometer dbsync command timeout in 3600 seconds
+ Ceilometer dbsync command timeout in 3600 seconds with mysql
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to cookbook-openstack-telemetry (master)

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

Changed in openstack-chef:
assignee: nobody → Lan Qi song (lqslan)
status: New → In Progress
Revision history for this message
Jun Hong Li (junhongl) wrote :

And I think there should be a bug open to ceilometer to enhance the data migration process.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to cookbook-openstack-telemetry (master)

Reviewed: https://review.openstack.org/132745
Committed: https://git.openstack.org/cgit/stackforge/cookbook-openstack-telemetry/commit/?id=2d36ef461f83adbc50a2d8aeece067a4514eacdd
Submitter: Jenkins
Branch: master

commit 2d36ef461f83adbc50a2d8aeece067a4514eacdd
Author: lqslan <email address hidden>
Date: Wed Nov 5 11:16:17 2014 +0800

    Make ceilometer dbsync command timeout to be an optional parameter

    The default dbsync command timeout value 3600 seconds may be too small
    when there are large data in ceilometer database.
    Make timeout to be optional to fix this problem.

    Change-Id: Id4e703fab260f8e010ff089e4134e7aab8e21fd2
    Closes-bug: #1389111

Changed in openstack-chef:
status: In Progress → Fix Released
Revision history for this message
Mark Vanderwiel (vanderwl) wrote :

This issue can also happen with compute and network cookbooks, adding patches for those as well.

Changed in openstack-chef:
importance: Undecided → Medium
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix proposed to cookbook-openstack-compute (master)

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

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix proposed to cookbook-openstack-network (master)

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

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix merged to cookbook-openstack-compute (master)

Reviewed: https://review.openstack.org/136444
Committed: https://git.openstack.org/cgit/stackforge/cookbook-openstack-compute/commit/?id=5de0025c53ca594d299bf3cff1835e41723b66b9
Submitter: Jenkins
Branch: master

commit 5de0025c53ca594d299bf3cff1835e41723b66b9
Author: Mark Vanderwiel <email address hidden>
Date: Fri Nov 21 12:18:21 2014 -0600

    Make compute dbsync command timeout to be an optional parameter

    The default dbsync command timeout value 3600 seconds may be too small
    when there are large data in compute database.
    Make timeout to be optional to fix this problem.

    Change-Id: I1ca4c594da34134aa3807fca753b955ed0b239bd
    Related-Bug: #1389111

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix merged to cookbook-openstack-network (master)

Reviewed: https://review.openstack.org/136449
Committed: https://git.openstack.org/cgit/stackforge/cookbook-openstack-network/commit/?id=d1dc9a8532e9c3d51d526b86b4500637c70a1b7c
Submitter: Jenkins
Branch: master

commit d1dc9a8532e9c3d51d526b86b4500637c70a1b7c
Author: Mark Vanderwiel <email address hidden>
Date: Fri Nov 21 12:20:43 2014 -0600

    Make network dbsync command timeout to be an optional parameter

    The default dbsync command timeout value 3600 seconds may be too small
    when there are large data in network database.
    Make timeout to be optional to fix this problem.

    Change-Id: Ifd8983b37ef74825949ff634e7f95a2d6c9f7866
    Related-Bug: #1389111

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.