SC服务器-无法删除主机-外部密钥约束错误
适用场景
SnapCenter (所有版本)
问题描述
无法使用SC UI或PowerShell cmdlet从SnapCenter中删除已停用的插件主机、并显示以下错误:
DEBUG SnapManagerWeb_<Job_ID> PID=[xxxx] TID=[xxxx] Failed to remove file system resource. Details: Cannot delete or update a parent row: a foreign key constraint fails (`nsm`.`nsm_smsql_databasefile`, CONSTRAINT `FK_nsm_smsql_DatabaseFile_nsm_StorageFootprint` FOREIGN KEY (`nsm_StorageFootPrint_id`) REFERENCES `nsm_StorageFootprint` (`nsm_StorageFootprint_id`)
DEBUG SnapManagerWeb_<Job_ID> PID=[xxxx] TID=[xxxx] Failed to Remove SCW Resource: Cannot delete or update a parent row: a foreign key constraint fails (`nsm`.`nsm_smsql_databasefile`, CONSTRAINT `FK_nsm_smsql_DatabaseFile_nsm_StorageFootprint` FOREIGN KEY (`nsm_StorageFootPrint_id`) REFERENCES `nsm_storagefootprint` (`nsm_StorageFootprint_id`)
DEBUG SnapManagerWeb_<Job_ID> PID=[xxxx] TID=[xxxx] RemoveSCWResource - exit
DEBUG SnapManagerWeb_<Job_ID> PID=[xxxx] TID=[xxxx] Catch an exception in RemoveSCWResource: Cannot delete or update a parent row: a foreign key constraint fails (`nsm`.`nsm_smsql_databasefile`, CONSTRAINT `FK_nsm_smsql_DatabaseFile_nsm_StorageFootprint` FOREIGN KEY (`nsm_StorageFootPrint_id`) REFERENCES `nsm_StorageFootprint` (`nsm_StorageFootprint_id`)