[Ovirt-devel] [PATCH] Test System Updates
Perry N. Myers
pmyers at redhat.com
Thu Jul 24 15:16:23 UTC 2008
Mohammed Morsi wrote:
> Alan Pevec wrote:
>>> + # delete previous appliance, restart libvirt
>>> + rm -f /etc/libvirt/qemu/ovirt-appliance.xml
>>> + rm -f /var/lib/libvirt/images/ovirt-appliance.img
>>> + /sbin/service libvirtd restart
>> drop those lines, create-wui-appliance.sh takes care of that via virsh
>> (thou shalt never mess w/ implementation details like
>> /etc/libvirt/qemu/*xml)
>>
>>> +cat > /root/.ssh/authorized_keys2 << \EOF
>>
>> authorized_keys w/o 2
>>
>>> +mkdir /etc/auto-build.d/
>>
>> mkdir -p
>> otherwise you get in kickstart-post.log:
>> mkdir: cannot create directory `/etc/auto-build.d/': File exists
>>
> Took these fixes, and our discussion about how the 2nd stage autobuild
> is unnecessary and came up with a simpler autobuild script / kickstart
> that runs the 2nd stage tests (eg site accessibility and rake tests)
> through ssh. When testing this, I noticed some of the rake tests failed,
> I believe it due to recent code changes, and will look at resolving them
> once this autobuild stuff is committed. In addition to the rrd test data
> generation and usage code in the patched, I began looking into how we
> can add some test data to the rh-dirsrv ldap server running on the ovirt
> wui appliance. I'm not a 100% sure yet, but I might be able to add a
> ldif file with test data to the appliance via a kickstart script and
> then configure the server / ovirt to use a path that points to it.
>
> -Mo
>
>
Comments inline... I think Alan has made some of these comments already,
but just to make sure...
> -#run tests
> -cd wui/src/
> -rake db:migrate
> -rake test
> +echo "Running oVirt Autobuild"
> +
> +# create appliance
> +./build-all.sh -ac
With Alan's changes to build-all, pungi no longer init's by default. I
think we should init manually once on harpoon, and then do:
./build-all.sh -acp update
to update pungi for each run.
> +
> +while : ; do
> + status=`virsh domstate ovirt-appliance`
> + if [ -f /etc/libvirt/qemu/ovirt-appliance.xml -a "$status" = "shut off" ]; then
> + break
> + fi
> + sleep 10
> +done
No need for a loop here since with Alan's patch appliance creation is
synchronous.
> +
> +# start appliance
> +virsh start ovirt-appliance
> +
> +# wait until started
> +sleep 180
Hmm. Sleep 180 is fine for an initial wait (since we know it'll be a few
minutes for the appliance to come up) but below you just immediately start
ssh'ing into the appliance. Instead, do a looping ssh test after the
sleep. Once the ssh test succeeds, then continue on with the rest of the
script.
> +
> +# the appliance's ssh key changed
> +rm -f /root/.ssh/known_hosts
In your ssh commands below, just use:
SSH_OPTS="-o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null"
This way you don't need to muck with root known_hosts file.
> +
> +echo "Running the wui tests"
> +ssh root at 192.168.50.2 "curl -i --negotiate -u : management.priv.ovirt.org/ovirt/ | grep \"HTTP/1.1 200 OK\" && \
> + cd /usr/share/ovirt-wui/ && rake test"
> diff --git a/wui-appliance/common-pkgs.ks b/wui-appliance/common-pkgs.ks
> index 34546a7..d694332 100644
> --- a/wui-appliance/common-pkgs.ks
> +++ b/wui-appliance/common-pkgs.ks
> @@ -21,4 +21,7 @@ xorg-x11-xauth
> virt-viewer
> cobbler
> bind-utils
> -
> +perl-Test-AutoBuild
> +perl-Test-AutoBuild-git
> +perl-Class-MethodMaker
> +curl
If 2nd stage autobuild is unnecessary on the appliance, why are these
packages still in the appliance kickstart?
Perry
More information about the ovirt-devel
mailing list