On 12/03/2012 10:55 AM, Michal Privoznik wrote: > On 30.11.2012 20:04, Laine Stump wrote: >> On 11/19/2012 11:51 AM, Michal Privoznik wrote: >>> Currently, we are only keeping a inactive XML configuration >>> in status dir. This is no longer enough as we need to keep >>> this class_id attribute so we don't overwrite old entries >>> when the daemon restarts. >> Aha! So you're looking at solving the problem in a different way - save >> everything to the status file rather than recomputing it as you restart. >> >> While I like the idea of having the network status file hold this >> information, I think its reliability is suspect. What if a guest's >> process is terminated while libvirtd isn't running? Or what if libvirtd >> exits unexpectedly after the commands to setup bandwidth have been >> executed, but before the new network state file has been written (or >> vice versa, depending on the code). >> >> Also, networks aren't properly shut down when the host is being shutdown >> (there's no equivalent to the libvirt-guests service, although at least >> one person a month or two ago requested it). > If guest is being shut down, the networkReleaseActualDevice() is called, > isn't it? And this should update the floor_sum. Even if libvirtd is > restarted and qemu process dies meanwhile, qemuProcessStop is called and > this calls the networkReleaseActualDevice() so I think we are safe here. If you've tested this and it works properly, then okay. -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list