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

[Libguestfs] running libguestfs as a service?


First off, many thanks for libguestfs... very useful!

I'm trying to run libguestfs as an RPC service by using a python
daemon with the python libguestfs bindings. With this service I'm
"centrally" editing VM images, and often running many GuestFS() on the
same image file in a short amount of time to edit the image's

The problem I'm running across is that each GuestFS() instance called
from within the python daemon doesn't terminate itself (until a
timeout much later?). I believe this sometimes causes my image edits
to clobber each other and corrupt the image now and then. Each image
edit usually amounts to:

g = guestfs.GuestFS()
g.mount("/dev/vda1", "/")
g.write(file_name, file_contents)
del g

As I understand things, there is a reference count that should close
"g" once the reference count = 0. However, I can't seem to make that
happen inside of my python daemon which continues to run.

Any clues on how I might accomplish this or what I'm doing wrong?


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