Bug 1067474
| Summary: | [vdsm] wrong treatment with scan alignment to non-partitioned devices | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [Retired] oVirt | Reporter: | Elad <ebenahar> | ||||
| Component: | vdsm | Assignee: | Yeela Kaplan <ykaplan> | ||||
| Status: | CLOSED WONTFIX | QA Contact: | Aharon Canan <acanan> | ||||
| Severity: | medium | Docs Contact: | |||||
| Priority: | unspecified | ||||||
| Version: | 3.4 | CC: | abaron, acathrow, bazulay, ebenahar, gklein, iheim, mgoldboi, nsoffer, oourfali, sgotliv, yeylon | ||||
| Target Milestone: | --- | Keywords: | Reopened, Triaged | ||||
| Target Release: | 3.4.0 | ||||||
| Hardware: | x86_64 | ||||||
| OS: | Unspecified | ||||||
| Whiteboard: | storage | ||||||
| Fixed In Version: | Doc Type: | Bug Fix | |||||
| Doc Text: | Story Points: | --- | |||||
| Clone Of: | Environment: | ||||||
| Last Closed: | 2014-02-23 10:33:36 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: | |||||||
| Attachments: |
|
||||||
Ignore 'One of:' under expected results Elad, what is the functional effect on Engine? Is it currently impossible to add a black disk to a VM? Sergey, do you know how to detect such disks? Dan, The only functional effect on Engine is that user never see the scan result. I mean he expects to get the clear answer 'aligned' or 'misaligned' but in this particular case nothing happens on Engine. Nir, Engine can't detect non partitioned disks without VDSM help more than that I don't see any reason to do that, it just needs to propagate the error to the user probably by logging it in the audit log. About the error itself. Virt-alignment-scan - utility we use to scan alignments, returns error code 1 in too many cases including that one when there are no partitions on the disk. The only way to distinguish between different errors is examining the error message which is a bad practice either... After running the same scenario, I see that VDSM reports that an error has been occurred during the scan, but the error is too general because the underlying utility doesn't provide any special error code for that and as I mentioned before the only way to detect what really happened is examining the error message.
Anyway Engine reports the error in the audit log ('Alignment scan of disk 'VM2_Disk4' failed.). I think that under given circumstances the system behaves fine.
(In reply to Sergey Gotliv from comment #5) > After running the same scenario, I see that VDSM reports that an error has > been occurred during the scan, but the error is too general because the > underlying utility doesn't provide any special error code for that and as I > mentioned before the only way to detect what really happened is examining > the error message. > > Anyway Engine reports the error in the audit log ('Alignment scan of disk > 'VM2_Disk4' failed.). I think that under given circumstances the system > behaves fine. Sergey, From user perspective, I don't think that the failure message in audit log is enough. It doesn't give the appropriate information about the reason for the scan failure. I don't see why closing the bug, this error in vdsm should be caught and translated to an informative error to user. |
Created attachment 865533 [details] engine and vdsm logs Description of problem: I tried to scan alignment to a disk which has no partitions under it. Scan alignment to that disk raised the following error message in vdsm.log: Thread-5180::ERROR::2014-02-20 15:30:39,077::BindingXMLRPC::994::vds::(wrapper) unexpected error Traceback (most recent call last): File "/usr/share/vdsm/BindingXMLRPC.py", line 978, in wrapper res = f(*args, **kwargs) File "/usr/share/vdsm/BindingXMLRPC.py", line 370, in diskGetAlignment return api.getDiskAlignment(driveSpecs) File "/usr/share/vdsm/API.py", line 702, in getDiskAlignment return self._cif.getDiskAlignment(drive) File "/usr/share/vdsm/clientIF.py", line 355, in getDiskAlignment out = alignmentScan.scanImage(volPath) File "/usr/share/vdsm/alignmentScan.py", line 53, in scanImage "or guest:\n%s" % err) VirtAlignError: An error scanning the disk image or guest: ['libguestfs: error: part_list: parted print: /dev/sda: ', ' ', 'Error: /dev/sda: unrecognised disk label', ''] Dummy-150::DEBUG::2014-02-20 15:30:39,278::storage_mailbox::733::Storage.Misc.excCmd::(_checkForMail) 'dd if=/rhev/data-center/235c8719-6c66-4535-b13c-95591998d068/mastersd/dom_md/inbox iflag=direct,fullblock count=1 bs=1024000' (cwd None) Version-Release number of selected component (if applicable): vdsm-4.14.3-0.el6.x86_64 ovirt-engine-3.4.0-0.11.beta3.el6.noarch How reproducible: Always Steps to Reproduce: Shared DC with block storage domain 1. Create a VM and attach an active preallocated disk to it (don't install OS) 2. Scan alignment to the disk Actual results: Scan alignment to a non-partitioned disk fails with the mentioned error Expected results: One of: If it's impossible to scan alignment to a non-partitioned disk, user should be notified (vdsm should inform engine that the disk has no partitions under it) Additional info: engine and vdsm logs