[ovirt-users] Attaching disk returns "Bad Request"

Hanna Terentieva h.terentieva at storware.eu
Wed Apr 25 12:25:11 UTC 2018


Hi,
we are using the following method from oVirt engine SDK v.4.2 rather
than HTTP requests. 
DiskAttachment attachment =
attachmentsService.add().attachment(                diskAttachment().di
sk(diskBuilder)                        .active(true)                   
     .bootable(bootable)                        .interface_(DiskInterfa
ce.VIRTIO_SCSI))                .send().attachment();
On Wed, 2018-04-25 at 15:17 +0300, Shani Leviim wrote:
> Hi,
> 
> Attaching a disk to a VM is a 'POST' method (rather than 'PUT'
> method).
> Can you give it a try?
> 
> Regards,
> 
> Shani Leviim
> 
> 
> On Wed, Apr 25, 2018 at 2:55 PM, Maor Lipchuk <mlipchuk at redhat.com>
> wrote:
> > Hi Marcin and Hanna,
> > I've found the following bug https://bugzilla.redhat.com/1546832
> > which probably fix that issue,
> > The fix was introduced in oVirt 4.2.3.2
> > Which version are you using?
> > 
> > Regards,
> > Maor
> > 
> > 
> > 
> > 
> > On Wed, Apr 25, 2018 at 11:24 AM, Maor Lipchuk <mlipchuk at redhat.com
> > > wrote:
> > > Hi Marcin,
> > > 
> > > Can you please also attach the VDSM log so we can see the exact
> > > XML that is being sent to libvirt.(I'm replying on the users
> > > list, let's continue to discuss it here)
> > > 
> > > Regards,
> > > Maor
> > > 
> > > On Tue, Apr 24, 2018 at 5:20 PM, Marcin Kubacki <m.kubacki at storwa
> > > re.eu> wrote:
> > > > 
> > > > 
> > > > 
> > > > Hi Maor,
> > > > 
> > > > 
> > > > 
> > > > it looks like the problem is deeper, potentially related to how
> > > > the VM storage is configured (not to the request itself),
> > > > and it is the first time we’ve seen something like this.
> > > > Customer has oVirt 4.2, and this wasn’t happening in older
> > > > environments.
> > > > 
> > > > 
> > > > 
> > > > 
> > > > Can you help us solving this issue?
> > > > 
> > > > 
> > > > 
> > > > 
> > > > 
> > > > 
> > > > 
> > > > 
> > > > 
> > > > 
> > > > Pozdrawiam / Best Regards
> > > > 
> > > > 
> > > > 
> > > > 
> > > > Marcin Kubacki
> > > > Chief
> > > >  Software Architect
> > > > 
> > > > 
> > > > 
> > > > 
> > > > e-mail: m.kubacki at storware.eu
> > > > 
> > > > 
> > > > mobile: +48 730-602-612
> > > > 
> > > > 
> > > > 
> > > > 
> > > > 
> > > > 
> > > > ul. Leszno 8/44
> > > > 01-192 Warszawa 
> > > > www.storware.eu
> > > > 
> > > > 
> > > > 
> > > > 
> > > > 
> > > > 
> > > > 
> > > > 
> > > > 
> > > > 
> > > > 
> > > > 
> > > > 
> > > > 
> > > > > Wiadomość napisana przez Hanna Terentieva <h.terentieva at storw
> > > > > are.eu> w dniu 23.04.2018, o godz. 10:33:
> > > > > 
> > > > > 
> > > > > 
> > > > > 
> > > > > Hi Maor,
> > > > > 
> > > > > 
> > > > > 
> > > > > My request looks correct and as for ovirt mailing list
> > > > > there seems to be a similar issue with VDSM failure here 
> > > > > https://www.mail-archive.com/users@ovirt.org/msg45797.html. 
> > > > > Have you possibly encountered a similar issue?
> > > > > 
> > > > > 
> > > > > 
> > > > > On Sun, 2018-04-22 at 10:47 +0300, Maor Lipchuk wrote:
> > > > > > Hi Hanna,
> > > > > > 
> > > > > > 
> > > > > > 
> > > > > > If the diskalready exists you should use PUT method with
> > > > > > the following URL:
> > > > > > PUT /vms/{vm:id}/disksattachments/{attachment:id}
> > > > > > 
> > > > > > 
> > > > > > 
> > > > > > You can take a look at the following documentation for more
> > > > > > details: 
> > > > > >   
> > > > > > https://access.redhat.com/documentation/en-us/red_hat_virtu
> > > > > > alization/4.1/html-single/rest_api_guide/#services-
> > > > > > disk_attachment-methods-update
> > > > > > 
> > > > > > 
> > > > > > 
> > > > > > 
> > > > > > 
> > > > > > If you already done this and still have a problem, I
> > > > > > suggest to send this to the ovirt users maliing list, so
> > > > > > you can get a more appropriate guidence there.
> > > > > > 
> > > > > > 
> > > > > > 
> > > > > > Regards,
> > > > > > Maor
> > > > > > 
> > > > > > 
> > > > > > 
> > > > > > On Fri, Apr 20, 2018 at 11:06 AM, Hanna Terentieva 
> > > > > > <h.terentieva at storware.eu> wrote:
> > > > > > 
> > > > > > > Hi Maor,
> > > > > > > 
> > > > > > > 
> > > > > > > 
> > > > > > > We encountered an issue with hotplugging disks when
> > > > > > > trying to attach a disk to client's envirtonment. 
> > > > > > > The disk attachment request:
> > > > > > > 
> > > > > > > 
> > > > > > > 
> > > > > > > <disk_attachment>
> > > > > > > <bootable>false</bootable>
> > > > > > > <interface>virtio</interface>
> > > > > > > <active>true</active>
> > > > > > > <disk id="a016b350-87ef-4c3b-b150-024907fed9c0"/>
> > > > > > > </disk_attachment>
> > > > > > > 
> > > > > > > 
> > > > > > > 
> > > > > > > returns this error:
> > > > > > > 
> > > > > > > 
> > > > > > > 
> > > > > > > 
> > > > > > > 
> > > > > > > Error: HTTP response code is "400". HTTP response message
> > > > > > > is "Bad Request".
> > > > > > > 
> > > > > > > org.ovirt.engine.sdk4.internal.services.ServiceImpl.throw
> > > > > > > Error(ServiceImpl.java:113)
> > > > > > > 
> > > > > > > org.ovirt.engine.sdk4.internal.services.ServiceImpl.check
> > > > > > > Fault(ServiceImpl.java:40)
> > > > > > > 
> > > > > > > org.ovirt.engine.sdk4.internal.services.DiskAttachmentsSe
> > > > > > > rviceImpl$AddRequestImpl.send(DiskAttachmentsServiceImpl.
> > > > > > > java:111)
> > > > > > > 
> > > > > > > org.ovirt.engine.sdk4.internal.services.DiskAttachmentsSe
> > > > > > > rviceImpl$AddRequestImpl.send(DiskAttachmentsServiceImpl.
> > > > > > > java:48)
> > > > > > > 
> > > > > > > 
> > > > > > > 
> > > > > > > 
> > > > > > > 
> > > > > > > oVirt version 4.2.2.
> > > > > > > 
> > > > > > > The issue happened around 2018-04-17 07:57.
> > > > > > > 
> > > > > > > Attaching the log. Clould you please help with the
> > > > > > > problem?
> > > > > > > 
> > > > > > > 
> > > > > > > 
> > > > > > > 
> > > > > > > 
> > > > > > > 
> > > > > > > -- 
> > > > > > > 
> > > > > > > 
> > > > > > > 
> > > > > > > Pozdrawiam\Best Regards
> > > > > > > 
> > > > > > > Hanna Terentieva
> > > > > > > 
> > > > > > > Junior Java Developer
> > > > > > > 
> > > > > > > e-mail: h.terentieva at storware.eu
> > > > > > > 
> > > > > > >  
> > > > > > > 
> > > > > > > 
> > > > > > > 
> > > > > > > 
> > > > > > > 
> > > > > > > <image001.png>
> > > > > > >  
> > > > > > > 
> > > > > > > 
> > > > > > > ul. Leszno 8/44
> > > > > > > 
> > > > > > > 01-192 Warszawa 
> > > > > > > 
> > > > > > > www.storware.eu
> > > > > > >  
> > > > > > > 
> > > > > > > 
> > > > > > > <image002.png>
> > > > > > >  
> > > > > > > 
> > > > > > > 
> > > > > > > <image003.png>
> > > > > > >  
> > > > > > > 
> > > > > > > 
> > > > > > > <image004.png>
> > > > > > >  
> > > > > > > 
> > > > > > > 
> > > > > > > <image005.png>
> > > > > > >  
> > > > > > > 
> > > > > > > 
> > > > > > > 
> > > > > > > 
> > > > > > >  
> > > > > > > 
> > > > > > >  
> > > > > > > 
> > > > > > > 
> > > > > > > 
> > > > > > 
> > > > > > 
> > > > > > 
> > > > > > 
> > > > > 
> > > > > -- 
> > > > > 
> > > > > 
> > > > > 
> > > > > Pozdrawiam\Best Regards
> > > > > 
> > > > > Hanna Terentieva
> > > > > 
> > > > > Junior Java Developer
> > > > > 
> > > > > e-mail: h.terentieva at storware.eu
> > > > > 
> > > > >  
> > > > > 
> > > > > 
> > > > > 
> > > > > 
> > > > > 
> > > > > <image001.png>
> > > > >  
> > > > > 
> > > > > 
> > > > > ul. Leszno 8/44
> > > > > 
> > > > > 01-192 Warszawa 
> > > > > 
> > > > > www.storware.eu
> > > > >  
> > > > > 
> > > > > 
> > > > > <image002.png>
> > > > >  
> > > > > 
> > > > > 
> > > > > <image003.png>
> > > > >  
> > > > > 
> > > > > 
> > > > > <image004.png>
> > > > >  
> > > > > 
> > > > > 
> > > > > <image005.png>
> > > > >  
> > > > > 
> > > > > 
> > > > > 
> > > > > 
> > > > >  
> > > > > 
> > > > >  
> > > > > 
> > > > > 
> > > > > 
> > > > > 
> > > > 
> > > > 
> > > > 
> > > > 
> > > > 
> > > > 
> > 
> > 
> > _______________________________________________
> > 
> > Users mailing list
> > 
> > Users at ovirt.org
> > 
> > http://lists.ovirt.org/mailman/listinfo/users
> > 
> > 
-- 
Pozdrawiam\Best Regards
Hanna Terentieva
Junior Java Developer
e-mail: h.terentieva at storware.eu
 
   ul. Leszno 8/44
01-192 Warszawa 
www.storware.eu          
 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ovirt.org/pipermail/users/attachments/20180425/969128ec/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image005.png
Type: image/png
Size: 1115 bytes
Desc: not available
URL: <http://lists.ovirt.org/pipermail/users/attachments/20180425/969128ec/attachment-0005.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image004.png
Type: image/png
Size: 1066 bytes
Desc: not available
URL: <http://lists.ovirt.org/pipermail/users/attachments/20180425/969128ec/attachment-0006.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image003.png
Type: image/png
Size: 1188 bytes
Desc: not available
URL: <http://lists.ovirt.org/pipermail/users/attachments/20180425/969128ec/attachment-0007.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image002.png
Type: image/png
Size: 1164 bytes
Desc: not available
URL: <http://lists.ovirt.org/pipermail/users/attachments/20180425/969128ec/attachment-0008.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.png
Type: image/png
Size: 2154 bytes
Desc: not available
URL: <http://lists.ovirt.org/pipermail/users/attachments/20180425/969128ec/attachment-0009.png>


More information about the Users mailing list