NDB fails to delete policy due to "An error occurred while updating the entries. See the inner exception for details."
Applies to
- NetApp Data Broker (NDB) 1.0.x
- SnapCenter Plug-in for VMware vSphere (SCV) 4.3 and later
Issue
- NDB/SCV is unable to delete policy due to the following error.
Unable to delete policy with name <Policy Name> from SnapCenter Server : An error occurred while updating the entries. See the inner exception for details.
ProtectionService-<YYYYMMDD>.log
shows the following error.
[ERR] [ServiceName:Policy] [RequestId:XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX] [CorrId:] [JobId:]
Microsoft.EntityFrameworkCore.DbUpdateException: An error occurred while updating the entries. See the inner exception for details.
---> MySql.Data.MySqlClient.MySqlException: Cannot delete or update a parent row: a foreign key constraint fails (`nsm`.`nsm_ProtectionNode`, CONSTRAINT `FK_nsm_ProtectionNode_nsm_Policy` FOREIGN KEY (`nsm_PolicyId`) REFERENCES `nsm_Policy` (`nsm_Policy_Id`))
---> MySql.Data.MySqlClient.MySqlException: Cannot delete or update a parent row: a foreign key constraint fails (`nsm`.`nsm_ProtectionNode`, CONSTRAINT `FK_nsm_ProtectionNode_nsm_Policy` FOREIGN KEY (`nsm_PolicyId`) REFERENCES `nsm_Policy` (`nsm_Policy_Id`))
at MySqlConnector.Core.ResultSet.ReadResultSetHeaderAsync(IOBehavior ioBehavior) in C:\projects\mysqlconnector\src\MySqlConnector\Core\ResultSet.cs:line 42
--- End of inner exception stack trace ---