[libvirt] debugging daemon-conf failure

Daniel P. Berrange berrange at redhat.com
Fri Mar 5 12:50:40 UTC 2010


On Wed, Mar 03, 2010 at 06:20:31PM -0500, Eric Blake wrote:
> ----- "Jim Meyering" <jim at meyering.net> wrote:
> 
> > Eric Blake wrote:
> > > Ever since I first started playing with libvirt last month, 'make
> > check'
> > > has been failing for me on the same test:
> > >
> > > $ VIR_TEST_DEBUG=2 make -C tests check TESTS=daemon-conf
> > 
> > What type of system are you using?
> 
> This is on a machine that is 4 years old, running F12.
> $ uname -a
> Linux eblake 2.6.31.12-174.2.22.fc12.i686 #1 SMP Fri Feb 19 19:26:06 UTC 2010 i686 i686 i386 GNU/Linux
> 
> > Parts of that test are a little obscure-looking (you can probably
> > blame
> > me for that).  It starts with the sample config file and iterates
> > through it corrupting one line at a time.  If running libvirtd with
> > each resulting corrupted config file does not yield the expected
> > result,
> > its a failure.
> > 
> > A good place to start would be to save one of the failing config
> > files and to invoke libvirtd manually to see exactly what it's
> > printing and thus get a hint as to why the expected diagnostic is
> > missing.
> 
> Or even trying to run successfully.  I created the following tmp.conf:
> 
> listen_tls = 0
> listen_tcp = 1
> tls_port = "16514"
> tcp_port = "16509"
> listen_addr = "192.168.0.1"
> mdns_adv = 0
> mdns_name = "Virtualization Host Joe Demo"
> unix_sock_group = "libvirt"
> unix_sock_ro_perms = "0777"
> unix_sock_rw_perms = "0770"
> unix_sock_dir = "/home/eblake/libvirt"
> auth_unix_ro = "none"
> auth_unix_rw = "none"
> auth_tcp = "sasl"
> auth_tls = "none"
> key_file = "/etc/pki/libvirt/private/serverkey.pem"
> cert_file = "/etc/pki/libvirt/servercert.pem"
> ca_file = "/etc/pki/CA/cacert.pem"
> crl_file = "/etc/pki/CA/crl.pem"
> tls_no_verify_certificate = 1
> tls_allowed_dn_list = ["DN1", "DN2"]
> sasl_allowed_username_list = ["joe at EXAMPLE.COM", "fred at EXAMPLE.COM" ]
> max_clients = 20
> min_workers = 5
> max_workers = 20
> max_requests = 20
> max_client_requests = 5
> log_level = 3
> 
> 
> then ran:
> 
> $ daemon/libvirtd --pid-file=pid-file --config=tmp.conf
> 16:17:16.754: error : remoteConfigGetAuth:2564 : remoteReadConfigFile: tmp.conf: auth_tcp: unsupported auth sasl
> 
> 
> Ideas of what to do next?  Maybe the test should be reordered
> to first attempt testing an unmodified conf file, and only if
> that succeeds, then rip through the list of one-per-line corruptions?
> Am I missing some setup or packages to get SASL support enabled?

To be honest this whole test is complete overkill for checking the config
file. The config file syntax allow 3 data types, integer, string and
array. There is no need for us to be running the libvirtd daemon, and
munging each possible setting in turn - we just need to test the edge
cases for the different data types. This test also completely misses
testing of the config file writing code, and things like escaping of
quotes, etc. I'd rather we just kill this test and write a better unit 
test directly against the virConfPtr APIs in  src/util/conf.c to validate 
all the parser edge cases 

Daniel.
-- 
|: Red Hat, Engineering, London    -o-   http://people.redhat.com/berrange/ :|
|: http://libvirt.org -o- http://virt-manager.org -o- http://deltacloud.org :|
|: http://autobuild.org        -o-         http://search.cpan.org/~danberr/ :|
|: GnuPG: 7D3B9505  -o-   F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|




More information about the libvir-list mailing list