[libvirt] [libvirt-jenkins-ci PATCH 3/5] ansible: Add unattended installation support

Andrea Bolognani abologna at redhat.com
Tue Oct 17 16:24:47 UTC 2017

On Tue, 2017-10-17 at 17:57 +0200, Pavel Hrdina wrote:
> I wouldn't include Ubuntu related things.  Yes, we use travis where they
> have Ubuntu nodes, but this is jenkins-ci repository where we don't use
> Ubuntu at all.

While a sane CI setup is definitely the primary reason why this work
is happening, a secondary goal is making it possible for (potential)
developers to ensure portability and debug build issues on platforms
that they don't already have easy access to. The overlap between the
two goals is basically 99% anyway.

Moreover, if some build job fails on Travis, it would be nice to
quickly reproduce the failure locally[1] instead of doing multiple
round-trips to Travis. So I vote for keeping the Ubuntu bits,
especially considering that the overhead is literally 9 lines :)

> > +install_disk_size: 10
> Currently we have 15 GiB per guest and in some cases we are able to run
> out of space.  Let's use 15 GiB.


> > +    case "$INSTALL_CONFIG" in
> > +        *kickstart*|*ks*) EXTRA_ARGS="ks=file:/${INSTALL_CONFIG##*/}" ;;
> > +    esac
> I would add "console=ttyS0" into EXTRA_ARGS to get serial console
> working.

I prefer serial console to graphical console too, but for some reason
I thought that would not be appropriate for the CI setup... Guess I
should just have asked ;)

> > +        --ram "$INSTALL_MEMORY_SIZE" \
> Don't use --ram, that is deprecated, --memory should be used instead.

TIL! Consider it done.

> > +        --disk "size=$INSTALL_DISK_SIZE,pool=$INSTALL_STORAGE_POOL,bus=virtio" \
> > +        --network "network=$INSTALL_NETWORK,model=virtio" \
> > +        --initrd-inject "$INSTALL_CONFIG" \
> > +        --extra-args "$EXTRA_ARGS"
> and we might add:
>     --cpu host-passthrough  // we will not migrate the guest
>     --graphics none         // we use only ssh to the CI host
>     --serial pty            // if something is really wrong with the guest
>     --autostart

These all look sensible, I'll add them.

[1] I almost had a success story I could use to prove my point today:
    Martin ran into a Travis build failure while testing out some new
    stuff, and thanks to the Ubuntu configs we were able to bring up
    a fully-configured Ubuntu 14.04 guest in around 10 minutes.
    Unfortunately the failure ended up not reproducing in the guest,
    which is quite annoying and something that requires more
    investigation, but the point about the usefulness of having this
    ability still stands IMHO.
Andrea Bolognani / Red Hat / Virtualization

More information about the libvir-list mailing list