[PATCH] docs: Mention unsupported hypervisors of transient element

Han Han posted 1 patch 3 weeks ago
Test syntax-check failed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/libvirt tags/patchew/20200723020408.1770184-1-hhan@redhat.com
docs/formatdomain.html.in | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)

[PATCH] docs: Mention unsupported hypervisors of transient element

Posted by Han Han 3 weeks ago
Signed-off-by: Han Han <hhan@redhat.com>
---
 docs/formatdomain.html.in | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/docs/formatdomain.html.in b/docs/formatdomain.html.in
index f3a639b972..c180b59226 100644
--- a/docs/formatdomain.html.in
+++ b/docs/formatdomain.html.in
@@ -4092,7 +4092,8 @@
         contents should be reverted automatically when the guest
         exits.  With some hypervisors, marking a disk transient
         prevents the domain from participating in migration or
-        snapshots. <span class="since">Since 0.9.5</span>
+        snapshots. Unsuppported by qemu, libxl, vz hypervisors.
+        <span class="since">Since 0.9.5</span>
       </dd>
       <dt><code>serial</code></dt>
       <dd>If present, this specify serial number of virtual hard drive.
-- 
2.27.0

Re: [PATCH] docs: Mention unsupported hypervisors of transient element

Posted by Peter Krempa 3 weeks ago
On Thu, Jul 23, 2020 at 10:04:08 +0800, Han Han wrote:
> Signed-off-by: Han Han <hhan@redhat.com>
> ---
>  docs/formatdomain.html.in | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/docs/formatdomain.html.in b/docs/formatdomain.html.in
> index f3a639b972..c180b59226 100644
> --- a/docs/formatdomain.html.in
> +++ b/docs/formatdomain.html.in
> @@ -4092,7 +4092,8 @@
>          contents should be reverted automatically when the guest
>          exits.  With some hypervisors, marking a disk transient
>          prevents the domain from participating in migration or
> -        snapshots. <span class="since">Since 0.9.5</span>
> +        snapshots. Unsuppported by qemu, libxl, vz hypervisors.
> +        <span class="since">Since 0.9.5</span>

We usually mention just where the config is supported. I don't think we
should document it as you propose.

Re: [PATCH] docs: Mention unsupported hypervisors of transient element

Posted by Han Han 3 weeks ago
On Thu, Jul 23, 2020 at 2:48 PM Peter Krempa <pkrempa@redhat.com> wrote:

> On Thu, Jul 23, 2020 at 10:04:08 +0800, Han Han wrote:
> > Signed-off-by: Han Han <hhan@redhat.com>
> > ---
> >  docs/formatdomain.html.in | 3 ++-
> >  1 file changed, 2 insertions(+), 1 deletion(-)
> >
> > diff --git a/docs/formatdomain.html.in b/docs/formatdomain.html.in
> > index f3a639b972..c180b59226 100644
> > --- a/docs/formatdomain.html.in
> > +++ b/docs/formatdomain.html.in
> > @@ -4092,7 +4092,8 @@
> >          contents should be reverted automatically when the guest
> >          exits.  With some hypervisors, marking a disk transient
> >          prevents the domain from participating in migration or
> > -        snapshots. <span class="since">Since 0.9.5</span>
> > +        snapshots. Unsuppported by qemu, libxl, vz hypervisors.
> > +        <span class="since">Since 0.9.5</span>
>
> We usually mention just where the config is supported. I don't think we
> should document it as you propose.
>
> It seems that this element is only supported in vmx driver, right?
➜  libvirt git:(master) ag '\->transient' -A 3

src/vz/vz_utils.c:352:    if (disk->transient) {
src/vz/vz_utils.c:353-        virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
"%s",
src/vz/vz_utils.c:354-                       _("Transient disks are not "
src/vz/vz_utils.c:355-                         "supported by vz driver."));
src/conf/domain_conf.c:10573:            def->transient = true;
src/conf/domain_conf.c:10574-        } else if (!encryption &&
src/conf/domain_conf.c:10575-                   virXMLNodeNameEqual(cur,
"encryption")) {
src/conf/domain_conf.c:10576-            if (!(encryption =
virStorageEncryptionParseNode(cur, ctxt)))
--
src/conf/domain_conf.c:25576:    if (def->transient)
src/conf/domain_conf.c:25577-        virBufferAddLit(buf, "<transient/>\n");
src/conf/domain_conf.c:25578-    virBufferEscapeString(buf,
"<serial>%s</serial>\n", def->serial);
src/conf/domain_conf.c:25579-    virBufferEscapeString(buf,
"<wwn>%s</wwn>\n", def->wwn);
src/qemu/qemu_validate.c:2168:    if (disk->transient) {
src/qemu/qemu_validate.c:2169-
 virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
src/qemu/qemu_validate.c:2170-                       _("transient disks not
supported yet"));
src/qemu/qemu_validate.c:2171-        return -1;
src/libxl/libxl_conf.c:1148:    if (l_disk->transient) {
src/libxl/libxl_conf.c:1149-        virReportError(VIR_ERR_INTERNAL_ERROR,
"%s",
src/libxl/libxl_conf.c:1150-                       _("libxenlight does not
support transient disks"));
src/libxl/libxl_conf.c:1151-        return -1;
src/libxl/xen_xl.c:1699:    if (disk->transient) {
src/libxl/xen_xl.c:1700-        virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
"%s",
src/libxl/xen_xl.c:1701-                       _("transient disks not
supported yet"));
src/libxl/xen_xl.c:1702-        goto cleanup;
src/libxl/xen_xm.c:342:    if (disk->transient) {
src/libxl/xen_xm.c:343-        virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
"%s",
src/libxl/xen_xm.c:344-                       _("transient disks not
supported yet"));
src/libxl/xen_xm.c:345-        return -1;
src/test/test_driver.c:243:    nsdata->transient = tmp;
src/test/test_driver.c:244-
src/test/test_driver.c:245-    tmp =
virXPathBoolean("boolean(./test:hasmanagedsave)", ctxt);
src/test/test_driver.c:246-    if (tmp == -1) {
--
src/test/test_driver.c:268:    if (nsdata->transient && nsdata->runstate ==
VIR_DOMAIN_SHUTOFF) {
src/test/test_driver.c:269-        virReportError(VIR_ERR_XML_ERROR, "%s",
src/test/test_driver.c:270-            _("transient domain cannot have
runstate 'shutoff'"));
src/test/test_driver.c:271-        goto error;
--
src/test/test_driver.c:993:        obj->persistent = !nsdata->transient;
src/test/test_driver.c:994-        obj->hasManagedSave =
nsdata->hasManagedSave;
src/test/test_driver.c:995-
src/test/test_driver.c:996-        if (nsdata->runstate !=
VIR_DOMAIN_SHUTOFF) {
src/vmx/vmx.c:2273:                (*def)->transient = STRCASEEQ(mode,
src/vmx/vmx.c:2274-
 "independent-nonpersistent");
src/vmx/vmx.c:2275-        } else {
src/vmx/vmx.c:2276-            virReportError(VIR_ERR_INTERNAL_ERROR,
--
src/vmx/vmx.c:3640:    if (def->transient)
src/vmx/vmx.c:3641-        virBufferAsprintf(buffer,
src/vmx/vmx.c:3642-                          "%s%d:%d.mode =
\"independent-nonpersistent\"\n",
src/vmx/vmx.c:3643-                          busType, controllerOrBus,
unit);


-- 
Best regards,
-----------------------------------
Han Han
Senior Quality Engineer
Redhat.

Email: hhan@redhat.com
Phone: +861065339333