99cbc7
From 47ef8016cca25db8da44b13df031afba739be066 Mon Sep 17 00:00:00 2001
99cbc7
Message-Id: <47ef8016cca25db8da44b13df031afba739be066@dist-git>
99cbc7
From: Michal Privoznik <mprivozn@redhat.com>
99cbc7
Date: Wed, 3 Apr 2019 12:38:58 +0200
99cbc7
Subject: [PATCH] src: Document autostart for session demon
99cbc7
MIME-Version: 1.0
99cbc7
Content-Type: text/plain; charset=UTF-8
99cbc7
Content-Transfer-Encoding: 8bit
99cbc7
99cbc7
https://bugzilla.redhat.com/show_bug.cgi?id=1501450
99cbc7
99cbc7
The autostart under session daemon might not behave as you'd
99cbc7
expect it to behave. This patch is inspired by latest
99cbc7
libvirt-users discussion:
99cbc7
99cbc7
https://www.redhat.com/archives/libvirt-users/2018-December/msg00047.html
99cbc7
99cbc7
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
99cbc7
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
99cbc7
(cherry picked from commit 61b4e8aaf1bce07f282c152de556c3d6aa8d65be)
99cbc7
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
99cbc7
Message-Id: <44fd61a0ba2340e2c3802e42e6fbae08e6750a1d.1554287931.git.mprivozn@redhat.com>
99cbc7
Reviewed-by: Erik Skultety <eskultet@redhat.com>
99cbc7
---
99cbc7
 src/libvirt-domain.c | 5 +++++
99cbc7
 1 file changed, 5 insertions(+)
99cbc7
99cbc7
diff --git a/src/libvirt-domain.c b/src/libvirt-domain.c
99cbc7
index ad0ded9ee3..5f7f0bfeba 100644
99cbc7
--- a/src/libvirt-domain.c
99cbc7
+++ b/src/libvirt-domain.c
99cbc7
@@ -6690,6 +6690,11 @@ virDomainCreateWithFiles(virDomainPtr domain, unsigned int nfiles,
99cbc7
  * configured to be automatically started when the host
99cbc7
  * machine boots.
99cbc7
  *
99cbc7
+ * Please note that this might result in unexpected behaviour if
99cbc7
+ * used for some session URIs. Since the session daemon is started
99cbc7
+ * with --timeout it comes and goes and as it does so it
99cbc7
+ * autostarts domains which might have been shut off recently.
99cbc7
+ *
99cbc7
  * Returns -1 in case of error, 0 in case of success
99cbc7
  */
99cbc7
 int
99cbc7
-- 
99cbc7
2.21.0
99cbc7