From: Daniel P. Berrange Date: Fri, 12 Jul 2013 10:04:55 +0000 (+0100) Subject: Add a couple of debug statements to LXC driver X-Git-Tag: CVE-2013-4154~27 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f45dbdb213b305b68630b5fcc7d036ed6279ff95;p=thirdparty%2Flibvirt.git Add a couple of debug statements to LXC driver When failing to start a container due to inaccessible root filesystem path, we did not log any meaningful error. Add a few debug statements to assist diagnosis Signed-off-by: Daniel P. Berrange --- diff --git a/src/lxc/lxc_container.c b/src/lxc/lxc_container.c index fcd9b74543..940233becc 100644 --- a/src/lxc/lxc_container.c +++ b/src/lxc/lxc_container.c @@ -1762,6 +1762,8 @@ static int lxcContainerSetupPivotRoot(virDomainDefPtr vmDef, char *sec_mount_options; char *stateDir = NULL; + VIR_DEBUG("Setup pivot root"); + if (!(sec_mount_options = virSecurityManagerGetMountOptions(securityDriver, vmDef))) return -1; @@ -1864,12 +1866,16 @@ static int lxcContainerResolveSymlinks(virDomainDefPtr vmDef) char *newroot; size_t i; + VIR_DEBUG("Resolving symlinks"); + for (i = 0; i < vmDef->nfss; i++) { virDomainFSDefPtr fs = vmDef->fss[i]; if (!fs->src) continue; - if (virFileResolveAllLinks(fs->src, &newroot) < 0) + if (virFileResolveAllLinks(fs->src, &newroot) < 0) { + VIR_DEBUG("Fail to resolve link %s", fs->src); return -1; + } VIR_DEBUG("Resolved '%s' to %s", fs->src, newroot);