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

Bug 1454864

Summary: Engine should block attempting to reduce a domain that with undetectable metadata device
Product: [oVirt] ovirt-engine Reporter: Liron Aravot <laravot>
Component: BLL.StorageAssignee: Allon Mureinik <amureini>
Status: CLOSED CURRENTRELEASE QA Contact: Eyal Shenitzky <eshenitz>
Severity: medium Docs Contact:
Priority: medium    
Version: futureCC: amureini, bazulay, bcholler, bugs, cshao, dguo, gveitmic, gwatson, huzhao, jcoscia, jentrena, jiawu, kgoldbla, laravot, lsurette, mgoldboi, mkalinin, nashok, nsoffer, qiyuan, rhodain, sbonazzo, srevivo, stirabos, tcarlin, tnisan, weiwang, yaniwang, ycui, ykaul, yzhao
Target Milestone: ovirt-4.1.3Keywords: ZStream
Target Release: 4.1.3Flags: rule-engine: ovirt-4.1+
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: 1446492 Environment:
Last Closed: 2017-07-06 13:26:44 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: 1446492, 1460501    
Bug Blocks:    

Comment 1 Eyal Shenitzky 2017-06-11 11:05:21 UTC
After following the steps to reproduced step 4 failed due to:

	
Jun 11, 2017 1:58:20 PM

Failed to extend Storage Domain iscsi_1. (User: admin@internal-authz)

Jun 11, 2017 1:58:20 PM

VDSM command ExtendStorageDomainVDS failed: Cannot extend Volume Group: "vgname=c00b0577-4be8-434d-ac6d-fad06daa7172, devname=['/dev/mapper/3514f0c5a516008dd', '/dev/mapper/3514f0c5a516008dd', '/dev/mapper/3514f0c5a516008dd', '/dev/mapper/3514f0c5a516008dd']"

Engine log:

2017-06-11 13:58:20,481+03 ERROR [org.ovirt.engine.core.vdsbroker.irsbroker.ExtendStorageDomainVDSCommand] (default task-23) [118515b7] Failed in 'ExtendStorageDomainVDS' method
2017-06-11 13:58:20,500+03 ERROR [org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogDirector] (default task-23) [118515b7] EVENT_ID: IRS_BROKER_COMMAND_FAILURE(10,803), Correlation ID: null, Call Stack: null, Custom Event ID: -1, Message: VDSM command ExtendStorageDomainVDS failed: Cannot extend Volume Group: "vgname=c00b0577-4be8-434d-ac6d-fad06daa7172, devname=['/dev/mapper/3514f0c5a516008dd', '/dev/mapper/3514f0c5a516008dd', '/dev/mapper/3514f0c5a516008dd', '/dev/mapper/3514f0c5a516008dd']"
2017-06-11 13:58:20,500+03 ERROR [org.ovirt.engine.core.vdsbroker.irsbroker.IrsBrokerCommand] (default task-23) [118515b7] IrsBroker::Failed::ExtendStorageDomainVDS: IRSGenericException: IRSErrorException: Failed to ExtendStorageDomainVDS, error = Cannot extend Volume Group: "vgname=c00b0577-4be8-434d-ac6d-fad06daa7172, devname=['/dev/mapper/3514f0c5a516008dd', '/dev/mapper/3514f0c5a516008dd', '/dev/mapper/3514f0c5a516008dd', '/dev/mapper/3514f0c5a516008dd']", code = 503
2017-06-11 13:58:20,522+03 INFO  [org.ovirt.engine.core.vdsbroker.irsbroker.ExtendStorageDomainVDSCommand] (default task-23) [118515b7] FINISH, ExtendStorageDomainVDSCommand, log id: 40c6a546
2017-06-11 13:58:20,523+03 ERROR [org.ovirt.engine.core.bll.storage.domain.ExtendSANStorageDomainCommand] (default task-23) [118515b7] Command 'org.ovirt.engine.core.bll.storage.domain.ExtendSANStorageDomainCommand' failed: EngineException: org.ovirt.engine.core.vdsbroker.irsbroker.IRSErrorException: IRSGenericException: IRSErrorException: Failed to ExtendStorageDomainVDS, error = Cannot extend Volume Group: "vgname=c00b0577-4be8-434d-ac6d-fad06daa7172, devname=['/dev/mapper/3514f0c5a516008dd', '/dev/mapper/3514f0c5a516008dd', '/dev/mapper/3514f0c5a516008dd', '/dev/mapper/3514f0c5a516008dd']", code = 503 (Failed with error VolumeGroupExtendError and code 503)

Is this the expected result?

Comment 2 Eyal Shenitzky 2017-06-11 11:22:17 UTC
It seems like a different bug that blocks from verifying this bug.

Comment 3 Eyal Shenitzky 2017-06-14 06:12:42 UTC
 Verified with the following code:
---------------------------------------
VDSM - 4.19.18-1.el7ev.x86_64
RHEVM - 4.1.3.2-0.1.el7
 
Steps to Reproduce:
1. Have a DC with 2 block storage domains and one host
2. Modify blockSD.py on the host, change getInfo() to not return the vgMetadataDevice field.
3. Move the host to maintenance, restart the vdsm service and active the host.
4. Extend the non master domain using a free device.
5. Move the non master domain to maintenance
6. update the vg_metadata_device column in storage_domain_static to be null

update storage_domain_static set vg_metadata_device = null where id = 'DOMAIN_ID';

7. Attempt to reduce the device added in step #4 - verify that the engine fails the operation before executing it using the host.

Following Error received on the engine:

ERROR [org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogDirector] (DefaultQuartzScheduler8) [36c13bbd-ec79-49fc-820a-6f2f2fca959f] EVENT_ID: FAILED_DETERMINE_STORAGE_DOMAIN_METADATA_DEVICES(1,219), Correlation ID: null, Call Stack: null, Custom Event ID: -1, Message: Failed to determine the metadata devices of Storage Domain iscsi_1.


ERROR [org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogDirector] (DefaultQuartzScheduler1) [36c13bbd-ec79-49fc-820a-6f2f2fca959f] EVENT_ID: USER_REDUCE_DOMAIN_DEVICES_FAILED(1,213), Correlation ID: 36c13bbd-ec79-49fc-820a-6f2f2fca959f, Job ID: 93a8b20d-f875-4833-a6c0-cf3101e426b6, Call Stack: null, Custom Event ID: -1, Message: Failed to reduce Storage iscsi_1. (User: admin@internal-authz).

As expected.

Moving to VERIFIED