Skip to content

Instantly share code, notes, and snippets.

@terriyu
Last active December 20, 2015 07:08
Show Gist options
  • Select an option

  • Save terriyu/6090595 to your computer and use it in GitHub Desktop.

Select an option

Save terriyu/6090595 to your computer and use it in GitHub Desktop.
Journal for OpenStack Ceilometer work -- 23 Jul 2013

23 Jul 2013

Code review

I was in the process of reviewing the patch https://review.openstack.org/#/c/38275/ which fixes the bug I reported https://bugs.launchpad.net/ceilometer/+bug/1193165 about errors in the Ceilometer documentation due to the change from nose to testr. But the patch was merged before I could submit my code review. I verified the config_dir errors (mentioned by Gordon Chung) that occur when $ tox -e py27 -- api.v2 is run.

Pulled down new changes in Ceilometer

I pulled down the latest changes in Ceilometer and rebuilt the testing environment with

$ tox -r -e py27,pep8

However, there's an error when it tries to install the package xattr. It needs the dependency libffi-dev, which I installed using

$ sudo apt-get install libffi-dev 

This appeared to fix the error. Later, I found out that this bug has been reported https://bugs.launchpad.net/openstack-ci/+bug/1203198

Sort error bug

This is the sort error bug I was working on before https://bugs.launchpad.net/ceilometer/+bug/1193906. The patch I submitted, which was merged: https://review.openstack.org/#/c/36159/

Since some time had passed, I was curious if the connection errors I had previously had been resolved. Example of such a connection error: https://gist.github.com/terriyu/6004283

Checking for connection errors

Ran tox 4 times on single test and didn't get any connection errors. This is the test I ran:

$ tox -e py27 -- tests.storage.test_impl_mongodb.RawSampleTest.test_get_samples_in_default_order

Triggering sort error for large database

Out of curiosity, I also tried to see if I could get MongoDB to throw a sorting error if I force it to sort on a large database without an index. On 15 Jul 2013, I noted that, after recent changes to the Ceilometer codebase, I wasn't able to get MongoDB to throw the sorting error anymore.

The good news is that I did get it to throw the sorting error again and at database sizes that were consistent with my previous studies -- see the table in https://gist.github.com/terriyu/5954419

My test command was:

$ tox -e py27 -- tests.storage.test_impl_mongodb.RawSampleTest.test_get_samples_in_default_order

If I make the test database 12000 times larger, I don't get any sorting error. The test takes 256.869 sec to run, which is roughly consistent with my previous time of 240.318 sec. See tox output: https://gist.github.com/terriyu/6090520

If I make the test database 15000 times larger, I do get a sorting error and it takes 320.696 sec to run, which is roughly consistent with my previous time of 291.161 sec. See tox output: https://gist.github.com/terriyu/6090521

jd's patch to force execution to wait merged

jd thinks that my test was fixed because his patch "Disable mongod prealloc, wait for it to start" was merged: https://review.openstack.org/#/c/37105/

The patch forces execution of the tests to wait until MongoDB is ready. jd's commit message:

No prealloc should make mongod starts faster, and the while loop will wait it is listening before running the tests.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment