The throttle implementation for ceph can be unit tested using threads when it needs to block. The gtest framework produces coverage information to lcov showing that 100% of the lines of code are covered.
Continue reading “unit testing ceph : the Throttle.cc example”
ceph code coverage (part 2/2)
WARNING: teuthology has changed significantly, the instructions won’t work anymore.
When running ceph integration tests with teuthology, code coverage reports shows which lines of code were involved. Adding coverage: true to the integration task and using code compiled for code coverage instrumentation with flavor: gcov collects coverage data. lcov is then used
./virtualenv/bin/teuthology-coverage -v --html-output /tmp/html ...
to create an HTML report. It shows that lines 217 and 218 of mon/Monitor.cc are not being used by the scenario.
Installing OpenStack Folsom on Debian GNU/Linux wheezy
Installing and testing OpenStack Folsom on a virgin Debian GNU/Linux wheezy takes less than one hour. A set of packages is archived to make sure it keeps working. After checking the pre-requisites such as a public and private interface, the packages are installed and debconf questions answered as instructed.
The networks must then be created with
nova-manage network create private --fixed_range_v4=10.20.0.0/16 \ --network_size=256 --num_networks=2 --vlan=100
/etc/nova/nova.conf is updated to set vlan_interface=dummy0, public_interface=eth0 and fixed_range=10.20.0.0/16. /etc/nova/nova-compute.conf is updated to use LibvirtBridgeDriver and an instance can be booted with:
nova boot --poll --flavor m1.tiny --image cirrOS-0.3.0-x86_64 \ --key_name loic test
Continue reading “Installing OpenStack Folsom on Debian GNU/Linux wheezy”
ceph code coverage (part 1/2)
The ceph sources are compiled with code coverage enabled
root@ceph:/srv/ceph# ./configure --with-debug CFLAGS='-g' CXXFLAGS='-g' \ --enable-coverage \ --disable-silent-rules
and the tests are run
cd src ; make check-coverage
to create the HTML report which shows where tests could improve code coverage:
Continue reading “ceph code coverage (part 1/2)”
gerrit with jenkins : installation and configuration
The review and project management for Git based projects is installed on a virgin Debian GNU/Linux wheezy. Developers of l2mesh must submit patchs to the git repository to gerrit:
$ git review remote: Resolving deltas: 100% (1/1) remote: Processing changes: new: 1, done To ssh://loic@gerrit.the.re:29418/l2mesh * [new branch] HEAD -> refs/publish/master/master
Gerrit is bound to jenkins : it will run tests on the patch to be reviewed and let gerrit know if it succeeds. If a developer reviews the patch positively, it can be merged into the repository.
Continue reading “gerrit with jenkins : installation and configuration”
rsnapshot puppet module
puppet-rsnapshot is a rsnapshot puppet module published on the puppet forge under the name loic/rsnapshot. It is based on the following assumptions:
- All machines have rsync over ssh
- All backups consist of the entire file system of the machine
- It takes less than two hours to backup all machines