Re: [PATCH v2] qemu: remove panic dev models s390 and pseries when migrating

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

 



On 08/01/2016 11:57 AM, Ján Tomko wrote:
On Thu, Jul 28, 2016 at 03:15:49PM +0200, Boris Fiuczynski wrote:
The panic devices with models s390 and pseries are autogenerated.
For backwards compatibility reasons the devices are to be removed
when migrating.

Signed-off-by: Boris Fiuczynski <fiuczy@xxxxxxxxxxxxxxxxxx>
---
src/qemu/qemu_domain.c | 9 +++++++++
1 file changed, 9 insertions(+)

diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c
index ceac22f..82fa817 100644
--- a/src/qemu/qemu_domain.c
+++ b/src/qemu/qemu_domain.c
@@ -3310,6 +3310,15 @@ qemuDomainDefFormatBuf(virQEMUDriverPtr driver,
            virDomainControllerDefFree(usb);
        }

+        /* Remove the panic device for selected models if present */
+        for (i = 0; i < def->npanics; i++) {
+            if (def->panics[i]->model == VIR_DOMAIN_PANIC_MODEL_S390 ||
+                def->panics[i]->model ==
VIR_DOMAIN_PANIC_MODEL_PSERIES) {
+                VIR_DELETE_ELEMENT(def->panics, i, def->npanics);

+                i--;

I think we can break; here.

We only auto-add one panic device. A domain XML with multiple implicit
panic devices would have to be generated by the user and also does not
make sense.

ACK regardless,

I will push it with the proposed change in a few hours if there are no
objections.

Jan
Jan, I agree. Autogeneration only adds one panic device per architecture and it is only manually possible to define multiple panic devices in a domain which would not be able to be started successfully. In case someone calls dumpxml --migratable on this domain only the s390 or pseries device (whichever comes first) would be removed.... but that is just theory.
If you insert the break please also delete the line "i--;". Thanks.


+            }
+        }
+
        for (i = 0; i < def->nchannels; i++)
            qemuDomainChrDefDropDefaultPath(def->channels[i], driver);
    }
--
2.9.0

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



--
Mit freundlichen Grüßen/Kind regards
   Boris Fiuczynski

IBM Deutschland Research & Development GmbH
Vorsitzender des Aufsichtsrats: Martina Köderitz
Geschäftsführung: Dirk Wittkopp
Sitz der Gesellschaft: Böblingen
Registergericht: Amtsgericht Stuttgart, HRB 243294

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]