People asking me about my code\test cycle so I decided to just have a small writeup on the list.
Always test on latest stable fedora and RHEL, put yum upgrade -y as a nightly cron command!
My development storage is a FreeNAS VM (But I will be moving to f17+lio when I find the time to configure everything and they implement CHAP auth)
For things that have to be tested with a full blown VDSM install I have a script* that pulls from my git HEAD and installs it on the host. I don't use rsync because the timestamps confuse Make and might cause my local fedora files to be packaged by mistake. I also delete the RPMs and clean install new ones each time. It takes longer and invokes a libvirt reconfigure each time but it caches a lot of elusive errors that QE often miss.
Always use yum! The rpm command is much less robust.
This script is meant to work on EL\Fedora that just has git and multipath installed, and a cloned repo in which your development machine is the origin.
Also note I explicitly clean "/usr/share/vdsm" because locally changed files don't have the same MD5 hash and might not be removed\replaced by yum.
It takes quite a while but it just makes writing unit tests that much more appealing :)
Make sure you have sudo rights to the appropriate commands
I hope people find this helpful.
-----------------------
#!/bin/bash # Get git root PROJ_GIT_DIR=$(git rev-parse --git-dir | xargs dirname | xargs readlink -f) pushd $PROJ_GIT_DIR .
# Make sure autotools and other basic dependencies are installed sudo yum install -y automake autoconf gcc rpm-build pyflakes
# Fetch remote head git co HEAD~ &> /dev/null git fetch -f origin HEAD:testhead git co testhead
# Remove old RPMs rm -rvf ~/rpmbuild
# Build ./autogen.sh --system ./configure
# Install build requirements grep BuildRequires vdsm.spec | awk {'print $2'} | \ xargs sudo yum install -y
make clean make rpm || exit 1
# Stop VDSM sudo /sbin/service vdsmd stop
# Clean RPMs rpm -qa | grep vdsm | xargs sudo yum remove -y # Clean any local edits sudo rm -rf /usr/share/vdsm
# Install new RPMs ls ~/rpmbuild/RPMS/*/*.rpm | grep -v faqemu | grep -v hook | grep -v reg | \ grep -v bootstrap | xargs sudo yum localinstall --nogpgcheck -y
popd
# Start VDSM sudo /sbin/service vdsmd start # VDSM has a long standing issues with reporting OK on start when it's actually # down service vdsmd status
vdsm-devel@lists.fedorahosted.org