[libvirt] [PATCH 5/7] lxc: append container log file

Amy Griffis amy.griffis at hp.com
Sun Oct 4 19:29:10 UTC 2009


Do we really want to overwrite the container log file every time we
restart?
---

 src/lxc/lxc_driver.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/lxc/lxc_driver.c b/src/lxc/lxc_driver.c
index c5a49f2..73cfecd 100644
--- a/src/lxc/lxc_driver.c
+++ b/src/lxc/lxc_driver.c
@@ -1037,7 +1037,7 @@ static int lxcVmStart(virConnectPtr conn,
         goto cleanup;
     }
 
-    if ((logfd = open(logfile, O_WRONLY | O_TRUNC | O_CREAT,
+    if ((logfd = open(logfile, O_WRONLY | O_APPEND | O_CREAT,
              S_IRUSR|S_IWUSR)) < 0) {
         virReportSystemError(conn, errno,
                              _("failed to open '%s'"),




More information about the libvir-list mailing list