volume can't be attached after libvirt upgrade

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

My nova-compute nodes was running libvirt 0.9.13 and QEMU 1.0, after libvirt was upgraded to 1.2.2, the VMs launched by libvirt 0.9.13 can't attach volume any more, i.e. "nova volume-attach <vm-uuid> <volume-uuid>" doesn't work. But before the libvirt upgrade, the same VM can attach volume disk.

I did some debuging and find that, it failed in QEMU when try to open the volume device, and the return errno is EPERM. QEMU instances is running as user libvirt-qemu always, so is that possible some problem in Linux capabilites or libvirt apparmor?



-------------------------------------
int qemu_open(const char *name, int flags, ...)
{
    int ret;
    int mode = 0;
    long euid, egid;

    if (flags & O_CREAT) {
        va_list ap;

        va_start(ap, flags);
        mode = va_arg(ap, int);
        va_end(ap);
    }

    euid = (long)geteuid();
    egid = (long)getegid();
#ifdef O_CLOEXEC
    ret = open(name, flags | O_CLOEXEC, mode);
#else
    ret = open(name, flags, mode);
    if (ret >= 0) {
        qemu_set_cloexec(ret);
    }
#endif

    return ret;
}


Regards,
CY.
_______________________________________________
libvirt-users mailing list
libvirt-users@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvirt-users

[Index of Archives]     [Virt Tools]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [KDE Users]

  Powered by Linux