Skip to content

Instantly share code, notes, and snippets.

View terriyu's full-sized avatar

Terri Yu terriyu

View GitHub Profile
@terriyu
terriyu / tox-fails-despite-patch.txt
Last active December 19, 2015 14:58
I cherry-picked this patch: https://review.openstack.org/#/c/33290/ , but my test still fails with "OperationFailure: database error: too much data for sort() with no index."
GLOB sdist-make: /opt/stack/ceilometer/setup.py
py27 inst-nodeps: /opt/stack/ceilometer/.tox/dist/ceilometer-2013.2.a161.g6ef0a97.zip
py27 runtests: commands[0]
WARNING:test command found but not installed in testenv
cmd: /bin/bash
env: /opt/stack/ceilometer/.tox/py27
Maybe forgot to specify a dependency?
+ set -e
+ bash tools/init_testr_if_needed.sh
+ python setup.py testr --slowest '--testr-args=--concurrency=1 --here=nova_tests tests.storage.test_impl_mongodb.RawSampleTest.test_get_samples_in_default_order'
@terriyu
terriyu / 1. After running tox, the indexes aren't there
Created July 11, 2013 06:13
Debugging the problem where indexes don't appear visible to get _samples() Go directly into MongoDB shell and ask it what indexes are available for db.meter
$ tox -e py27 -- tests.storage.test_impl_mongodb.RawSampleTest.test_get_samples_in_default_order
.
.
.
$ mongo
MongoDB shell version: 2.0.4
connecting to: test
> show dbs
ceilometer 0.453125GB
@terriyu
terriyu / connection-failure.txt
Last active December 19, 2015 14:59
I cherrypicked the patch here: https://review.openstack.org/#/c/33290/ , so that I could use a real MongoDB instance with my tests. Unfortunately, if I use the same port more than once ("29000" in the file below), then I get a connection error. My temporary hack is to edit the file run-tests.sh to use a different port for each tox run.
GLOB sdist-make: /opt/stack/ceilometer/setup.py
py27 inst-nodeps: /opt/stack/ceilometer/.tox/dist/ceilometer-2013.2.a161.g6ef0a97.zip
py27 runtests: commands[0]
WARNING:test command found but not installed in testenv
cmd: /bin/bash
env: /opt/stack/ceilometer/.tox/py27
Maybe forgot to specify a dependency?
+ set -e
+ bash tools/init_testr_if_needed.sh
+ python setup.py testr --slowest '--testr-args=--concurrency=1 --here=nova_tests tests.storage.test_impl_mongodb.RawSampleTest.test_get_samples_in_default_order'
@terriyu
terriyu / diary-10jul2013.md
Last active December 19, 2015 14:59
Journal for OpenStack Ceilometer work -- 10 Jul 2013

10 Jul 2013

Simultaneously viewing output on screen and saving it to file

  • A useful thing to do is to run a command and output stdout+stderr to screen while simultaneously writing the same stdout+stderr to a file.

    <command> 2>&1 | tee <file>
    
@terriyu
terriyu / diary-11jul2013.md
Last active December 19, 2015 16:08
Journal for OpenStack Ceilometer work -- 11 Jul 2013

11 Jul 2013

Ceilometer meeting

  • Everyone is trying to get work done for Havana-2

  • Attended and introduced myself as jd's intern. Made known my interest in learning how OpenStack can be used for science.

