Created attachment 1539100 [details] engine and vdsm logs Description of problem: remove managed block disks from VM which have a template create from it fails - USER_REMOVE_VM_FINISHED_WITH_ILLEGAL_DISKS Version-Release number of selected component (if applicable): ovirt engine Software Version:4.3.1.1-0.1.el7 Cinderlib Version: 0.3.9 How reproducible: 100% Steps to Reproduce: 1. Add managed block SD (done on HP3PAR backend storage on FC driver) 1. Create a VM with a managed block disk 2. Create a template from the VM 3. Remove VM + disk from webadmin Actual results: Remove VM works but removing the managed block disk fails with the following error in the engine log: 2019-02-27 11:12:20,358+02 INFO [org.ovirt.engine.core.bll.storage.disk.managedblock.RemoveManagedBlockStorageDiskCommand] (EE-ManagedThreadFactory-commandCoordinator-Thread-2) [fccf5f4e-9950-49ab-b085-cad6ac286e6a] Running command: RemoveManagedBlockStorageDiskCommand internal: true. 2019-02-27 11:12:32,206+02 ERROR [org.ovirt.engine.core.common.utils.cinderlib.CinderlibExecutor] (EE-ManagedThreadFactory-commandCoordinator-Thread-2) [fccf5f4e-9950-49ab-b085-cad6ac286e6a] cinderlib execution failed: Traceback (most recent call last): File "./cinderlib-client.py", line 137, in main args.command(args) File "./cinderlib-client.py", line 160, in delete_volume vol.delete() File "/usr/lib/python2.7/site-packages/cinderlib/objects.py", line 461, in delete self.save() File "/usr/lib/python2.7/site-packages/cinderlib/objects.py", line 593, in save self.persistence.set_volume(self) File "/usr/lib/python2.7/site-packages/cinderlib/persistence/dbms.py", line 227, in set_volume self.db.volume_update(objects.CONTEXT, volume.id, changed) File "/usr/lib/python2.7/site-packages/cinder/db/sqlalchemy/api.py", line 247, in wrapper return f(*args, **kwargs) File "/usr/lib/python2.7/site-packages/cinder/db/sqlalchemy/api.py", line 195, in wrapper return f(*args, **kwargs) File "/usr/lib/python2.7/site-packages/cinder/db/sqlalchemy/api.py", line 2472, in volume_update result = query.filter_by(id=volume_id).update(values) File "/usr/lib64/python2.7/site-packages/sqlalchemy/orm/query.py", line 3345, in update update_op.exec_() File "/usr/lib64/python2.7/site-packages/sqlalchemy/orm/persistence.py", line 1179, in exec_ self._do_exec() File "/usr/lib64/python2.7/site-packages/sqlalchemy/orm/persistence.py", line 1334, in _do_exec mapper=self.mapper) File "/usr/lib64/python2.7/site-packages/sqlalchemy/orm/session.py", line 1139, in execute bind, close_with_result=True).execute(clause, params or {}) File "/usr/lib64/python2.7/site-packages/sqlalchemy/engine/base.py", line 945, in execute return meth(self, multiparams, params) File "/usr/lib64/python2.7/site-packages/sqlalchemy/sql/elements.py", line 263, in _execute_on_connection return connection._execute_clauseelement(self, multiparams, params) File "/usr/lib64/python2.7/site-packages/sqlalchemy/engine/base.py", line 1053, in _execute_clauseelement compiled_sql, distilled_params File "/usr/lib64/python2.7/site-packages/sqlalchemy/engine/base.py", line 1189, in _execute_context context) File "/usr/lib64/python2.7/site-packages/sqlalchemy/engine/base.py", line 1398, in _handle_dbapi_exception util.raise_from_cause(newraise, exc_info) File "/usr/lib64/python2.7/site-packages/sqlalchemy/util/compat.py", line 203, in raise_from_cause reraise(type(exception), exception, tb=exc_tb, cause=cause) File "/usr/lib64/python2.7/site-packages/sqlalchemy/engine/base.py", line 1182, in _execute_context context) File "/usr/lib64/python2.7/site-packages/sqlalchemy/engine/default.py", line 470, in do_execute cursor.execute(statement, parameters) DBError: (psycopg2.ProgrammingError) syntax error at or near "=" LINE 1: ...ATE volumes SET volume_id = id AND deleted = false='{}', vol... ^ [SQL: 'UPDATE volumes SET volume_id = id AND deleted = false=%(param_1)s, volume_id = id AND deleted = false=%(param_2)s, created_at=%(created_at)s, updated_at=%(updated_at)s, deleted_at=%(deleted_at)s, deleted=%(deleted)s, _name_id=%(_name_id)s, ec2_id=%(ec2_id)s, user_id=%(user_id)s, project_id=%(project_id)s, snapshot_id=%(snapshot_id)s, cluster_name=%(cluster_name)s, host=%(host)s, size=%(size)s, availability_zone=%(availability_zone)s, status=%(status)s, attach_status=%(attach_status)s, migration_status=%(migration_status)s, scheduled_at=%(scheduled_at)s, launched_at=%(launched_at)s, terminated_at=%(terminated_at)s, display_name=%(display_name)s, display_description=%(display_description)s, provider_location=%(provider_location)s, provider_auth=%(provider_auth)s, provider_geometry=%(provider_geometry)s, provider_id=%(provider_id)s, volume_type_id=%(volume_type_id)s, source_volid=%(source_volid)s, encryption_key_id=%(encryption_key_id)s, consistencygroup_id=%(consistencygroup_id)s, group_id=%(group_id)s, bootable=%(bootable)s, multiattach=%(multiattach)s, replication_status=%(replication_status)s, replication_extended_status=%(replication_extended_status)s, replication_driver_data=%(replication_driver_data)s, previous_status=%(previous_status)s WHERE volumes.deleted = false AND volumes.id = %(id_1)s'] [parameters: {'migration_status': None, 'provider_id': None, 'availability_zone': None, 'terminated_at': None, 'updated_at': None, 'previous_status': None, 'ec2_id': None, 'replication_status': None, 'snapshot_id': None, 'replication_extended_status': None, 'deleted_at': None, 'size': 1, 'display_name': u'', 'display_description': u'', 'cluster_name': None, 'project_id': u'cinderlib', 'launched_at': None, 'scheduled_at': None, 'status': u'available', 'volume_type_id': None, 'multiattach': False, 'deleted': False, 'provider_location': None, 'host': u'storage-ge-04.scl.lab.tlv.redhat.com@NewCinderlib#SSD_r1', 'consistencygroup_id': None, 'source_volid': None, 'provider_auth': None, 'provider_geometry': None, 'user_id': u'cinderlib', 'bootable': False, 'created_at': datetime.datetime(2019, 2, 27, 11, 10, 35, 113636, tzinfo=<iso8601.Utc>), 'param_1': [], 'attach_status': u'detached', 'param_2': [], '_name_id': None, 'id_1': u'9eeb4696-12f0-4e0a-a9f1-3ec04e5fd45f', 'encryption_key_id': None, 'replication_driver_data': None, 'group_id': None}] 2019-02-27 11:12:32,240+02 ERROR [org.ovirt.engine.core.bll.storage.disk.managedblock.RemoveManagedBlockStorageDiskCommand] (EE-ManagedThreadFactory-commandCoordinator-Thread-2) [fccf5f4e-9950-49ab-b085-cad6ac286e6a] Transaction rolled-back for command 'org.ovirt.engine.core.bll.storage.disk.managedblock.RemoveManagedBlockStorageDiskCommand'. 2019-02-27 11:12:32,243+02 ERROR [org.ovirt.engine.core.bll.storage.disk.managedblock.RemoveAllManagedBlockStorageDisksCommand] (EE-ManagedThreadFactory-commandCoordinator-Thread-1) [] Can't remove managed block disk id '9eeb4696-12f0-4e0a-a9f1-3ec04e5fd45f' for VM id 'fb24d879-3311-47d5-96d6-6c0631d2d292' from domain id '7fbf3a27-ef04-444a-86f4-08b8d22f2256' due to: ENGINE. 2019-02-27 11:12:32,272+02 ERROR [org.ovirt.engine.core.bll.RemoveVmCommand] (EE-ManagedThreadFactory-engine-Thread-35955) [] Command 'org.ovirt.engine.core.bll.RemoveVmCommand' failed: null 2019-02-27 11:12:32,274+02 ERROR [org.ovirt.engine.core.bll.RemoveVmCommand] (EE-ManagedThreadFactory-engine-Thread-35955) [] Exception: java.lang.UnsupportedOperationException at java.util.AbstractList.add(AbstractList.java:148) [rt.jar:1.8.0_201] at java.util.AbstractList.add(AbstractList.java:108) [rt.jar:1.8.0_201] at java.util.AbstractCollection.addAll(AbstractCollection.java:344) [rt.jar:1.8.0_201] at org.ovirt.engine.core.bll.RemoveVmCommand.removeVm(RemoveVmCommand.java:174) [bll.jar:] at org.ovirt.engine.core.bll.RemoveVmCommand.executeVmCommand(RemoveVmCommand.java:131) [bll.jar:] at org.ovirt.engine.core.bll.VmCommand.executeCommand(VmCommand.java:159) [bll.jar:] at org.ovirt.engine.core.bll.CommandBase.executeWithoutTransaction(CommandBase.java:1147) [bll.jar:] at org.ovirt.engine.core.bll.CommandBase.executeActionInTransactionScope(CommandBase.java:1305) [bll.jar:] at org.ovirt.engine.core.bll.CommandBase.runInTransaction(CommandBase.java:1954) [bll.jar:] at org.ovirt.engine.core.utils.transaction.TransactionSupport.executeInSuppressed(TransactionSupport.java:164) [utils.jar:] at org.ovirt.engine.core.utils.transaction.TransactionSupport.executeInScope(TransactionSupport.java:103) [utils.jar:] at org.ovirt.engine.core.bll.CommandBase.execute(CommandBase.java:1365) [bll.jar:] at org.ovirt.engine.core.bll.CommandBase.executeAction(CommandBase.java:413) [bll.jar:] at org.ovirt.engine.core.bll.PrevalidatingMultipleActionsRunner.executeValidatedCommand(PrevalidatingMultipleActionsRunner.java:204) [bll.jar:] at org.ovirt.engine.core.bll.PrevalidatingMultipleActionsRunner.runCommands(PrevalidatingMultipleActionsRunner.java:176) [bll.jar:] at org.ovirt.engine.core.bll.PrevalidatingMultipleActionsRunner.lambda$invokeCommands$3(PrevalidatingMultipleActionsRunner.java:182) [bll.jar:] at org.ovirt.engine.core.utils.threadpool.ThreadPoolUtil$InternalWrapperRunnable.run(ThreadPoolUtil.java:96) [utils.jar:] at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [rt.jar:1.8.0_201] at java.util.concurrent.FutureTask.run(FutureTask.java:266) [rt.jar:1.8.0_201] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [rt.jar:1.8.0_201] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [rt.jar:1.8.0_201] at java.lang.Thread.run(Thread.java:748) [rt.jar:1.8.0_201] at org.glassfish.enterprise.concurrent.ManagedThreadFactoryImpl$ManagedThread.run(ManagedThreadFactoryImpl.java:250) [javax.enterprise.concurrent.jar:1.0.0.redhat-1] at org.jboss.as.ee.concurrent.service.ElytronManagedThreadFactory$ElytronManagedThread.run(ElytronManagedThreadFactory.java:78) 2019-02-27 11:12:32,287+02 INFO [org.ovirt.engine.core.bll.CommandCompensator] (EE-ManagedThreadFactory-engine-Thread-35955) [] Command [id=b3196327-be23-4304-addc-021c943f4c00]: Compensating CHANGED_STATUS_ONLY of org.ovirt.engine.core.common.businessentities.VmDynamic; snapshot: EntityStatusSnapshot:{id='fb24d879-3311-47d5-96d6-6c0631d2d292', status='Down'}. 2019-02-27 11:12:32,306+02 WARN [org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogDirector] (EE-ManagedThreadFactory-engine-Thread-35955) [] EVENT_ID: USER_REMOVE_VM_FINISHED_WITH_ILLEGAL_DISKS(172), Expected results: Additional info:
Verified The removal of VM + MBD disk (3PAR driver) completed successfully without ERRORS. ovirt-engine-4.4.3.7-0.22.el8ev.noarch vdsm-4.40.34-1.el8ev.x86_64
This bugzilla is included in oVirt 4.4.3 release, published on November 10th 2020. Since the problem described in this bug report should be resolved in oVirt 4.4.3 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.