Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1195724

Summary: Import a storage domain is missing properties (vs. edit/new)
Product: [Retired] oVirt Reporter: Vered Volansky <vered>
Component: ovirt-engine-coreAssignee: Maor <mlipchuk>
Status: CLOSED CURRENTRELEASE QA Contact: Ori Gofen <ogofen>
Severity: medium Docs Contact:
Priority: high    
Version: 3.5CC: acanan, amureini, bugs, ecohen, gklein, lsurette, mlipchuk, rbalakri, vered, yeylon, ylavi
Target Milestone: ---   
Target Release: 3.5.3   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: storage
Fixed In Version: org.ovirt.engine-root-3.5.3-2 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-06-15 08:39:04 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Storage RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1196169    

Description Vered Volansky 2015-02-24 13:21:17 UTC
Description of problem:
When importing a storage domain, one would expect to have the ability to add the properties as when adding a new domain.
In wedadmin the fields are just not there (name, description, comment), and through REST they don't apply.

Actual results:
Old domain name, no comment / description.

Expected results:
Be able to enter new name/description/comment.

Comment 1 Allon Mureinik 2015-02-24 13:25:27 UTC
Looks as though we just need to apply the mapper on the domain passed to the POST call, no?

Comment 2 Maor 2015-02-24 15:04:49 UTC
(In reply to Allon Mureinik from comment #1)
> Looks as though we just need to apply the mapper on the domain passed to the
> POST call, no?

no, this is an issue also related to the GUI and it is the behavior we have today for export Storage Domain.
We don't have this feature for re-define name, description and more.
Currently we can't import an Export Domain which have the same name as another Storage domain in the setup.

to fix this behavior we should think how do we want to show this in the dialog box when importing a Storage Domain.
for example, we can have a checkbox which will be checked only if the user does not want to use the defaults configured in the Storage Domain, and then one can redefine all the rest of the fields.

I've opened an RFE on that which this bug will be dependent on since we should fix that issue in the REST and in the GUI as well for Export and Data Storage Domains

Comment 3 Maor 2015-02-28 19:13:43 UTC
After verifying import for NFS it appears that from REST we do support redefine of name, description and comment (see [1]), although keep in mind that the new definitions will not be updated in the Storage Domain metadata unless the user will change one of those fields when the Storage Domain will be active.
Is this still relevant?



[1]
<storage_domain>
    <name>new_name</name>
    <description>new_description</description>
    <comment>new_comment</comment>
    <type>data</type>
    <storage>
        <address>10.35.16.2</address>
        <type>nfs</type>
        <path>/export/images/rnd/maor/data3</path>
    </storage>
    <host>
        <name>venus-vdsa.tlv.redhat.com</name>
    </host>
    <storage_format>v3</storage_format>
</storage_domain>

Comment 4 Maor 2015-02-28 19:17:11 UTC
(In reply to Maor from comment #3)
> After verifying import for NFS it appears that from REST we do support
> redefine of name, description and comment (see [1]), although keep in mind
> that the new definitions will not be updated in the Storage Domain metadata
> unless the user will change one of those fields when the Storage Domain will
> be active.
> Is this still relevant?
> 
> 
> 
> [1]
> <storage_domain>
>     <name>new_name</name>
>     <description>new_description</description>
>     <comment>new_comment</comment>
>     <type>data</type>
>     <storage>
>         <address>10.35.16.2</address>
>         <type>nfs</type>
>         <path>/export/images/rnd/maor/data3</path>
>     </storage>
>     <host>
>         <name>venus-vdsa.tlv.redhat.com</name>
>     </host>
>     <storage_format>v3</storage_format>
> </storage_domain>

My mistake, for NFS there is no support curently, will send a fix for that issue

Comment 5 Allon Mureinik 2015-03-01 16:25:56 UTC
Maor, is there anything that should be documented here?

Comment 6 Maor 2015-03-01 20:35:13 UTC
(In reply to Allon Mureinik from comment #5)
> Maor, is there anything that should be documented here?

I'm not sure, it is only potential fields which we already use when adding a new Storage Domain, and the rsdl.wsdl is already synced with them

Comment 7 Maor 2015-03-02 09:29:52 UTC
An example to import NFS Storage Domain:

<storage_domain>
    <description>NewDescription</description>
    <comment>anyComment</comment>
    <type>data</type>
    <storage>
        <address>10.35.16.2</address>
        <type>nfs</type>
        <path>/export/images/rnd/maor/data3</path>
    </storage>
    <host>
        <name>venus-vdsa.tlv.redhat.com</name>
    </host>
    <storage_format>v3</storage_format>
    <wipe_after_delete>true</wipe_after_delete>
</storage_domain>

An example to import SCSI Storage Domain:

<storage_domain id="43aab646-776f-4ae7-bc01-87a7c9880c73">
  <name>scsi1</name>
  <comment>newComment</comment>
  <description>MyNewDescription</description>
  <wipe_after_delete>true</wipe_after_delete>
  <import>true</import>
  <host id="b78f820b-6653-4405-b466-ee15032e0cda" />
  <type>data</type>
  <storage>
     <type>iscsi</type>
  </storage>
</storage_domain>

Comment 8 Ori Gofen 2015-05-25 07:07:32 UTC
Maor, isn't the fix should include the webadmin fields?
right now, I confirm that this bug is verified only over rest-api

Comment 9 Maor 2015-05-25 14:05:10 UTC
(In reply to Ori Gofen from comment #8)
> Maor, isn't the fix should include the webadmin fields?
> right now, I confirm that this bug is verified only over rest-api

There is another RFE which handles this
see https://bugzilla.redhat.com/show_bug.cgi?id=1195784

Comment 10 Ori Gofen 2015-05-26 08:54:07 UTC
Verified using vt15 on rest-api, based on comment #9 the UI issue will be handled at bz #1195784

Comment 11 Sandro Bonazzola 2015-06-15 08:39:04 UTC
This is an automated message.
oVirt 3.5.3 has been released on June 15th 2015 and should include the fix for this BZ. Moving to closed current release.