[Ovirt-devel] [PATCH] Test System Updates
Mohammed Morsi
mmorsi at redhat.com
Thu Jul 24 15:40:55 UTC 2008
Perry N. Myers wrote:
> Mohammed Morsi wrote:
>> 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.
From what I can tell (unless this has changed w/ the latest patch,
which I thought it didn't) the creation of the appliance on the host
side is synchronous, but when the appliance starts up (eg build all says
'run virt-viewer to view output') and Fedora being installed, the
build-all command returns. I need to wait until this install process is
a 100% complete, before continuing and thus the loop is neccessary (once
again, basing this on what I observed, correct me if I am wrong).
>
>> +
>> +# 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 ssh test is a good idea, sounds like it might even mitigate the need
for the sleep.
>
>> +
>> +# 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?
I meant to just include curl to test that the appliance wui was running,
I must've forgot to remove the AutoBuild stuff.
>
> Perry
>
Mo
More information about the ovirt-devel
mailing list