Bug 1154353 - [Hosted-engine] deployment of hosted engine with iSCSI failed with Failed to initialize physical device: ("['/dev/mapper/1IET_00010001']"
Summary: [Hosted-engine] deployment of hosted engine with iSCSI failed with Failed to ...
Keywords:
Status: CLOSED INSUFFICIENT_DATA
Alias: None
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: vdsm
Version: 3.5.0
Hardware: All
OS: Linux
medium
medium
Target Milestone: ovirt-4.0.0-alpha
: 4.0.0
Assignee: Adam Litke
QA Contact: Aharon Canan
URL:
Whiteboard: storage
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-10-19 07:46 UTC by Ulhas Surse
Modified: 2016-02-10 17:31 UTC (History)
23 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-11-10 14:10:25 UTC
oVirt Team: Storage
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
Hosted engine setup log (235.91 KB, text/plain)
2014-10-27 07:10 UTC, justin
no flags Details
logs (46.29 KB, application/zip)
2014-10-27 10:13 UTC, justin
no flags Details
hosted-engine --deploy log file (229.10 KB, text/plain)
2014-12-09 21:21 UTC, Alexis
no flags Details
SELinux mode to permissive mode audit.log (345.87 KB, text/plain)
2014-12-10 12:26 UTC, Alexis
no flags Details
SELinux mode to permissive mode vdsm.log (155.80 KB, text/plain)
2014-12-10 12:26 UTC, Alexis
no flags Details
SELinux mode to permissive mode hosted-engine setup log (228.84 KB, text/plain)
2014-12-10 12:27 UTC, Alexis
no flags Details

Description Ulhas Surse 2014-10-19 07:46:38 UTC
Description of problem:
Running "hosted-engine --deploy" exits with error: 
Failed to initialize physical device: ("['/dev/mapper/1IET_00010001']")

Version-Release number of selected component (if applicable):
Red Hat Enterprise Virtualization 3.5

How reproducible:
Always

Steps to Reproduce:
1. Run hosted-engine --deploy
2. Error will be displayed

Actual results:
          Please confirm installation settings (Yes, No)[Yes]: Yes
[ INFO  ] Generating answer file '/etc/ovirt-hosted-engine/answers.conf'
[ INFO  ] Stage: Transaction setup
[ INFO  ] Stage: Misc configuration
[ INFO  ] Stage: Package installation
[ INFO  ] Stage: Misc configuration
[ INFO  ] Configuring libvirt
[ INFO  ] Configuring VDSM
[ INFO  ] Starting vdsmd
[ INFO  ] Waiting for VDSM hardware info
[ INFO  ] Waiting for VDSM hardware info
[ INFO  ] Configuring the management bridge
[ INFO  ] Creating Volume Group
[ ERROR ] Failed to execute stage 'Misc configuration': Failed to initialize physical device: ("['/dev/mapper/1IET_00010001']",)
[ INFO  ] Stage: Clean up
[ INFO  ] Generating answer file '/etc/ovirt-hosted-engine/answers.conf'
[ INFO  ] Answer file '/etc/ovirt-hosted-engine/answers.conf' has been updated
[ INFO  ] Stage: Pre-termination
[ INFO  ] Stage: Termination

Expected results:
setup Should run without error.

Additional info:
Work Around:
Run # multipath -r
Run # hosted-engine --deploy

Comment 2 Sandro Bonazzola 2014-10-21 12:40:45 UTC
Can you please attach logs from the host?

Comment 3 justin 2014-10-27 07:08:41 UTC
I'm experiencing the same symptoms on an installation of ovirt 3.5 on Centos 7.  Log attached per Didi's request.

Comment 4 justin 2014-10-27 07:10:06 UTC
Created attachment 950896 [details]
Hosted engine setup log

Comment 5 justin 2014-10-27 10:13:32 UTC
Created attachment 950930 [details]
logs

Reinstalled the host and ran the deployment again.  Attached are the requested logs.

Comment 6 justin 2014-10-27 10:23:12 UTC
The workaround in the initial report doesn't work for me.

Comment 7 Sandro Bonazzola 2014-10-29 11:39:26 UTC
(In reply to justin from comment #5)
> Created attachment 950930 [details]
> logs
> 
> Reinstalled the host and ran the deployment again.  Attached are the
> requested logs.

The setup log shows:

2014-10-27 20:07:33 DEBUG otopi.plugins.ovirt_hosted_engine_setup.storage.iscsi iscsi._iscsi_get_lun_list:252 {'status': {'message': 'OK', 'code': 0}, 'devList': [{'status': 'free', 'vendorID': 'LIO-ORG', 'capacity': '32212254720', 'fwrev': '4.0', 'vgUUID': '', 'pathlist': [{'initiatorname': 'default', 'connection': '10.50.0.200', 'iqn': 'iqn.2014-10.storage.redfish.san0:iscsi0', 'portal': '1', 'user': 'redfish', 'password': '**FILTERED**', 'port': '3260'}], 'logicalblocksize': '512', 'pathstatus': [{'physdev': 'sdb', 'type': 'iSCSI', 'state': 'active', 'lun': '0'}], 'devtype': 'iSCSI', 'physicalblocksize': '8192', 'pvUUID': '', 'serial': 'SLIO-ORG_IBLOCK_fbaac4f3-0dd6-47b0-83c6-a0116479d61f', 'GUID': '36001405fbaac4f30dd647b083c6a0116', 'productID': 'IBLOCK'}]}
2014-10-27 20:07:33 INFO otopi.plugins.ovirt_hosted_engine_setup.storage.iscsi iscsi._misc:487 Creating Volume Group
2014-10-27 20:07:33 DEBUG otopi.plugins.ovirt_hosted_engine_setup.storage.iscsi iscsi._misc:495 {'status': {'message': 'Failed to initialize physical device: ("[\'/dev/mapper/36001405fbaac4f30dd647b083c6a0116\']",)', 'code': 601}}

vdsm log shows:

Thread-18::DEBUG::2014-10-27 20:07:33,481::lvm::288::Storage.Misc.excCmd::(cmd) FAILED: <err> = '  /dev/mapper/36001405fbaac4f30dd647b083c6a0116: write failed after 0 of 4096 at 4096: Operation not permitted\n  Failed to wipe new metadata area at the start of the /dev/mapper/36001405fbaac4f30dd647b083c6a0116\n  Failed to add metadata area for new physical volume /dev/mapper/36001405fbaac4f30dd647b083c6a0116\n  Failed to setup physical volume "/dev/mapper/36001405fbaac4f30dd647b083c6a0116"\n'; <rc> = 5

Comment 8 Allon Mureinik 2014-10-29 12:33:07 UTC
Adam, can you take a look please?

Comment 9 Adam Litke 2014-11-13 22:03:54 UTC
From vdsm.log I see:

Thread-18::ERROR::2014-10-27 20:07:33,483::lvm::727::Storage.LVM::(_initpvs) pvcreate failed with rc=5
Thread-18::ERROR::2014-10-27 20:07:33,483::lvm::728::Storage.LVM::(_initpvs) [], ['  /dev/mapper/36001405fbaac4f30dd647b083c6a0116: write failed after 0 of 4096 at 4096: Operation not permitted', '  Failed to wipe new metadata area at the start of the /dev/mapper/36001405fbaac4f30dd647b083c6a0116', '  Failed to add metadata area for new physical volume /dev/mapper/36001405fbaac4f30dd647b083c6a0116', '  Failed to setup physical volume "/dev/mapper/36001405fbaac4f30dd647b083c6a0116"']


I'd be interested in taking a look at the lower level device mapper and lvm error messages.  Could you try to reproduce this and then attach a sosreport to the bug so I can view those other log files please?

Comment 10 Allon Mureinik 2014-12-01 11:54:17 UTC
(In reply to Adam Litke from comment #9)
> From vdsm.log I see:
> 
> Thread-18::ERROR::2014-10-27 20:07:33,483::lvm::727::Storage.LVM::(_initpvs)
> pvcreate failed with rc=5
> Thread-18::ERROR::2014-10-27 20:07:33,483::lvm::728::Storage.LVM::(_initpvs)
> [], ['  /dev/mapper/36001405fbaac4f30dd647b083c6a0116: write failed after 0
> of 4096 at 4096: Operation not permitted', '  Failed to wipe new metadata
> area at the start of the /dev/mapper/36001405fbaac4f30dd647b083c6a0116', ' 
> Failed to add metadata area for new physical volume
> /dev/mapper/36001405fbaac4f30dd647b083c6a0116', '  Failed to setup physical
> volume "/dev/mapper/36001405fbaac4f30dd647b083c6a0116"']
> 
> 
> I'd be interested in taking a look at the lower level device mapper and lvm
> error messages.  Could you try to reproduce this and then attach a sosreport
> to the bug so I can view those other log files please?

We're unable to reproduce this in dev, and the needinfo went unaswered for over two weeks.
If you're able to reproduce it, please do so, and attach the sos report as requested in comment 9.

Comment 11 Alexis 2014-12-09 21:21:06 UTC
Created attachment 966491 [details]
hosted-engine --deploy log file

I'm running into the same problem now.

1. Installed Centos 7 minimal install.
2. Ran through this guide http://community.redhat.com/blog/2014/10/up-and-running-with-ovirt-3-5/
3. Skipped Gluster preparations as I was using iscsi
4. Got as far as "Installing the hosted engine"
4.1 Created temp folder downloaded CentOS-6.6-x86_64-minimal.iso into this folder & ran chown on the folder as per the guide
4.2 Ran screen
5. Ran "hosted-engine --deploy"
5.1 ran through all settings chose iscsi as STORAGE CONFIGURATION (did not use authentication to rule that out as an issue
5.2 Completed the remained of the settings and confirmed installation settings
6. Process runs through but receive the following error: [ ERROR ] Failed to execute stage 'Misc configuration': Failed to initialize physical device: ("['/dev/mapper/360014055bc638d8d39c9d38c1d8cf8d9']",)

Below is the last of the output from the script

 --== CONFIGURATION PREVIEW ==--
         
          Engine FQDN                        : ovirt.fourthfloorsolutions.com
          Bridge name                        : ovirtmgmt
          SSH daemon port                    : 22
          Firewall manager                   : iptables
          Gateway address                    : 10.0.1.1
          Host name for web application      : hosted_engine_1
          iSCSI Target Name                  : iqn.2000-01.com.synology:ds.target-1.b1492a8e25
          iSCSI Portal port                  : 3260
          Host ID                            : 1
          iSCSI LUN ID                       : 0
          Image size GB                      : 25
          iSCSI Portal IP Address            : 10.0.1.220
          iSCSI Portal user                  : 
          Console type                       : vnc
          Memory size MB                     : 4096
          MAC address                        : 00:16:3e:5b:bd:34
          Boot type                          : cdrom
          Number of CPUs                     : 2
          ISO image (for cdrom boot)         : /home/tmp/CentOS-6.6-x86_64-minimal.iso
          CPU Type                           : model_Opteron_G3
         
          Please confirm installation settings (Yes, No)[Yes]: 
[ INFO  ] Generating answer file '/etc/ovirt-hosted-engine/answers.conf'
[ INFO  ] Stage: Transaction setup
[ INFO  ] Stage: Misc configuration
[ INFO  ] Stage: Package installation
[ INFO  ] Stage: Misc configuration
[ INFO  ] Configuring libvirt
[ INFO  ] Configuring VDSM
[ INFO  ] Starting vdsmd
[ INFO  ] Waiting for VDSM hardware info
[ INFO  ] Waiting for VDSM hardware info
[ INFO  ] Creating Volume Group
[ ERROR ] Failed to execute stage 'Misc configuration': Failed to initialize physical device: ("['/dev/mapper/360014055bc638d8d39c9d38c1d8cf8d9']",)
[ INFO  ] Stage: Clean up
[ INFO  ] Generating answer file '/etc/ovirt-hosted-engine/answers.conf'
[ INFO  ] Answer file '/etc/ovirt-hosted-engine/answers.conf' has been updated
[ INFO  ] Stage: Pre-termination
[ INFO  ] Stage: Termination

I've since wiped the machine and started from scratch with the same issue.

I have checked that I can access the iscsi pun from a windows box which I can then initiate a volume on I have also tried this from an OS X machine so access to the lun is working.

Comment 12 Nir Soffer 2014-12-10 07:15:48 UTC
(In reply to Alexis from comment #11)

The error in the original report smell like selinux issue:

  /dev/mapper/36001405fbaac4f30dd647b083c6a0116: write failed after 0 of 4096
  at 4096: Operation not permitted

Please check if using selinux permissive mode fixes this issue. If it does, please attach /var/log/audit/audit.log and /var/log/vdsm/vdsm.log

Comment 13 Alexis 2014-12-10 12:26:17 UTC
Created attachment 966762 [details]
SELinux mode to permissive mode audit.log

Just to re-check did a fresh install again of Centos 7 this morning ran through the same steps again on http://community.redhat.com/blog/2014/10/up-and-running-with-ovirt-3-5/

Ran screen and then hosted-engine --deploy once and it failed again.

Then ran setenforce 0 to set SELinux mode to permissive mode.

Then re-ran hosted-engine --deploy and it failed once again.

Attached is the audit log i'll attach the vdsm log and hosted-engine log as well.

Comment 14 Alexis 2014-12-10 12:26:57 UTC
Created attachment 966763 [details]
SELinux mode to permissive mode vdsm.log

Comment 15 Alexis 2014-12-10 12:27:31 UTC
Created attachment 966764 [details]
SELinux mode to permissive mode hosted-engine setup log

Comment 16 Alexis 2014-12-10 12:29:40 UTC
If it helps at all I can give direct ssh access to the machine in question as it is a development machine and can be broken and rebuilt if need be.

Comment 17 Pablo Iranzo Gómez 2015-05-07 09:03:11 UTC
I've hit this one too on EL7 host:

2015-05-07 10:58:19 DEBUG otopi.context context._executeMethod:138 Stage misc METHOD otopi.plugins.ovirt_hosted_engine_setup.storage.iscsi.Plugin._misc
2015-05-07 10:58:20 DEBUG otopi.plugins.ovirt_hosted_engine_setup.storage.iscsi iscsi._iscsi_get_lun_list:251 {'status': {'message': 'OK', 'code': 0}, 'devList': [{'status': 'used', 'vendorID': 'LIO-ORG', 'capacity': '107374182400', 'fwre
v': '4.0', 'vgUUID': '', 'pathlist': [{'connection': '192.168.2.12', 'iqn': 'iqn.2015-05.com.example.nas:rhevm', 'portal': '1', 'port': '3260', 'initiatorname': 'default'}], 'logicalblocksize': '512', 'pathstatus': [{'physdev': 'sdb', 'ty
pe': 'iSCSI', 'state': 'active', 'lun': '0'}], 'devtype': 'iSCSI', 'physicalblocksize': '4096', 'pvUUID': '', 'serial': 'SLIO-ORG_rhevm_846d8705-fdae-4cff-93ae-e564eb6a2133', 'GUID': '36001405846d8705fdae4cff93aee564e', 'productID': 'rhev
m'}]}
2015-05-07 10:58:20 INFO otopi.plugins.ovirt_hosted_engine_setup.storage.iscsi iscsi._misc:500 Creating Volume Group
2015-05-07 10:58:21 DEBUG otopi.plugins.ovirt_hosted_engine_setup.storage.iscsi iscsi._misc:508 {'status': {'message': 'Failed to initialize physical device: ("[\'/dev/mapper/36001405846d8705fdae4cff93aee564e\']",)', 'code': 601}}
2015-05-07 10:58:21 DEBUG otopi.context context._executeMethod:152 method exception
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/otopi/context.py", line 142, in _executeMethod
    method['method']()
  File "/usr/share/ovirt-hosted-engine-setup/scripts/../plugins/ovirt-hosted-engine-setup/storage/iscsi.py", line 510, in _misc
    raise RuntimeError(dom['status']['message'])
RuntimeError: Failed to initialize physical device: ("['/dev/mapper/36001405846d8705fdae4cff93aee564e']",)
2015-05-07 10:58:21 ERROR otopi.context context._executeMethod:161 Failed to execute stage 'Misc configuration': Failed to initialize physical device: ("['/dev/mapper/36001405846d8705fdae4cff93aee564e']",)


The drive is there, I can mkfs over it to try access, but installer fails.

Whay logs do you need for this?

Regards,
Pablo

Comment 18 Yaniv Lavi 2015-05-18 11:23:56 UTC
Is there customer ticket on this?

Comment 19 Pablo Iranzo Gómez 2015-05-18 11:44:28 UTC
Yaniv, for my case no, that's my own environment but this bz seemed a match

Comment 20 Nir Soffer 2015-05-18 11:53:11 UTC
I have seen this issue without hosted engine setup, when trying to remove a pv was used as direct lun and included a copy of a boot disk.

Lets try to reproduce this like this:

1. Start vm
2. Attach direct lun disk
3. Copy the boot disk to the second disk within the vm:
   dd if=/dev/vda of=/dev/vdb bs=1M
4. Disconnect the second disk
5. Stop the vm
6. Try to create a storage domain using the same pv

Comment 21 Ronald Claveau 2015-05-21 12:32:14 UTC
I don't know if it can help, but, I had the same issue, cause my iscsi was demo_mode_write_protect.

Comment 22 Yaniv Lavi 2015-10-22 08:35:10 UTC
Did you try the tip on comment 21? did it resolve your issue?

Comment 23 Tal Nisan 2015-11-10 14:10:25 UTC
No reply for a few weeks now, closing as insufficient data


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