Welcome to the Free Software contributions diary of Loïc Dachary. Although the posts look like blog entries, they really are technical reports about the work done during the day. They are meant to be used as a reference by co-developers and managers.
WARNING: UPDATE IN PROGRESS
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.

Continue reading →
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 →
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 →
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 →
Posted in gerrit, jenkins
|
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
Continue reading →
An OpenVPN client routes 192.168.2.0/24.
root@controller:~# ip route show 192.168.2.0/24
192.168.2.0/24 via 192.168.0.21 dev tun0
When the OpenVPN client is down, IP in the 192.168.2.0/24 network will be cached to go thru the default route instead:
root@controller:~# ip route show cache 192.168.2.42
192.168.2.42 via 10.145.4.4 dev eth0 src 10.145.4.5
When the OpenVPN client is back, the cache needs to be flushed to prevent temporary incorrect routing.
root@controller:~# ip route flush cache
Continue reading →
April hosts dozens of services on less than ten hardware machines and less than fifty virtual machines. Their configuration is centralized in a puppet master repository. The order of magnitude is not expected to change in the next few years. The hierarchy is organized in manifests and modules. The manifests directory contains the inventory of all virtual machines and bare metal associated with the inclusion of classes and the instantiation of types.
node 'harmine.pavot.vm.april-int',
'backuppc.novalocal' inherits vserver-pavot {
include backuppc::server
include april_nagios::nrpe_server
include april_nagios::check_backuppc
}
The modules contain the configuration logic for a sub system such as backuppc, screen or ssh.
class screen {
package { 'screen': ensure => present, }
file { '/root/.screenrc':
ensure => present,
owner => 'root',
group => 'root',
mode => 0400,
replace => true,
source => 'puppet:///screen/.screenrc',
}
}
Continue reading →
An integration test is run by jenkins within an OpenStack tenant. It checks that the backuppc puppet module is installed
ssh root@$instance test -f /etc/backuppc/hosts || return 3
A full backup is run
ssh root@$instance su -c '"/usr/share/backuppc/bin/BackupPC_serverMesg \
backup nagios.novalocal nagios.novalocal backuppc 1"' \
backuppc || return 4
ssh root@$instance tail -f /var/lib/backuppc/pc/nagios.novalocal/LOG.* | \
sed --unbuffered -e "s/^/$instance: /" -e '/full backup 0 complete/q'
and a nagios plugin asserts its status is monitored
while ! ( echo "GET services"
echo "Filter: host_alias = $instance.novalocal"
echo "Filter: check_command = check_nrpe_1arg"'!'"check_backuppc" ) |
ssh root@nagios unixcat /var/lib/nagios3/rw/live |
grep "BACKUPPC OK - (0/" ; do
sleep 1
done
Continue reading →
This document explains the nagios configuration for the infrastructure of the April non profit organisation.
It is used to configure the nagios server overseeing all the services. The nagios plugins that cannot be run from the server ( such as check_oom_killer ) are installed locally and connected to nagios with nrpe. All services are bound to private IPs within the 192.168.0.0/16 network and exposed to the nagios server ( using OpenVPN to connect bare metal machines together ) and the firewalls are set to allow TCP on the nrpe port ( 5666 ).
Continue reading →
Posted in Essex, openstack
|
A OpenVZ cluster hosts GNU/Linux based virtual machines. The disk is extracted with rsync and uploaded to the glance OpenStack image service with glance add … disk_format=ami…. It is associated with a kernel image compatible with both OpenStack and the existing file system with glance update … kernel_id=0dfff976-1f55-4184-954c-a111f4a28eef ramdisk_id=aa87c84c-d3be-41d0-a272-0b4a85801a34 ….
Continue reading →
Posted in Essex, openstack
|