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

Bug 1544201

Summary: Prompt guest name is invalid or identified guest name is wrong when import guest from export domain to data domain at rhv4.2
Product: [oVirt] ovirt-engine Reporter: mxie <mxie>
Component: BLL.VirtAssignee: Sharon Gratch <sgratch>
Status: CLOSED CURRENTRELEASE QA Contact: Nisim Simsolo <nsimsolo>
Severity: high Docs Contact:
Priority: high    
Version: ---CC: bugs, dyuan, juzhou, kuwei, lsurette, lveyde, michal.skrivanek, mzhan, nsimsolo, rbalakri, Rhev-m-bugs, srevivo, tzheng, xiaodwan, ykaul
Target Milestone: ovirt-4.2.2Flags: rule-engine: ovirt-4.2+
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
Whiteboard:
Fixed In Version: ovirt-engine-4.2.2.4 Doc Type: Bug Fix
Doc Text:
Please see doc text for bug 1529248.
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-04-05 09:39:14 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Virt RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
invalid_name
none
identified_wrong_name
none
identified_wrong_name_again
none
vdsm.log
none
engine.log
none
invalid-name-rhv-4.2.2.6
none
duplicate_guest_name none

Description mxie@redhat.com 2018-02-11 09:04:51 UTC
Created attachment 1394517 [details]
invalid_name

Description of problem:
Prompt guest name is invalid or identified guest name is wrong when import guest from export domain to data domain at rhv4.2


Version-Release number of selected component (if applicable):
vdsm-4.20.17-1.el7ev.x86_64
rhv:4.2.1.5-0.1.el7

How reproducible:
80%

Steps to Reproduce:
Problem1rompt guest name is invalid
1.Using virt-v2v convert a guest to rhv4.2's export domain
2.After finishing conversion, try to import this guest from export domain to data domain, but prompt guest name is invalid sometimes, but refer to screenshot "invalid_name"
3.If click "cancel" to close the dialogue and try to import this guest again, sometimes the guest could be imported successfully, sometimes will prompt guest name is invalid again

Note:although the importation is failed with invalid guest name, the guest has been imported to data domain actually sometimes.


Problem2:identified guest name is wrong
1.Using virt-v2v convert a guest to rhv4.2's export domain
2.After finishing conversion, try to import this guest from export domain to data domain, such as, I want to import guest "xen-hvm-rhel5.11-i386" to data domain, but importation will be failed due to other VM name 'esx6.0-win2008r2-x86_64' already exist in data domain sometimes, pls refer to screenshot "identified_wrong_name."

2.1 Check guest name in ovf file is right
#cat /home/nfs_export/ef7ee7ef-a1b7-455e-93c8-58a7afbe4119/master/vms/20793a05-d2a1-460b-bc4f-ba9826eca6bd/20793a05-d2a1-460b-bc4f-ba9826eca6bd.ovf

</Section>
  <Content ovf:id='out' xsi:type='ovf:VirtualSystem_Type'>
    <Name>xen-hvm-rhel5.11-i386</Name>
    <TemplateId>00000000-0000-0000-0000-000000000000</TemplateId>
    <TemplateName>Blank</TemplateName>
    <Description>generated by virt-v2v 1.36.10rhel=7,release=6.el7,libvirt</Description>
....

3.If click "cancel" to close the dialogue and try to import this guest again, the importation will be failed with error" another VM name already exist in data domain" sometimes, pls refer to screenshot "identified_wrong_name_again."


Actual results:
As subject

Expected results:
Could import guest from export domain to data domain successfully with 100% at rhv4.2

Additional info:

Comment 1 mxie@redhat.com 2018-02-11 09:11:51 UTC
Created attachment 1394518 [details]
identified_wrong_name

Comment 2 mxie@redhat.com 2018-02-11 09:12:36 UTC
Created attachment 1394519 [details]
identified_wrong_name_again

Comment 3 mxie@redhat.com 2018-02-11 09:14:41 UTC
Created attachment 1394520 [details]
vdsm.log

Comment 4 mxie@redhat.com 2018-02-11 09:17:17 UTC
Created attachment 1394521 [details]
engine.log

Comment 5 Nisim Simsolo 2018-04-04 08:31:42 UTC
Verification builds:
rhvm-4.2.2.6-0.1.el7
libvirt-client-3.9.0-14.el7_5.2.x86_64
qemu-kvm-rhev-2.10.0-21.el7_5.1.x86_64
sanlock-3.6.0-1.el7.x86_64
vdsm-4.20.23-1.el7ev.x86_64
virt-v2v-1.36.10-6.el7.x86_64

Verification scenario:
1. Export KVM guest or VMware OVA to export domain.
2. Browse Webadmin -> storage -> domains -> export domain -> VM import:
Select VM -> import
3. Verify VM name is not prompted as invalid in the import dialog.
4. click cancel and repeat step 3 few times.
5. Open import dialog, don't change the VM name and start import.
6. verify import succeed. Run VM and verify VM is running.
7. Open export domain -> import dialog again for this VM
8. Verify clone checkbox is checked and cannot be unchaked.
verify "invalid name" icon is prompted for this VM and VM name frame is red.
9. Click "ok" button and verify action is rejected by Webadmin and import dialog remains open.
10. rename VM in VM name and click ok button.
11. Verify import succeed, run VM and verify VM is running properly.

Comment 6 Sandro Bonazzola 2018-04-05 09:39:14 UTC
This bugzilla is included in oVirt 4.2.2 release, published on March 28th 2018.

Since the problem described in this bug report should be
resolved in oVirt 4.2.2 release, it has been closed with a resolution of CURRENT RELEASE.

If the solution does not work for you, please open a new bug report.

Comment 8 mxie@redhat.com 2018-04-17 08:38:50 UTC
Created attachment 1422947 [details]
invalid-name-rhv-4.2.2.6

Comment 10 Nisim Simsolo 2018-04-30 08:02:24 UTC
Created attachment 1428702 [details]
duplicate_guest_name