Bug 1542377

Summary: Didn't create VG on the dirty iSCSI (or FC) storage while deploying HE based otopi
Product: [oVirt] cockpit-ovirt Reporter: Yihui Zhao <yzhao>
Component: Hosted EngineAssignee: Ryan Barry <rbarry>
Status: CLOSED DUPLICATE QA Contact: Yihui Zhao <yzhao>
Severity: high Docs Contact:
Priority: unspecified    
Version: ---CC: bugs, cshao, dguo, huzhao, phbailey, qiyuan, rbarry, sbonazzo, stirabos, weiwang, yaniwang, ycui, yisong, yturgema
Target Milestone: ---Flags: cshao: testing_ack+
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-02-06 09:12:44 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Node RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
select_force.png
none
create_vg_error none

Description Yihui Zhao 2018-02-06 08:53:14 UTC
Created attachment 1391882 [details]
select_force.png

Description of problem: 
Didn't create VG on the dirty iSCSI (or FC) storage while deploying HE based otopi.


Version-Release number of selected component (if applicable): 
cockpit-system-157-1.el7.noarch
cockpit-dashboard-157-1.el7.x86_64
cockpit-ovirt-dashboard-0.11.11-0.1.el7ev.noarch
cockpit-bridge-157-1.el7.x86_64
cockpit-storaged-157-1.el7.noarch
cockpit-157-1.el7.x86_64
cockpit-ws-157-1.el7.x86_64
ovirt-hosted-engine-ha-2.2.4-1.el7ev.noarch
ovirt-hosted-engine-setup-2.2.9-1.el7ev.noarch
rhvm-appliance-4.2-20180202.0.el7.noarch
rhvh-4.2.1.2-0.20180205.0+1


How reproducible: 
100%


Steps to Reproduce: 
1. Clean install latest RHVH4.2.1 with ks(rhvh-4.2.1.2-0.20180205.0+1)
2. Deploy HE with dirty iSCSI or FC storage via cockpit based otopi, select "Force" when ask 
WARNING: This will destroy existing data on the device.
          (Force, Abort)[Abort]? Force


Actual results: 
1. After step2, deploy HE failed.
From the cockpit or CLI:
[ ERROR ] Error creating Volume Group: Command LVMVolumeGroup.create with args {'devlist': [u'36005076300810b3e0000000000000027'], 'force': True, 'name': 'b49529ac-cc87-4ab2-b4ab-eff5c4d6b11f'} failed:
         (code=601, message=Failed to initialize physical device: ("[u'/dev/mapper/36005076300810b3e0000000000000027']",))
[ ERROR ] Failed to execute stage 'Misc configuration': Command LVMVolumeGroup.create with args {'devlist': [u'36005076300810b3e0000000000000027'], 'force': True, 'name': 'b49529ac-cc87-4ab2-b4ab-eff5c4d6b11f'} failed:
         (code=601, message=Failed to initialize physical device: ("[u'/dev/mapper/36005076300810b3e0000000000000027']",))
[ INFO  ] Yum Performing yum transaction rollback
[ INFO  ] Stage: Clean up
[ INFO  ] Generating answer file '/var/lib/ovirt-hosted-engine-setup/answers/answers-20180206155931.conf'
[ INFO  ] Stage: Pre-termination
[ INFO  ] Stage: Termination
[ ERROR ] Hosted Engine deployment failed: please check the logs for the issue, fix accordingly or re-deploy from scratch.
          Log file is located at /var/log/ovirt-hosted-engine-setup/ovirt-hosted-engine-setup-20180206155619-e5w4qb.log


Expected results: 
1. After step2, deploy HE successfully with dirty iSCSI or FC storage


Additional info: 
Deploy process with iSCSI or FC storage with CLI also meet the issue:
http://pastebin.test.redhat.com/553007
http://pastebin.test.redhat.com/553008

Comment 1 Yihui Zhao 2018-02-06 08:55:20 UTC
Created attachment 1391885 [details]
create_vg_error

Comment 2 Simone Tiraboschi 2018-02-06 09:12:44 UTC
This is a well know pvcreate issue, see: https://bugzilla.redhat.com/show_bug.cgi?id=1215427#c4

force option is not working when the LUN contains a partition table.

Workaround: manually destroy the partition table with 'dd if=/dev/zero ...' as for https://bugzilla.redhat.com/show_bug.cgi?id=1343043

*** This bug has been marked as a duplicate of bug 1527077 ***