Re: [PATCH 1/2] libvirt/qemu - support updating inactive domains (take 2)

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

 



> > > +
> > > +    driver = dom->conn->privateData;
> > > +    qemuDriverLock(driver);
> > > +    vm = virDomainFindByUUID(&driver->domains, dom->uuid);
> > > +    if (!vm) {
> > > +        qemuReportError(VIR_ERR_NO_DOMAIN, _("cannot find domain '%s'"),
> > > +                        dom->name);
> > > +        goto unlock_out;
> > > +    }
> > > +
> > > +    if (qemuDomainObjBeginJobWithDriver(driver, vm) < 0) {
> > > +        /*
> > > +         * For now, just allow updating inactive domains. Further development
> > > +         * will allow updating both active domain and its config file at
> > > +         * the same time.
> > > +         */
> > > +        qemuReportError(VIR_ERR_INVALID_ARG,
> > > +                        _("cannot update alive domain : %s"),  __FUNCTION__);
> > 
> > I think we can silently fail here. Currently this function (qemuDomainModifyDevicePersistent)
> > is called only for modifying inactive domains.
> > 
> It seems...."virDomainObjIsActive(vm) check" is lacked..

Yes. What about checking for flag VIR_DOMAIN_DEVICE_MODIFY_LIVE? This
flag is set if domain is active, for example, see cmdAttachDisk().

> 
> Above 'if' returns true only when timeout..
> 

-- 
Thanks,
Hu Tao

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list


[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]