@terriyu
terriyu / libxslt-missing.txt
Last active December 19, 2015 17:18
When running tox for the first time after installing Ceilometer, I get an error: ERROR: /bin/sh: 1: xslt-config: not found ** make sure the development packages of libxml2 and libxslt are installed ** This was solved by installing dependencies via $ sudo apt-get install libxml2-dev libxslt1-dev
$ tox -e py27
GLOB sdist-make: /opt/stack/ceilometer/setup.py
py27 create: /opt/stack/ceilometer/.tox/py27
py27 installdeps: -r/opt/stack/ceilometer/requirements.txt, -r/opt/stack/ceilometer/test-requirements.txt
ERROR: invocation failed, logfile: /opt/stack/ceilometer/.tox/py27/log/py27-1.log
ERROR: actionid=py27
msg=getenv
cmdargs=[local('/opt/stack/ceilometer/.tox/py27/bin/pip'), 'install', '--download-cache=/opt/stack/ceilometer/.tox/_download', '-r/opt/stack/ceilometer/requirements.txt', '-r/opt/stack/ceilometer/test-requirements.txt']
env={'PYTHONIOENCODING': 'utf_8', 'OS_CACERT': '/opt/stack/data/CA/int-ca/ca-chain.pem', 'LESSOPEN': '| /usr/bin/lesspipe %s', 'SSH_CLIENT': '10.0.2.2 35512 22', 'LOGNAME': 'vagrant', 'USER': 'vagrant', 'OS_PASSWORD': 'nomoresecrete', 'PATH': '/opt/stack/ceilometer/.tox/py27/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/opt/vagrant_ruby/bin', 'EVENTLET_NO_GREENDNS': 'yes', 'DISPLAY': 'localhost:10.0', 'LANG': 'en_US.UTF-8', 'TERM': 'xterm', '
@terriyu
terriyu / diary-12jul2013.md
Last active December 19, 2015 19:09
Journal for OpenStack Ceilometer work -- 12 Jul 2013
@terriyu
terriyu / tox-connection-failure.txt
Last active December 19, 2015 19:09
I notice that I get a ConnectionFailure if I run a single test in tox, but I don't see the error if I run the entire test suite.
$ git checkout master
$ tox -e py27 -- tests.storage.test_impl_mongodb.RawSampleTest.test_get_samples_in_default_order
GLOB sdist-make: /opt/stack/ceilometer/setup.py
py27 inst-nodeps: /opt/stack/ceilometer/.tox/dist/ceilometer-2013.2.a209.g048c59c.zip
py27 runtests: commands[0] | bash -x /opt/stack/ceilometer/run-tests.sh tests.storage.test_impl_mongodb.RawSampleTest.test_get_samples_in_default_order
WARNING:test command found but not installed in testenv
cmd: /bin/bash
env: /opt/stack/ceilometer/.tox/py27
Maybe forgot to specify a dependency?
+ set -e
@terriyu
terriyu / no-sorting-error-create-index.txt
Last active December 19, 2015 19:18
If I create a timestamp index using create_index(), I successfully avoid sorting errors. (Other tests fail, but that's expected because I changed the test database without modifying the expected results.)
This file has been truncated, but you can view the full file.
$ tox -e py27
GLOB sdist-make: /opt/stack/ceilometer/setup.py
py27 inst-nodeps: /opt/stack/ceilometer/.tox/dist/ceilometer-2013.2.a211.gb778415.zip
py27 runtests: commands[0] | bash -x /opt/stack/ceilometer/run-tests.sh
WARNING:test command found but not installed in testenv
cmd: /bin/bash
env: /opt/stack/ceilometer/.tox/py27
Maybe forgot to specify a dependency?
+ set -e
+ bash tools/init_testr_if_needed.sh
@terriyu
terriyu / no-sorting-error-ensure-index.txt
Last active December 19, 2015 19:18
If I create a timestamp index using ensure_index(), I successfully avoid sorting errors. (Other tests fail, but that's expected because I changed the test database without modifying the expected results.)
$ tox -e py27
GLOB sdist-make: /opt/stack/ceilometer/setup.py
py27 inst-nodeps: /opt/stack/ceilometer/.tox/dist/ceilometer-2013.2.a211.gb778415.zip
py27 runtests: commands[0] | bash -x /opt/stack/ceilometer/run-tests.sh
WARNING:test command found but not installed in testenv
cmd: /bin/bash
env: /opt/stack/ceilometer/.tox/py27
Maybe forgot to specify a dependency?
+ set -e
+ bash tools/init_testr_if_needed.sh