Re: [libvirt] [PATCH 1/2] REPRODUCER -- DO NOT PUSH

2018-03-15 Thread Michal Privoznik
On 03/13/2018 06:36 PM, Peter Krempa wrote:
> https://bugzilla.redhat.com/show_bug.cgi?id=1553085
> 
> This breaks hotplug so that we can see whether the file was left
> dangling.
> 
> Reproduce by:
> 
> virsh create dom.xml
> virsh attach-device memplug mem.xml
> ls /var/lib/libvirt/qemu/ram/libvirt/qemu/*-memplug
> 
> After the failed hotplug, qemu should leave behind the file called
> 'dimm0' in the above path.
> 
> The original bugreport was caused by failing in the 'device-add' phase.
> ---
>  dom.xml | 110 
> 
>  mem.xml |   6 +++
>  src/qemu/qemu_hotplug.c |   3 ++
>  3 files changed, 119 insertions(+)
>  create mode 100644 dom.xml
>  create mode 100644 mem.xml
> 
> diff --git a/dom.xml b/dom.xml
> new file mode 100644
> index 00..242615569e
> --- /dev/null
> +++ b/dom.xml
> @@ -0,0 +1,110 @@
> +
> +  memplug
> +  41277c77-9bb0-416c-aacc-4dcac4e03cea
> +  152428800
> +  1024000
> +  1024000
> +  
> +
> +
> +
> +  
> +  8
> +  
> +hvm
> +
> +  
> +  
> +
> +
> +
> +  
> +  
> +
> +  
> +  
> +
> +  
> +  
> +
> +
> +
> +  
> +  destroy
> +  restart
> +  restart
> +  
> +
> +
> +  
> +  
> +/usr/bin/qemu-system-x86_64
> +
> +   function='0x7'/>
> +
> +
> +  
> +   function='0x0' multifunction='on'/>
> +
> +
> +  
> +   function='0x1'/>
> +
> +
> +  
> +   function='0x2'/>
> +
> +
> +
> +   function='0x0'/>
> +
> +
> +   function='0x1'/>
> +
> +
> +   function='0x0'/>
> +
> +
> +  
> +
> +  
> +
> +
> +  
> +
> +
> +  
> +  
> +
> +
> +  
> +  
> +
> +
> +  
> +
> +
> +
> +
> +  
> +  
> +
> +
> +   function='0x0'/>
> +
> +
> +   primary='yes'/>
> +   function='0x0'/>
> +
> +
> +  
> +
> +
> +  
> +
> +
> +   function='0x0'/>
> +
> +  
> +
> +

Empty line at EOF :-P

Michal

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


Re: [libvirt] [PATCH 1/2] REPRODUCER -- DO NOT PUSH

2018-03-15 Thread Ján Tomko

On Tue, Mar 13, 2018 at 06:36:32PM +0100, Peter Krempa wrote:

https://bugzilla.redhat.com/show_bug.cgi?id=1553085

This breaks hotplug so that we can see whether the file was left
dangling.



NACK, this breaks hotplug.


Reproduce by:

virsh create dom.xml
virsh attach-device memplug mem.xml
ls /var/lib/libvirt/qemu/ram/libvirt/qemu/*-memplug

After the failed hotplug, qemu should leave behind the file called
'dimm0' in the above path.

The original bugreport was caused by failing in the 'device-add' phase.
---
dom.xml | 110 
mem.xml |   6 +++
src/qemu/qemu_hotplug.c |   3 ++
3 files changed, 119 insertions(+)
create mode 100644 dom.xml
create mode 100644 mem.xml



Also, 'make syntax-check' does not pass:
dom.xml
maint.mk: empty line(s) or no newline at EOF
make: *** [maint.mk:930: sc_prohibit_empty_lines_at_EOF] Error 1
make: *** Waiting for unfinished jobs

Jan


signature.asc
Description: Digital signature
--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list

[libvirt] [PATCH 1/2] REPRODUCER -- DO NOT PUSH

2018-03-13 Thread Peter Krempa
https://bugzilla.redhat.com/show_bug.cgi?id=1553085

This breaks hotplug so that we can see whether the file was left
dangling.

Reproduce by:

virsh create dom.xml
virsh attach-device memplug mem.xml
ls /var/lib/libvirt/qemu/ram/libvirt/qemu/*-memplug

After the failed hotplug, qemu should leave behind the file called
'dimm0' in the above path.

The original bugreport was caused by failing in the 'device-add' phase.
---
 dom.xml | 110 
 mem.xml |   6 +++
 src/qemu/qemu_hotplug.c |   3 ++
 3 files changed, 119 insertions(+)
 create mode 100644 dom.xml
 create mode 100644 mem.xml

diff --git a/dom.xml b/dom.xml
new file mode 100644
index 00..242615569e
--- /dev/null
+++ b/dom.xml
@@ -0,0 +1,110 @@
+
+  memplug
+  41277c77-9bb0-416c-aacc-4dcac4e03cea
+  152428800
+  1024000
+  1024000
+  
+
+
+
+  
+  8
+  
+hvm
+
+  
+  
+
+
+
+  
+  
+
+  
+  
+
+  
+  
+
+
+
+  
+  destroy
+  restart
+  restart
+  
+
+
+  
+  
+/usr/bin/qemu-system-x86_64
+
+  
+
+
+  
+  
+
+
+  
+  
+
+
+  
+  
+
+
+
+  
+
+
+  
+
+
+  
+
+
+  
+
+  
+
+
+  
+
+
+  
+  
+
+
+  
+  
+
+
+  
+
+
+
+
+  
+  
+
+
+  
+
+
+  
+  
+
+
+  
+
+
+  
+
+
+  
+
+  
+
+
diff --git a/mem.xml b/mem.xml
new file mode 100644
index 00..d536786b8b
--- /dev/null
+++ b/mem.xml
@@ -0,0 +1,6 @@
+
+
+  128
+  0
+
+  
diff --git a/src/qemu/qemu_hotplug.c b/src/qemu/qemu_hotplug.c
index e0a5300f08..cff40625f8 100644
--- a/src/qemu/qemu_hotplug.c
+++ b/src/qemu/qemu_hotplug.c
@@ -2162,6 +2162,9 @@ qemuDomainAttachMemory(virQEMUDriverPtr driver,
 goto exit_monitor;
 objAdded = true;

+/* !!! REPRODUCER !!! */
+goto exit_monitor;
+
 if (qemuMonitorAddDevice(priv->mon, devstr) < 0)
 goto exit_monitor;

-- 
2.16.2

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