Bug 1020812 - attempt to import Export domain as ISO domain creates an orphaned storage connection that prevents subsequent import of the domain as an Export domain
attempt to import Export domain as ISO domain creates an orphaned storage con...
Status: CLOSED CURRENTRELEASE
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: ovirt-engine (Show other bugs)
3.3.0
Unspecified Unspecified
unspecified Severity high
: ---
: 3.3.0
Assigned To: Daniel Erez
Leonid Natapov
storage
:
Depends On:
Blocks: 3.3snap2
  Show dependency treegraph
 
Reported: 2013-10-18 06:30 EDT by David Jaša
Modified: 2016-02-10 12:08 EST (History)
7 users (show)

See Also:
Fixed In Version: is23
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed:
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: Storage
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
amureini: Triaged+


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
oVirt gerrit 20725 None None None Never
oVirt gerrit 20944 None None None Never

  None (edit)
Description David Jaša 2013-10-18 06:30:59 EDT
Description of problem:
attempt to import Export domain as ISO domain creates an orphaned storage connection that prevents subsequent import of the domain as an Export domain

Version-Release number of selected component (if applicable):
is19:
rhevm-backend-3.3.0-0.26.master.el6ev.noarch
vdsm-4.13.0-0.3.beta1.el6ev.x86_64

How reproducible:
didn't try to reproduce

Steps to Reproduce:
1. have an existing export domain (NFSv4/V1) and a clean RHEV 3.3 with just a data domain
2. hit "Import Domain", keep type as NFS/ISO, type uri of the Export domain - you'll get an error
3. try to import the domain once again, now as a correct type

Actual results:
"Storage connection already exists" error is returned

Expected results:
this condition is handled somehow - either the storage connection is deleted upon error, or it is reused on another try

Additional info:

the storage connection could not be deleted via API without host being specified (a bug in Feature page: http://www.ovirt.org/Features/Manage_Storage_Connections#Delete_connection_.28DELETE.29 or in API?):
$ curl -D - -H "Content-type: application/xml" -H "prefer: persistent-auth"  -b .cookies/rhevm33 -c .cookies/rhevm33 --cacert .certs/rhevm33.pem https://rhevm33.example.com/api/storageconnections/5242a375-5b64-4879-9e02-b626956700ad 
HTTP/1.1 200 OK
Date: Fri, 18 Oct 2013 10:24:24 GMT
Pragma: No-cache
Cache-Control: no-cache
Expires: Thu, 01 Jan 1970 01:00:00 CET
Content-Type: application/xml
Content-Length: 325
Vary: Accept-Encoding
Connection: close

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<storage_connection href="/api/storageconnections/5242a375-5b64-4879-9e02-b626956700ad" id="5242a375-5b64-4879-9e02-b626956700ad">
    <address>nfs_server_IP</address>
    <type>nfs</type>
    <path>/nfs/vms</path>
    <nfs_version>V4</nfs_version>
</storage_connection>
$ curl -D - -H "Content-type: application/xml" -H "prefer: persistent-auth"  -b .cookies/rhevm33 -c .cookies/rhevm33 --cacert .certs/rhevm33.pem https://rhevm33.example.com/api/storageconnections/5242a375-5b64-4879-9e02-b626956700ad -X DELETE
HTTP/1.1 400 Bad Request
Date: Fri, 18 Oct 2013 10:25:39 GMT
Pragma: No-cache
Cache-Control: no-cache
Expires: Thu, 01 Jan 1970 01:00:00 CET
Content-Type: text/html;charset=utf-8
Content-Length: 1309
Vary: Accept-Encoding
Connection: close

<html><head><title>JBoss Web/7.2.2.Final-redhat-1 - JBWEB000064: Error report</title><style><!--H1 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:22px;} H2 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:16px;} H3 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:14px;} BODY {font-family:Tahoma,Arial,sans-serif;color:black;background-color:white;} B {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;} P {font-family:Tahoma,Arial,sans-serif;background:white;color:black;font-size:12px;}A {color : black;}A.name {color : black;}HR {color : #525D76;}--></style> </head><body><h1>JBWEB000065: HTTP Status 400 - javax.xml.bind.UnmarshalException
 - with linked exception:
[org.xml.sax.SAXParseException; Premature end of file.]</h1><HR size="1" noshade="noshade"><p><b>JBWEB000309: type</b> JBWEB000067: Status report</p><p><b>JBWEB000068: message</b> <u>javax.xml.bind.UnmarshalException
 - with linked exception:
[org.xml.sax.SAXParseException; Premature end of file.]</u></p><p><b>JBWEB000069: description</b> <u>JBWEB000120: The request sent by the client was syntactically incorrect.</u></p><HR size="1" noshade="noshade"><h3>JBoss Web/7.2.2.Final-redhat-1</h3></body></html>
Comment 3 Allon Mureinik 2013-10-22 12:49:40 EDT
technical insight:

AddExistingFileDomainCommand calls AddStorageServerConnection as an internal command, and only if it succeeds, proceeds to save the domain's details.
If there's a failure, the connection cannot be compensated, since it's its own command.
Comment 4 Allon Mureinik 2013-10-27 04:53:55 EDT
(In reply to Allon Mureinik from comment #3)
> technical insight:
> 
> AddExistingFileDomainCommand calls AddStorageServerConnection as an internal
> command, and only if it succeeds, proceeds to save the domain's details.
> If there's a failure, the connection cannot be compensated, since it's its
> own command.
Albeit this statement is true, the flow from the UI does not pass through it - the frontend is driving it, but lacks a failure callback.
Comment 6 Leonid Natapov 2013-11-24 09:14:33 EST
is24.1 Import succeeded.
Comment 7 Itamar Heim 2014-01-21 17:28:15 EST
Closing - RHEV 3.3 Released
Comment 8 Itamar Heim 2014-01-21 17:28:15 EST
Closing - RHEV 3.3 Released
Comment 9 Itamar Heim 2014-01-21 17:31:07 EST
Closing - RHEV 3.3 Released

Note You need to log in before you can comment on or make changes to this bug.